Run script from RedHat Linux RHEL5 desktop in GNOME

I have a few scripts in my /home/myname directory that run executable files located elsewhere on my server. Here are the files:


The contents of these files are basically a script that look like this (this example from PGM1):

cd /data/program
./run /data/PGM1

I need these 3 scripts to run in a terminal on my GNOME desktop. So what I do is log into the console, open a terminal, and type ./PGM1. This then runs the script in a terminal window which stays on the screen. I repeat this step for all 3 scripts.

What I want to do is have a shortcut to these scripts on my GNOME desktop that I can just double click on. So I created the short cuts, but when I try to open them, nothing happens. I've tried right-clicking them and selecting "Open with> /bin/bash" and also "Open with> terminal" with no luck. Any thoughts?
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

http:// thevpn.guruCommented:
Are you running them as the same user in bash and in Gnome ? I.e. are you running them as root in bash ?
You can also right-click on the menu, and press "Edit Menus". Then you can add a menu item to do it rather than a desktop icon. If you need to run them as root then use gksu in place of sudo to pring up the gui password prompt. i.e. gksu /data/program/run /data/PGM1

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
Pétur Ingi EgilssonSoftware Engineer -- ConsultantCommented:

save the file as /home/yourname/bin/
chmod +x /home/yourname/bin/

#make sure ~/bin is in your path
echo $PATH
#if ~/bin is not in your path, add this line to ~/.bash_profile
export PATH

create a gnome shortcut "to a command", the comand should be ``
Forced accept.

EE Admin
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today

From novice to tech pro — start learning today.