gnome launcher won't run a sudo command directly or via a script
I'm using RedHat EL 5.3 64-bit with gnome-panel 2.16.1 etc.
I want to make a panel launcher that runs a program that
needs sudo. I have the appropriate entry in sudoers.
It is set for NOPASSWD. It is not running anything as root.
Lets say the command I need is "sudo -u somebody -H -b /usr/bin/mypgm"
If I run this from a command line, it works.
If I make an alias in my .cshrc and run the alias, it works.
If I make a gnome launcher and put this command in it,
and call it an app, it does nothing. If I call it a terminal
app, a terminal window blinks for an instant and then nothing
happens. If I make a script I own to run this command, and
run the script from the launcher, same thing. If I make a
script in /usr/local/bin owned by user "somebody" to run this
command, and run that script from the command line, it works.
If I run that script from the launcher, nothing happens.
I searched these forums and there are lots of notes about
using "gksudo" or some similar name instead of just "sudo"
to run a sudo command from a gnome desktop, but none of these
programs exist in my RedHat system. Can somebody tell me if
I really need this "gksudo" thing and why the launcher won't
just run a command that a command window will run, or other
suggestions what I am doing wrong. (I tried various things
like trying to get the script to write to a log file (echos
do get written there, so permissions are OK), making sure the
/usr/local/bin script sets all the needed environment variables,
etc; I'm pretty sure these things are not the problem.)
Thanks,
George Reeke
|