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]
Type=Application
Name=Some Application
Exec="/usr/lib/jvm/java-8-openjdk-amd64/jre/bin/java" -Xmx768M -jar /opt/some/application/boot.jar
Icon=/opt/some/application/logo.png
Categories=Application;
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:
Neither
Exec="admin:///usr/lib/jvm/java-8-openjdk-amd64/jre/bin/java" -Xmx768M -jar /opt/some/application/boot.jar
nor
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.