Can you attach your .desktop file so that I can more fully see what you're describing above?
...ahh...never mind. I finally got a repro.
I'm in no way an expert on .desktop files and was doing this from some trial and error because the game did not come with a .desktop file. This is what worked from my DEs menu but not from steam.
[Desktop Entry]
Type=Application
Encoding=UTF-8
Name=Katawa Shoujo
Exec=/home/arrow/Katawa\ Shoujo-linux-x86/katawa\ shoujo.sh
Terminal=false
Categories=Game;
Changing the Exec line to this failed to let it even be added as a game in steam. I suspect this isn't even valid normally but I had to try the common ways of dealing with spaces.
Exec="/home/arrow/Katawa Shoujo-linux-x86/katawa shoujo.sh"
I finally created a simple script named katawa-shoujo.sh and put it in my path.
#!/bin/sh
exec /home/arrow/Katawa\ Shoujo-linux-x86/katawa\ shoujo.sh
And changed the Exec line to this and it works in steam.
Exec=katawa-shoujo.sh
You can simply choose the .sh file rather than pick the .desktop. When you go to add the non-steam game, just change the file picking dialog to look for all files, and then choose your .sh file.
It should work.
I'll still see what I can do about fixing the .desktop handling here in this case.
The file picking dialog only allows me to pick .desktop files. I cannot change it to look for anything except Applications.
Your file picker doesn't look something like this? You should be able to drop down the File Type control and choose "All Files".
Does yours not do that?
What desktop manager/Linux Distro are you running?
I have that exact same file picker except there is no All Files in the dropdown. The only option is Applications.
Debian Wheezy 64bit with Cinnamon DE from Debian Sid.
Ok, got the missing All Files in the dropdown to repro. Not sure why there's a difference yet...
The change to add the All Files option is recent and hasn't made it outside of Valve yet.
Ok, I have a fix for this. The shell expects spaces to be quoted with a ''. We'll accept that format in the .desktop files.
Need to test a bit more, before I check in.
Ok, fixed. Should be in the next release..
Steam does not like the .desktop files created by CrossOver either. They use double quotes around the Exec entry but also have a shebang letting them be executed like scripts with xdg-open.
#!/usr/bin/env xdg-open
[Desktop Entry]
Encoding=UTF-8
Type=Application
X-Created-By=cxoffice-d55ec27d-90bc-4943-b430-527902170deb
Categories=X-cxmenu-cxoffice-d55ec27d-90bc-4943-b430-527902170deb-19b15q9;
Icon=cxmenu-cxoffice-d55ec27d-90bc-4943-b430-527902170deb-493F_Grim Fandango Launcher.0
Exec="/home/arrow/.cxoffice/Grim Fandango/desktopdata/cxmenu/StartMenu.C^5E3A^5Fusers^5FPublic^5FStart^2BMenu/Programs/Grim+Fandango/Grim+Fandango.lnk"
Name=Grim Fandango
Comment=Run Grim Fandango
And the .lnk file it is pointing too is actually a shell script. Which could be used to get around this problem, but the .desktop file has the icons and such in it.
FWIW we had the exact same issue in Razor:
In addition I seem to have lost some of the previous functionality of the "Add-non steam game" dialog. After the update that added the All Files option, when using the browse files dialog the selected game is not selected when its added to the previous list. Resulting in having to find it in the list and manually select it. Previously it was selected automatically.
Steam still doesn't work with .desktop files created by CrossOver since the latest update. Issue is not completely resolved, please reopen.
Ok, revamped my original fix. Tested with CrossOver links. Please let us know if you have problems with it.
Nothing extracted yet.
I tried to add a non-steam game to steam and it did not come with a
.desktopfile so I created one. The game extracts to a directory with a space in the name and is executed by a.shscript that also has a space in the name. First I tried putting the full path in theExec=line in the.desktopfile and escaping the spaces with\and it would not run in steam even though it would run from my DE menu. Second I tried putting the full path in quotes and steam wouldn't even add the game anymore.I finally created a simple script to
exec full\ pathand had the.desktopfile run that script and steam finally launched the game without issue.When I checked the output of steam while doing all this I was getting this error message when it was failing to launch the game.