[NCLUG] Display variables

Matt Taggart matt at lackof.org
Sun Dec 17 13:08:11 MST 2000


Prescott Oelke writes...

>  Hi there,
> 
>  I had a problem installing Myth II and checked the FAQ. The FAQ said to use
> unset DISPLAY and run the installer in text only mode. Myth II installed
> fine but ever since I did this I can't get a lot of stuff (netscape for
> example) to work at all if I'm not root.

It sounds like root owns the $DISPLAY so you're logged in as root(or ran 
startx as root). This is generally a bad idea, always log in to X as a mortal 
and su when you need to be root. If you need to run X apps as other users then 
you'll need to grant them permission to the $DISPLAY. You can do this with 
xauth(the proper way) or xhost(the insecure, but easy, way). Also if you just 
use sudo then the display stuff gets taken care of automagically.

> So my question is, How do I "reset"
> the DISPLAY variable?

What Mark said. $DISPLAY is set to "hostname:#.#" where,

- hostname is the host to display on
- the first # is the instance of X to display on(some systems have mulitple 
video cards and input devices so multiple people can use them at the same time)
- the second # is the screen of that instance of X for people with multiheaded 
setups.

Most of the time you'll only need "export DISPLAY=:0".
 
HTH,

-- 
Matt Taggart
matt at lackof.org





More information about the NCLUG mailing list