Re: Root can't run X programs
Once upon a time David Krider said...
> After this:
>
> kriderde@tyrannus:~$ xhost +
> access control disabled, clients can connect from any host
>
> I still get this:
>
> tyrannus:~# export DISPLAY=localhost:0
> tyrannus:~# eroaster
> 28.04.2003 16:48:16.745 ERROR main [Main] An error occured: cannot open
> display
>
> Can anyone tell me why?
Probably because X was started with the "-nolisten tcp" arguments (which
is standard in Debian). When you set DISPLAY to the form
<host>:<display>, you're telling X programs to connect to <host> using
TCP/IP. "-nolisten tcp" tells the X server not to listen for TCP
connections.
Instead, set DISPLAY to just ":0" - this will tell X programs to connect
to the X server via a unix domain socket on the local machine.
I would think it is always preferable to use the form ":0" instead of
"localhost:0", as the unix domain socket will bypass the network stack,
making comms more efficient.
Reply to: