I'm using Ubuntu Mate 16.04.3. I've installed a Java application that launches correctly from the command line with cd "~/Downloads/Wild Card Creator 1-6-2/" && "./WildCardCreator.sh"
-- and that's good.
However, I'd like to be able to launch this application with a click or two, so I'm trying to create a Mate launcher. I go through the process, pasting the command line above into the launcher's "Command" field, filling in the "name" and "Comment" fields appropriately, setting the icon with an image provided in the application tarball, ensuring that the pull-down is set to "Application" -- and when I click the launcher, I get nothing (if I created it in the Main Menu) or a message box that just says "There was an error launching the application." (if I created it on the desktop). If I set the launcher as "Application in Terminal" I get exactly the same result -- no terminal opens, but I get the same error.
Even if I copy the command java -jar "libs/Wild Card Creator-1.6.2.jar"
from WildCardCreator.sh into the command line of my launcher after the cd
command, I get the same uninformative error -- but that, also works properly if I paste it into a terminal.
It seems like this should be simple -- a launcher ought to reasonably be able to run any command I can run by typing it in a terminal. What am I doing wrong?
path
, but the application runs without it if I type either form of the one-line command into a terminal, or enter only the part after&&
while the current directory is the folder the app resides in. Remember: the app runs from terminal, but the very same command line won't run it from a launcher. – Zeiss Ikon Dec 24 '17 at 17:34~
and is a compound command - at the very least you'd need to wrap it in abash -c '...'
shell command, I think - the freedesktop desktop entry standard is pretty restrictive about what's allowed in anExec
key. – steeldriver Dec 24 '17 at 17:40Exec
key (not having months to read all the docs every time I use a different version of flavor of Ubuntu). More informative error messages would have been a great help here. – Zeiss Ikon Dec 24 '17 at 18:33