|
|
2008-03-04
, 14:59
|
|
|
Posts: 3,404 |
Thanked: 4,474 times |
Joined on Oct 2005
@ Germany
|
#2
|
| The Following User Says Thank You to pycage For This Useful Post: | ||
|
|
2008-03-04
, 17:26
|
|
|
Posts: 716 |
Thanked: 236 times |
Joined on Dec 2007
|
#3
|
Do "sudo gainroot", and all those disappear if you type "set".
Do "sudo xxx" for any command, it will run with the limited environment.
I ported spectool_gtk, which because it uses libusb must be run as root. So the path is in /etc/sudoers, but when it runs it uses the default GTK fonts, colors, etc. If I ssh in, I get all the environment variables.
Some of the values:
DEFAULTGTKTHEME='default'
DEFAULTMBTHEME='default'
DISPLAY=':0.0'
GTK2_RC_FILES='/home/user/.osso/current-gtk-theme:/home/user/.osso/current-gtk-key-theme'
So how do I run it as root WITH all of these variables set as if I logged in via a shell?