Hi Hiro
Have you had success yet? I am struggling with the same problem to get a desktop shortcut to run a shell script. This particular one is to run mpide for generating code for the Chipkit Pi, and normally I open a terminal and cd to the directory and type ./mpide.
I tried to use Exec=<directory>./mpide in the desktop file, but that did nothing, either with Terminal=false (or true). I have managed to get an lxterminal to run with its working directory at the place where my code is. But as soon as I try to make lxterminal execute a command with --command='./mpide' or similar it falls over and doesn't do anything.
Here is the non-working code I have at the moment - saved on the desktop as mpide.desktop :
Code: Select all
[Desktop Entry]
Encoding=UTF-8
Type=Application
Path=/home/pi/mpide-0023-raspberrypi-20130920
Name=mpide
Name[en_GB]=mpide
Icon=/home/pi/mpide-0023-raspberrypi-20130920/lib/theme/mpide-icon.png
Exec=lxterminal --working-directory='/home/pi/mpide-0023-raspberrypi-20130920' -t 'mpide terminal' --command='./mpide'
Comment[en_GB]=start up Chipkit Pi desktop app
Terminal=false
StartupNotify=true
The -t '…' is supposed to give the terminal a title, but gets overwritten by the --working-directory='…' command.
If I remove the --command='./mpide' the terminal window opens and I can type ./mpide to start up the script, but with it in I see a terminal window flash up and then disappear.
I have read lots of posts on this but many people seem to have the same problem. BTW I tried creating the desktop file by copying another, or with the lxshortcut command which has been referred to elsewhere - makes no difference. It also doesn't seem to matter whether the desktop file is made executable or not - most of the normal desktop shortcuts do not have the execute flag set.
Frustratingly
Tony