When I try to execute this file:

[Desktop Entry]
Name=Shiginima Launcher
Exec=java -jar /home/edoardo/Scrivania/Giochi/Minecraft/Shiginima\ Launcher\ SE\ v3.100.jar

with gtk-launch, it starts loading and after it crash (without opening).

Furthermore if I execute the .desktop file (the same file) inside a terminal, it return an output like this:

/home/edoardo/Scrivania/Giochi/Minecraft/launcher.desktop: line 1: [Desktop: command not found
/home/edoardo/Scrivania/Giochi/Minecraft/launcher.desktop: line 4: Launcher: command not found
/home/edoardo/Scrivania/Giochi/Minecraft/launcher.desktop: line 6: -jar: command not found

How can I fix it?

If it can be useful: my screenfetch

  • 3
    Your "furthermore" test is just telling you that .desktop files aren't shell scripts, and can't be executed as such - a more useful test would be whether you can execute java -jar /home/edoardo/Scrivania/Giochi/Minecraft/Shiginima\ Launcher\ SE\ v3.100.jar in a terminal – steeldriver Jul 14 '17 at 0:01
  • Although preceding the .desktop file proper with #!/usr/bin/xdg-open does work and is quite a fun thing I hadn't thought about until now... – Christian Jul 14 '17 at 0:14
  • @Christian I added this line as first line, now no errors on the terminal (no output) but it does not work anyway. – Edoardo La Greca Jul 14 '17 at 17:29
  • Did you try just getting rid of the backslashes that escape the spaces? – Christian Jul 15 '17 at 14:43
  • with both java -jar "/home/edoardo/Scrivania/Giochi/Minecraft/Shiginima Launcher SE v3.100.jar" and java -jar /home/edoardo/Scrivania/Giochi/Minecraft/Shiginima Launcher SE v3.100.jar it does not work – Edoardo La Greca Jul 16 '17 at 17:00

Like the comments told you, your test is only showing that the .desktop is not a shell script. That's why you get all those errors aswell as why you get the -jar command not found since in that test you actually set a variable "exec"="java" afterwards the shell tries to run -jar which it doesn't find.

So first of all try

 java -jar /home/edoardo/Scrivania/Giochi/Minecraft/Shiginima\ Launcher\ SE\ v3.100.jar

If that doesn't work you might need to look into that first of all.

Also you can set your Terminal=true for now, so you actually get an output when you click on the .desktop file so you are able to see what is happening.

  • The command in the Exec parameter works fine but if I set Terminal=true nothing change. – Edoardo La Greca Jul 14 '17 at 17:32

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.