I need to run a .desktop file as an admin but I have issues achieving this. I am working with this .desktop file

#!/usr/bin/env xdg-open
[Desktop Entry]
Name=Some Application
Exec="/usr/lib/jvm/java-8-openjdk-amd64/jre/bin/java" -Xmx768M -jar /opt/some/application/boot.jar

I am running Ubuntu 18.04. I have found this question here but it does not work for Ubuntu 18.04.

I tried putting an admin:// in front of it as well but that did not work either:


Exec="admin:///usr/lib/jvm/java-8-openjdk-amd64/jre/bin/java" -Xmx768M -jar /opt/some/application/boot.jar


Exec=admin:///usr/lib/jvm/java-8-openjdk-amd64/jre/bin/java -Xmx768M -jar /opt/some/application/boot.jar

work. If I want to execute that file from the command line it only opens the content. Any help is highly appreciated. I was unable to find anything on Google in regard to Ubuntu 18.04.

  • What command from that question did you try? – Feldspar15523 Jun 18 '18 at 16:46
  • I have tried all of them – JRsz Jun 18 '18 at 20:29

Your Answer

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

Browse other questions tagged or ask your own question.