4

It's been several months I'm having this horrible problem. I'm currently using Unity 2D, and I manage my menu entries by using .desktop files, which is tiring. Is there a better way to manage them? Anyway, the problem comes from the EXEC field. I'm so tired! I've been fighting to resolve this problem for days! It almost gave me a nervous-breakdown once. As an example, the latest entry I tried to add was an entry for a Windows game (using Wine):

[Desktop Entry]
Name=Venus Patrol 1.1
Icon=/usr/share/icons/venuspatrol.jpg
Type=Application
Categories=Game;
Exec=wine "/home/LOL/Autres/ProgramFiles/Games/Venus Patrol 1.1/VENUS PATROL.exe"
Path="/home/LOL/Autres/ProgramFiles/Games/Venus Patrol 1.1"
Keywords=game;indie;jam;
Terminal=true
GenericName=Indie game by Neil Thapen originally made for TIGSource Cockpit Competition 2009

I put directly executable programs and games (no installation needed, mainly Windows ones) in "/home/LOL/Autres/ProgramFiles" directory. I don't like messing with root folders, as I'm obliged to open the File Manager as root and go through all the system folders.

Whether the path contains spaces or not, it does not work. Whether I precise the environement WINEPREFIX path or not, it does not work. I've tried Alacarte, but it doesn't work as well. I've been reading this, but it didn't help.

Please, help me, I need some help. Do you have any ideas?

PS: ... Well, yeah, I'm a fussy person

EDIT: So, after Mr. Gruber's reply, I updated my .desktop file, without success:

[Desktop Entry]
Name=Venus Patrol 1.1
Icon=/usr/share/icons/venuspatrol.jpg
Type=Application
Categories=Game;
TryExec=/home/LOL/Autres/ProgramFiles/Games/Venus\sPatrol\s1.1/VENUS\sPATROL.exe
Exec=wine "/home/LOL/Autres/ProgramFiles/Games/Venus Patrol 1.1/VENUS PATROL.exe"
Path="/home/LOL/Autres/ProgramFiles/Games/Venus Patrol 1.1"
Keywords=game;indie;jam;
Terminal=true
GenericName=Indie game by Neil Thapen originally made for TIGSource Cockpit Competition 2009.

Whether I precise the Path variable or not, as ever, it does not work. It may be related to Wine (WINEPREFIX, this kind of things), as I (supposedly) eventually had the Exec field well written.

Braiam
  • 67,791
  • 32
  • 179
  • 269
SyS
  • 175

4 Answers4

3

If you use shell features you need to use sh -c "the command". Also, with Wine you need to set the current directory for some stuff. man wine

user72421
  • 3,601
  • By shell features do you mean needing the quotes? How does he set the current directory? – John S Gruber Aug 12 '12 at 18:33
  • Indeed I successfully used '' and "", but it does not work. Precising the WINEPREFIX path does not change anything as well. – SyS Aug 12 '12 at 18:35
0

I suggest you try changing your Exec line to:

Exec="/usr/bin/wine /home/LOL/Autres/ProgramFiles/Games/Venus Patrol 1.1/VENUS PATROL.exe"
John S Gruber
  • 13,336
  • Thanks!... But same result as ever: it does not work. – SyS Aug 12 '12 at 16:26
  • I've edited the answer with another attempt deriving from another recent question/answer. Perhaps that question would help you ... http://askubuntu.com/questions/175404/how-to-add-space-to-exec-path-in-a-thumbnailer-descrption/175567#175567 – John S Gruber Aug 14 '12 at 04:25
  • Thanks for your help! And, guess what: still does not work. Seriously, how do you guys do to sort your menu entries? I've updated my .desktop file, without success. – SyS Aug 18 '12 at 07:46
0

I also had this exact issue and could not get it to work with any of the answers I could find anywhere. As it turned out I had mistakenly set the wrong permissions on the desktop file. If the permissions are not set to 644 (sudo chmod 644 [filename]), the link in the launchpad won't work for me for some reason. Maybe this could be your issue as well?

Daniel
  • 3,446
Cyriuz
  • 1
0

On Path= Put the / at the end

example:

Path="/home/LOL/Autres/ProgramFiles/Games/Venus Patrol 1.1/"