PDA

View Full Version : create a desktop shortcut for a script


abhinandh
30-09-2007, 05:45 PM
how do i create a shortcut for a script, for example i have cube game installed under "/usr/local/games/cube". i need to run the script "cube_unix" from that directory.(after doing a "cd")
whats the command i need to give in the create shortcutbox.

QwertyManiac
30-09-2007, 05:55 PM
Check this image guide below for doing it in GNOME

http://aycu10.webshots.com/image/29089/2004131150988535036_rs.jpg (http://allyoucanupload.webshots.com/v/2004131150988535036)

You need to give the entire path to the script, that is, "/usr/local/games/cube/cube_unix". :)

abhinandh
30-09-2007, 06:06 PM
woooo a quick reply.but already tried that.i have to run the script from that particular folder.in terminal it gives error

exec: 42: ./bin_unix/linux_client: not found


thet folder bin_unix/linux_client is in the directory of the game


btw what window decorator r u using.is it emerald??

QwertyManiac
30-09-2007, 07:31 PM
Yes it is Emerald with the default green theme and Window Reflections turned on.

Sorry that the above didn't work .. But I think you need to make a bash script file for running this.

Add this to a file named cube.sh on your desktop:

#!/bin/bash
cd /usr/bin/local/games/cube
./cube_unixMake it executable (chmod +x cube.sh or simply do it via Properties > Permissions) and tell me if it executes well?

abhinandh
30-09-2007, 09:24 PM
thank u.script running good.

QwertyManiac
01-10-2007, 02:11 AM
I should have taken that 'cd' more seriously at first itself, apologies :))