[PyKDE] Run program as root

Hans-Peter Jansen hpj at urpla.net
Tue Feb 14 12:33:25 GMT 2006


Am Dienstag, 14. Februar 2006 09:45 schrieb Patrick Stinson:
> Even though this is more of a python question than a pykde question,
>
> #!/bin/sh
>
> # wrapper shell script
> sudo /path/to/python $@

This will only work with sudo configured to not ask for a password. 
Otherwise you need to run it in a terminal..

> On 2/13/06, Tina Isaksen <tina at bestemselv.com> wrote:
> > Noob question:
> > As a learning project I'm making some system tool frontends for kde
> > (using Qt), but for the life of me I can't find how to make a
> > script run as root (superuser)... and prompt for the root password
> > first of course?

Try running kdesu "ps auxww" to get a nice password request UI..

Pete




More information about the PyQt mailing list