1

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]
Encoding=UTF-8
Name=jessator
Comment=starts the jess UI
Exec=/home/alf/Software/Jessator/runJessator.sh
Icon=/home/alf/Software/Jessator/jess-32x32.gif
Type=Application
Terminal=false

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
1
  • 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, 2014 at 17:43

3 Answers 3

1

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

[Deskto Entry]

should be

[Desktop Entry]
0

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
Terminal=false
Name=2ndMonitorToggle
Exec=/usr/local/bin/toggle-screen.sh > /dev/null 2>&1
Type=Application
Icon=/usr/share/icons/screen_icon_white.png
Name[en_US]=T2M
3
  • Can it have something to do with the script calling a java jar with classpath given as one of the parameters?
    – Asteroth
    Oct 24, 2014 at 17:45
  • We cant know since you haven't pasted the script.
    – mbiber
    Oct 24, 2014 at 18:09
  • edited the original post, now it holds the exact script
    – Asteroth
    Oct 26, 2014 at 18:47
0

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"

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .