At first I just made a link to the .sh file on my desktop which failed to execute by double click. Then I've read about .desktop files and made one still to no avail. The program I want to run is a shell script with various parameters for executing jar file. My ./desktop file looks as follows:

[Deskto Entry]
Comment=starts the jess UI

Since the script launches from the terminal, it is correct, however since it does not really used the terminal, I don't want to open terminal window to run it. Setting Terminal=true did not help either.

EDIT: The script I am launching:

java -cp $JESSATOR/Jessator.jar:/home/alf/JESS/Jess71p2/lib/*:$JESSATOR/TimerBean.jar Jessator
  • It is executable, if I open terminal and call the script from there it executes. I thought about just running it that way with & at the end, but even if do that, the program is closed when I close the terminal. – Asteroth Oct 24 '14 at 17:43

You have misspelling in the first line of your .desktop file

[Deskto Entry]

should be

[Desktop Entry]

There must be permissions issues because this works just fine for me:

mbiber@linux-pc ~/Desktop $ cat T2M.desktop 
[Desktop Entry]
Comment=Toggle second monitor display
Exec=/usr/local/bin/toggle-screen.sh > /dev/null 2>&1
  • Can it have something to do with the script calling a java jar with classpath given as one of the parameters? – Asteroth Oct 24 '14 at 17:45
  • We cant know since you haven't pasted the script. – mbiber Oct 24 '14 at 18:09
  • edited the original post, now it holds the exact script – Asteroth Oct 26 '14 at 18:47

The general thing that comes to mind first is, Is your script executable? You can set this in the terminal by typing

chmod +x yourfile.sh

Or in a graphical way -

Right click file -> Properties -> "Permissions" Tab -> Check box "Allow this file to run as a program"

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.