Environment: CentOS 5.10 on 32 Bit.
#!/bin/bash cd /dump sudo /opt/java/jre1.7.0_60/bin/java -jar mytest.jar
mytest.jar will pop a GUI app in the desktop, username is in sudoers with NOPASSWD.
Created a launcher in desktop, on double click it doesn't launch the GUI.
If I run
test.sh in terminal, it works without issue.