root apps running on X under regular user??
Is there a way to run a root application (GUI port scanner etc...) under X while not restarting X under root?
I don't mean KDE or Gnome Apps that allow you to enter roots password while still running X as user. This doesn't work: brandon@localhost: startx Open xterm on /dev/pts/1 brandon@localhost: su password: root@localhost: guarddog & (or any other GUI app that needs Root priv's) I get a can't open :0 and/or a invalid MIT_MAGIC_COOKIE_1 I also use xhost +localhost to remove the can't open display :0 Thanks A Slacker |
I've wondered that myself.
I started out with command line Unix years ago, so I'm not afraid of doing things via konsole or xterm.... but sometimes I wish I could figure out how to do some things graphically without having to log out and log back in again as root. |
Check out PAM. It does exactly what you're looking for, only it does ask for the root password before it starts the program for security. Dropline has it setup by default and I don't believe it would be too hard to setup. Basically after creating a couple files you move an executable to /usr/sbin and create a link of the same name of the executable in /usr/bin that points to a program called consolehelper. I know this explanation doesn't make too much sense but I do know PAM works for me. :)
|
If you're talking about X apps, then you can force any of them to run as root yet in your X session. For apps listed on the KDE menu, go to Settings > Configure Panel > Menus tab > Edit K Menu. Then select the app you want to run as root and edit the "Run as different user" box. For desktop shortcuts, right-click on the shortcut, select properties, then the execute tab, and edit it there. From a console, you could use the "sudo appname" command, but you'd need to edit /etc/sudoers probably. Not sure how KDE/Gnome does it internally. Easiest way is probably to just place a shortcut on your desktop.
|
All times are GMT -5. The time now is 04:11 AM. |