Suppose you wish to launch your Windows Steam games from within the Linux Steam client. You might know that you have to add a "non-Steam" game, but how? It isn't strait forward, but it also isn't too terribly difficult either.
There are two methods that should work. For the first what we need to do is create a .desktop file for each game we wish to add to our Linux Steam Client. For the second, we create a Windows link file, a bash file, and then a .desktop file. I have had more success with this second method.
---- Method 1 ----it will look something like this when we are done:
[code]
#!/usr/bin/env xdg-open
[Desktop Entry]
Type=Application
Exec="/home/george/cxoffice/bin/wine" --bottle "Neptunia" --check --wait-children --start "C:/users/Public/Start Menu/Programs/Steam/Steam.lnk" "steam://rungameid/353270"
Name=Neptunia Re;Birth 3
[/code]
The key lines that will change depending on your own usage are the "Exec" line and the "Name" line. The Name line is just the name you wish to have displayed. The Exec line is a bit more complicated.
First, on the Exec line, after the "=", we have the path to our Crossover executable. For me, since I had installed it for my own use, it is in my home directory. Another likely place to find it is "/opt/cxoffice/bin/wine" if it was installed globally. Note that you need to provide the full path to the executable, so you can't take a short cut and use "~/cxoffice/bin/wine". Next on that line we have --bottle "Neptunia". This tells CrossOver which bottle to run the Windows Program in. If I was playing Skyrim, I would change that from Neptunia to Skyrim, since that is the name of the bottle it is in. Now, assuming Windows Steam is installed via a CrossTie, "C:/users/Public/Start Menu/Programs/Steam/Steam.lnk" should be okay, but if you installed it in some other way, that lnk file may not exist. You probably could just direct CrossOver to run the Steam executable directly. The last part, "steam://rungameid/353270" tells Steam which game to run. For me, I am trying to add Hyperdimension Neptunia Re;Birth 3 and so I indicate this with the number "353270". If I was playing Skyrim I instead would use "72850". This number can be found in the URL of the Steam store page. For example, the store page for Skyrim is "
http://store.steampowered.com/app/72850/".
Once you have created and saved your .desktop file, you need to make it executable. Navigate to the file's directory in a termincal and type "chmod +x MyGame.desktop"
Now you can go to your Linux Steam client, add non-Steam game, and browse to the .desktop file to add the game.
---- Method 2 ----To first summarize this method, we start by having Steam Create a short cut. We then convert that shortcut to a link. We use this link to write a short script which launches the game with the appropriate bottle. A .desktop file then points to this script. We point Linux Steam at the .desktop file to finally add it.
For an example, I will be adding Life is Strange to my list of games in Linux Steam.
First, start Steam from the appropriate bottle. In my case, I run Life is Strange from my Mass Effect bottle. Now right click on the game and select "Create Desktop Shortcut". This creates a .url file, which by itself isn't very useful. Luckily, someone created a utility that converts these Steam .url shortcuts to Windows .lnk links. For this use Steam URL Converter which can be found at
http://skwire.dcmembers.com/fp/?page=steam-url-converter. The installation method simply requires that you extract it. I chose to extract it to the directory that contains the newly created shortcut to Life is Strange. The converter's instructions are to drag and drop the .url file onto the converter's .exe file, however this does not work in Linux, or at least not for me. I used the command line, inputting
[code]
/home/george/cxoffice/bin/wine --bottle Mass_Effect "SteamURLConverter.exe" "Life Is Strange.url"
[/code]
This can also be accomplished with the Run command from the CrossOver GUI. Just make sure that after the executable, you have the .url file.
Now you need to create a script to launch the game. For some reason one was already created, probably by Steam URL Converter. In any case, it should look like this.
[code]
#!/bin/sh
exec "/home/george/cxoffice/bin/wine" --bottle "Mass_Effect" --check --wait-children --start "C:/users/crossover/Desktop/Life Is Strange.lnk" "$@"
[/code]
Note that this was found at "/home/george/.cxoffice/Mass_Effect/desktopdata/cxmenu/Desktop.C^5E3A_users_crossover_Desktop/Life+Is+Strange.lnk", and also seems to have created some sort of entry somewhere so that you can skip the next step and go strait to adding the game to Linux Steam.
Continuing on with the .desktop file creation, we create a simpler file than in Method 1 since much of what is needed already exists in the script.
[code]
#!/usr/bin/env xdg-open
[Desktop Entry]
Encoding=UTF-8
Type=Application
Exec="/home/george/.cxoffice/Mass_Effect/desktopdata/cxmenu/Desktop.C^5E3A_users_crossover_Desktop/Life+Is+Strange.lnk" %u
Name=Life is Strange
[/code]
Now you can go to your Linux Steam client, add non-Steam game, and browse to the .desktop file to add the game. I put these .desktop files in "~/.local/share/applications" so that they also appear in my Gnome application list.
Enjoy!