1

I have an executable jar file which I'd like to be able to start from a shortcut on either the desktop or the start menu. I wrote a desktop file but I cannot get it to work no matter how I specify the Exec line. The file currently reads as

[Desktop Entry]
Type=Application
Name=Party Planner
Exec=java -jar ~/Downloads/PartyPlanner.jar

When I click on the file on the desktop, absolutely nothing happens. The command in the Exec line works perfectly well when I enter it in the terminal. In fact, it works no matter what directory I'm in when I type it. I've tried replacing "java" and "~/Downloads/PartyPlanner.jar" in the desktop file with their respective absolute paths, but that doesn't help. I can't get this thing to work on either of my Lubuntu machines (one running 14.04 and the other 15.04).

What am I doing wrong? Is there some log file somewhere I should be looking at for error messages?

  • Try it again with the absolute path of ~/Downloads/PartyPlanner.jar and add exactly this desktop file into your question. ~ can't work. – A.B. Oct 12 '15 at 13:25
  • . . . it's working now. Thank you. For the record, I tried doing the absolute path before posting the question. I see now that I had a typo then--I capitalized my user name rather than going with all lower case. Thanks. – John Oct 12 '15 at 14:36
0
  1. You can't use the ~ in your desktop file. Replace ~ with the output of

    echo /home/$USER
    

    e.g.

    Exec=java -jar /home/john/Downloads/PartyPlanner.jar
    
  2. Use

    Path=/home/john/Downloads/
    Type=Application
    

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.