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.

I have sccceded in making launchers with python scripts,php scripts,etc as launchers.

Now I want to make a binary file as a launcher. It is not an installable binary file. It is actually the binary file for WorldOfGoo. The filename is WorldOfGoo.bin32. On runing this file from terminal by the command ./WorldOfGoo.bin32 the game starts.

when i added the path to this file in the Exec field in the [Desktop Entry], like this

/path/to/folder/and/then/WorldOfGoo.bin32 *

and when I clicked on the desktop file,it says "Permission Denied"

How do i get a binary file to work in a .desktop file?

share|improve this question
1  
Permission Denied would normally say that you should chmod +x WorldOfGoo.bin32. Is it a typo or are you using "./path/to/folder/and/then/WorldOfGoo.bin32" (with the leading dot) in the Exec field? –  onse Jun 21 '12 at 10:27
    
you have to make sure that the binary file as well as the .desktop file have executable permissions –  Daniel Jun 21 '12 at 10:39
    
Why should .desktop file have executable permissions? isnt it just a plain text file? –  balki Jun 28 '12 at 8:12
add comment

1 Answer 1

up vote 3 down vote accepted

Here's an example - it starts xnview.sh:

[Desktop Entry]
Encoding=UTF-8
Terminal=0
Exec=/home/pierre/Desktop/XnViewMP/xnview.sh
Icon=/home/pierre/Desktop/XnViewMP/xnview.png
Type=Application
Categories=Graphics;
StartupNotify=true
Name=XnView Multi Platform
GenericName=XnViewMP

Edit:

If You have a nasty complex command to be run - put it all in script and run the script. For example if You have to cd there first, and run the script from there make a script:

#!/bin/bash

cd /to/YourDir
./YourBinaryFile
share|improve this answer
    
its not workin...i mean the game starts but just exits within a second..!! –  Nirmik Jun 21 '12 at 19:00
    
Try to add ampersand after the shell command. How does it work - if You'll just run the binary from the shell? –  Adobe Jun 22 '12 at 18:05
    
Oh I see it in Your question - You can start the thing from terminal. You can then put Exec=gnome-terminal -e '/path/to...' or Exec=konsole -e '/path/to...' if You are using KDE. –  Adobe Jun 22 '12 at 20:13
    
nope...it still exits..this happens even for a simple softlink of that file you know...even that does not work...its like u have to go to the particular folder and then only ude it! –  Nirmik Jun 22 '12 at 22:21
    
If You have to go there - it's not a problem: Exec=cd /to/Your/Folder; ./YourBinary –  Adobe Jun 23 '12 at 16:30
show 4 more comments

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.