1

I'm trying to make an icon (later in Application) for a software that I just downloaded. I unziped the .tar.gz. The unziped file contains bin and share directories. The bin directory contains the shell script for the application. (runs on terminal) I created the .desktop file as follows (in /~)

[Desktop Entry]
Name=CopasiUI
Exec=/home/ubuntu/Documents/Biologie/L3SV/S6/PPD/Copasi/bin/CopasiUI.sh
Icon=/home/ubuntu/Documents/Biologie/L3SV/S6/PPD/Copasi/share/copasi/Copasi48-alpha.xpm
Terminal=false
Type=Application

I'm new in ubuntu and I feel the lack of knowledge in that matter. From there it does not work yet. I get "There was an error launching the app" Does not even show the icon I selected. Can i just keep the .desktop file in ~ to see if it's working?

Thank you for your answers.

(It worked without the .sh)

  • Did you make the .desktop file executable (run chmod +x /path/to/file.desktop)? You can try to install the desktop launcher with sudo desktop-file-install /path/to/file.desktop. It will also appear in the dash as application then and have a copy of the .desktop file stored in /usr/share/applications. – Byte Commander Mar 13 '15 at 10:55
  • @ByteCommander better not store a .desktop file globally if the application is stored locally. Use ~/.local/share/applications instead. – Jacob Vlijm Mar 13 '15 at 11:09
0

Unless your script both starts with the Shebang (#!/bin/sh) and is marked as executable, you'll need to run sh specifying the shell script as an argument in order to execute it: this line:

Exec=/home/ubuntu/Documents/Biologie/L3SV/S6/PPD/Copasi/bin/CopasiUI.sh

Should be this line:

Exec=sh /home/ubuntu/Documents/Biologie/L3SV/S6/PPD/Copasi/bin/CopasiUI.sh
  • @JacobVlijm True, i clarified it – kos Mar 13 '15 at 11:19

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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