Execute a process as a specific user

Maurix maurix78_remove_this_ at wanadoo.es
Sat Jun 14 11:33:46 CEST 2003

Thanks but... it didn't work!!
Is better if I explain what i'm tring to do,
I want to connect to the X server from the console but the
Xlib say that i don't have the permission if i'm root!
I use the commando of Tkinter: tk=Tkinter.Tk(":0.0")
( ¿¿way if i'm the boss??)
So i tryed to make this making a su to the user fo X server
and it work perfectly!! Now i don't want to depend on "su" program
and i tryied this command, set(e)uid and set(e)grp, but can't connect
to the X-server anyway: client is not authorized
My question is, exist a more elegant way to make this: a script
that show a Tk window from the console, a script that stay in
background for all the time.
I'm afraid that i'm out of theme here because is a problem of
Xservers but, please, if anyone have make somting like this help

Thanks a lot.


Maurix wrote:
> Hi everyone.
> A question for the unix users...
> How can i execute a process as a specific user from a process
> with root privileges?
> i'm doing this now with this command
> os.system("su usuario -c comando")
> Can i make this whitout the "su" command
> Thanks

More information about the Python-list mailing list