Reply
Thread Tools
tz1's Avatar
Posts: 716 | Thanked: 236 times | Joined on Dec 2007
#1
Type "set" in xterm, and you will see lots of environment variables which among other things causes it to use the Hildon fonts and selections.

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?
 
pycage's Avatar
Posts: 3,404 | Thanked: 4,474 times | Joined on Oct 2005 @ Germany
#2
There is a shell script called run_standalone.sh or similar. This does not only exist in the SDK but also on the actual device.
Maybe "run_standalone.sh /bin/sh" when root will give you a shell with all set.
 

The Following User Says Thank You to pycage For This Useful Post:
tz1's Avatar
Posts: 716 | Thanked: 236 times | Joined on Dec 2007
#3
That worked. I just needed to prefix the spectool_gtk with run-standalone.sh in /etc/sudoers and everything worked as expected.
 
Reply


 
Forum Jump


All times are GMT. The time now is 07:43.