Question about "export DISPLAY"

Alex Marandon al-MId880lrZqodnm+yROfE0A at public.gmane.org
Fri May 5 08:27:40 UTC 2006


On Thu, May 04, 2006 at 10:17:31PM -0700, Christopher Browne wrote:
> The case where you might have to "get fiddly" about it is if you log
> in as yourself, and then need to have a session running as root have
> access to that display.  Mumble, mumble, xauth, mumble, "AAAHHHH!!!!",
> thud...
> 
> If the installation needs to run as root, it's best if you can run an
> X session _as root_ so no fighting with MIT Magic Cookies or xauth or
> xhost need get in the way...

Example of xhost usage, avoiding an X session as root :

$ echo $DISPLAY 
:0.0
$ xhost +local:
non-network local connections being added to access control list
$ su -
Password: 
# xeyes 
Error: Can't open display: 
# export DISPLAY=:0.0
# xeyes 
(Funny eyes appear on screen :)
--
The Toronto Linux Users Group.      Meetings: http://tlug.ss.org
TLUG requests: Linux topics, No HTML, wrap text below 80 columns
How to UNSUBSCRIBE: http://tlug.ss.org/subscribe.shtml





More information about the Legacy mailing list