Spent many days and looking at multiple forums and still cannot get .desktop files to work properly (either creating them manually or by using the Applications - Main Menu - New Item option). OpenSUSE 13.2 Gnome 3.14.1
I have tried putting the .desktop file in both Home-Desktop and in /usr/share/applications etc and both behave the same. I have altered the contents of the .desktop file many times including or removing sudo, adding sudo sh, su -1, sudo -u root, ./pathname, putting the path in quotes or not etc
Exec=sudo sh /usr/local/apps/apache-tomcat-5.5.31/bin/startup.sh
Adding the icon line etc makes no difference.
I can run this command from any terminal, logged in as any user, and it works properly.
I know it is an old version of Tomcat but I require this for the application I am running.
Both the .sh and the .desktop files are executable by any user, but when I click the short-cut icon it prompts for a password and then (once a password has been entered) disappears without starting the .sh and without any messages (the terminal closes so I cannot see what failed and there are no log files to show me). The .sh already contains #!/bin/sh and my JRE_HOME and JAVA_Home are set in setenv.sh (and echo properly).
Any assistance appreciated (if I could force the terminal to stay open that would help).
and (directly in the /usr/local/apps/apache-tomcat-5.5.31/bin folder)
Without installing it’s hard to see what it’s calling and doing, hence
I’m leaning towards some sort of environment issue with the desktop
In your home directory bin directory create a file called say
mytomcatstart and make it executable.
cd /usr/local/apps/apache-tomcat-5.5.31/bin && exec ./startup.sh $*
Then create a desktop file pointing at that and see if that helps.
Else might have to look at a systemd service file.
Cheers Malcolm °¿° LFCS, SUSE Knowledge Partner (Linux Counter #276890)
SUSE Linux Enterprise Desktop 12 GNOME 3.10.1 Kernel
3.12.43-52.6-default If you find this post helpful and are logged into
the web interface, please show your appreciation and click on the star