Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

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.

share|improve this question
    
Does it help to use a complete path name for wine? –  John S Gruber Aug 12 '12 at 15:39
    
Eerrr, I can't do without, can I? If I don't, wine will search for the file in system32 folder and other Windows PATH folders. –  SyS Aug 12 '12 at 15:52
    
I think you need the path for the .exe program. I think you need to add the path to where the wine program is. I've added an answer to try to make this clearer. –  John S Gruber Aug 12 '12 at 16:18
    
What happens if you start a terminal and try the part after the "="? /usr/bin/wine "/home/LOL/Autres/ProgramFiles/Games/Venus Patrol 1.1/VENUS PATROL.exe` –  John S Gruber Aug 12 '12 at 16:33
    
It does not work. –  SyS Aug 12 '12 at 17:50

2 Answers 2

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

share|improve this answer
    
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

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"
share|improve this answer
    
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 ... askubuntu.com/questions/175404/… –  John S Gruber Aug 14 '12 at 4: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 7:46
    
I updated my question too. –  SyS Aug 18 '12 at 8:00

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.