3

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?

Ashu
  • 9,642
Nirmik
  • 7,938

3 Answers3

4

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
Adobe
  • 3,971
2

Sample:

  1. Make *.sh file home folder.
    Make it executable.
    Change your user name to your own (.sh and .desktop file):

    nano qtwaifu2x.sh

     #!/bin/bash
     cd /home/user/git/build-qtwaifu2x-Desktop-Debug
     ./qtwaifu2x
    
  2. Make desktop files (qtwaifu2x.desktop)

    nano qtwaifu2x.desktop

     [Desktop Entry]
     Version=1.1
     Name=Qtwaifu2x
     Comment=Image Super-Resolution for Anime-Style Art
     Exec=/home/user/qtwaifu2x.sh
     Icon=qtwaifu2x
     Terminal=false
     Type=Application
     Categories=Graphics;ImageProcessing;
    
  3. Copy qtwaifu2x.desktop to /usr/share/applications

  4. Copy qtwaifu2x.png + svg to /usr/share/icons

  5. Use slink /usr/share/applications/qtwaifu2x.desktop to my desktop.

  6. Desktop icon -> right click menu -> enable startup

...and done.

0

There is a tool called alacarte, it is a user-friendly tool to create .desktop files. You can install it: sudo apt install alacarte.

gorgo
  • 258