Execute a process as a specific user (OT)

Maurix maurix78_remove_this_ at wanadoo.es
Sat Jun 14 06:36:11 EDT 2003


Hi, thanks a lot,
I solved the problem in a little different form:
The problem is not that root is not authorized but that
can't find .Xauthority file for the user's server, the
solucion is to export HOME="/home/user/" so the server can
locate the correct file.

Bye.
Maurix

Zac Jensen wrote:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
> 
> On Saturday 14 June 2003 03:33 am, Maurix wrote:
> 
>>Hi,
>>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
>>me.
> 
> 
> It is an X server issue, which is easily solved, while logged in as the user 
> you are running the Xserver as... just run xhost +localhost ; or xhost 
> +<owner-user> +root   either of these will solve your issue.  A more general 
> but less safe (unless you have a trustworthy firewall) is to run xhost +   
> which will allow all clients without trouble.
> 
> - -Zac
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG v1.2.2 (GNU/Linux)
> 
> iD8DBQE+6vAKV3L7YsSif1URApqKAJ9u5jHwe4A6qJYBiT+nLlCaVarsdgCgh2cK
> WsrlVDkyJXxhZg1so6K2JQA=
> =LP4M
> -----END PGP SIGNATURE-----
> 
> 





More information about the Python-list mailing list