TheShaner
08-23-2007, 10:01 PM
Hey all,
I'm looking for a GUI application that I can use to su to root while running Xfce (like a RunAs that Windows has). I don't want to have to open up a terminal just to use the su command on an app or file.
So if anyone knows of one, I'd appreciate it. That or a way to pass a password to the su command. I have a bash script that I tries to open files locked to root while running on another user. This other user is an admin account that was created to stay away from working as root, so that's why it's ok to have this script opening up these files.
So far I have:
#!/bin/bash
# su to root on the file specified
su -c "mousepad $1" root
It works great on command line since I can then just type in the password, but if I open up a file using the script (non-terminal use), I don't get any prompt for password. I tried piping the password in with an echo and it actually puts the password there but it doesn't register and fails.
-Shane
I'm looking for a GUI application that I can use to su to root while running Xfce (like a RunAs that Windows has). I don't want to have to open up a terminal just to use the su command on an app or file.
So if anyone knows of one, I'd appreciate it. That or a way to pass a password to the su command. I have a bash script that I tries to open files locked to root while running on another user. This other user is an admin account that was created to stay away from working as root, so that's why it's ok to have this script opening up these files.
So far I have:
#!/bin/bash
# su to root on the file specified
su -c "mousepad $1" root
It works great on command line since I can then just type in the password, but if I open up a file using the script (non-terminal use), I don't get any prompt for password. I tried piping the password in with an echo and it actually puts the password there but it doesn't register and fails.
-Shane