[maemo-developers] Running GUI applications as root

From: Tim Teulings rael at edge.ping.de
Date: Sun Sep 9 22:17:19 EEST 2007
Hello!

[changed subject to a better one for this special topic, that does not 
have anything in special to do with the wlan API]

> If anyone has better way to do that, I'm all ears.

You can use a chmod +s on your binary in request after you did a make 
install to your temporary packaging directory in your debian packaging 
rules file. Using dh_fixperms -X <usr/bin/<your binary> the debian 
packaging mechnaism set the owner and group to root but does not remove 
the s-bit. The resulting installed file thus will have the sticky bit 
set. The problem however is, that this will not work for Gtk programs 
(and I'm not a gtk program, I just initialize it and create some widgets 
to read out the theming information) since gtk programs will not run 
with root rights. The is a assertion that will abort the application.

So I switch to using sudo and enhance sudoers in postinst and prerm. 
This works, too. But is is possible that I should use run-standalone.sh 
to start my application? If I start it without it as root (via ssh 
root at localhost) it crashes somewhere in the initalisation code (I have 
to find out the exact place), if I start it with run-standalone.sh it 
works like a charm.

-- 
Gruß...
        Tim


More information about the maemo-developers mailing list