Applications Menu items: how to make them run a script ?
Stuart A. Yeates
syeates at gmail.com
Sun Jul 20 10:09:42 UTC 2008
There are a couple of tricks for shell scripts:
(a) make sure the permissions are correct (i.e. executable)
(b) make sure you're using absolute paths
(c) remember the the #! at the start
(d) use verbose error handling to stdout, for debugging, at least when
you detect something wrong
cheers
stuart
On Sun, Jul 20, 2008 at 10:03 PM, Vincent Trouilliez
<vincent.trouilliez at modulonet.fr> wrote:
> Hi list,
>
> Little problem here...
>
> I just bought X-Plane, and added a menu entry for it in the
> Applications menu in the Game category... simple enough, works fine.
>
> However, I quickly realised that the hat switch on the joystick didn't
> work, well known problem I found out, well known solution too: run a
> program called "jhat" before starting X-Plane, then kill jhat afterward.
>
> So now instead of running X-Plane directly, I must run a script that
> starts jhat, then only X-Plane, then kills jhat.
>
> The script works just fine when I start it manually from the command
> line in a terminal window, from the directory it's in.
>
> However, when I updated the menu entry to start the script instead of
> the X-Plane executable, well nothing happens !
>
> Old menu entry (works):
>
> "/home/vincent/X-Plane/X-Plane-i686"
>
> new entry (doens't work, fails silently):
>
> "/home/vincent/X-Plane/xplane.sh"
>
>
> Anyone managed to run a script from the Applications menu, what's the
> trick ?! :-)
>
>
> --
> Vince
>
> --
> ubuntu-users mailing list
> ubuntu-users at lists.ubuntu.com
> Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-users
>
More information about the ubuntu-users
mailing list