Applications Menu items: how to make them run a script ?

Andy stude.list at googlemail.com
Sun Jul 20 15:17:47 UTC 2008


Vincent Trouilliez wrote:
> *******
> #! /bin/sh
> ./jhat /dev/input/js0 4 5 &
> ./X-Plane-i686
> killall jhat
> *******

There's your problem. Your using ./jhat and ./X-Plane-I686
The script is looking in the working directory which is fine if you have
cd'ed to the correct directory before invoking it but it won't work from
a menu item because the working directory isn't right.

If jhat and X-Plane are in the path change the script to be:

> #! /bin/sh
> jhat /dev/input/js0 4 5 &
> ./X-Plane-i686
> killall jhat

if they are not in the path change it to:

> #! /bin/sh
> cd /path/tp/xplane/dir
> ./jhat /dev/input/js0 4 5 &
> ./X-Plane-i686
> killall jhat

(replacing the argument to cd to be the correct directory)




More information about the ubuntu-users mailing list