problem regarding setting DISPLAY env variable and hostname
keramida at ceid.upatras.gr
Thu Feb 23 09:09:42 PST 2006
On 2006-02-23 08:38, Rob <rob at roblytle.org> wrote:
> > On 2006-02-22 13:07, Rob <rob at roblytle.org> wrote:
> > > So now Xorg does not give errors on startup or shutdown like the
> > >
> > > > > bad display name "xenon:0" in "remove" command or
> > > > > bad display name "xenon:0 in "list" command
> > >
> > > But when not setting the DISPLAY variable explicitely anywhere I still
> > > get the error: "out of display lists" upon starting the program I want
> > > from xterm
> > >
> > > But then setting DISPLAY=xenon:0.0 export DISPLAY and then executing
> > > the program then gives the error:
> > >
> > > "Can't open display: xenon:0.0" so I guess I am back to square one.
> > >
> > > Maybe I should call it a day and rest, haha.
> > Just a wild guess, since I don't see why you should have problems
> > running programs like:
> > Can't open display: xenon:0.0
> > Are you running X11 as a plain user and having problems to run programs
> > *after* using su(1) to become root or does this happen for all users in
> > all terminals?
> Hi Giorgos,
> I am trying to run a program from xterm as a normal user. However,
> when su'ing in xterm, I am unable to run any programs. Then I get the
> "Xlib: connection to ":0.0" refused by server
> Xlib: No protocol specified
> Error: Can't open display: :0.0
That's ok. When you use su(1) to become root, you no longer have
permission to open programs on the display of the X server opened
by the plain user.
> setting for csh as root: setenv DISPLAY xenon:0.0 then gives the error message:
> _XTransSocketINETConnect() can't get address for xenon:6000: hostname nor server name provided, or not known
> Error: Can't open display xenon:0.0
Open another xterm, from the X11 session of the plain user, and run:
$ xhost +localhost
Then you'll be able to `connect' by running as root:
xenon# setenv DISPLAY localhost:0
> I seem to remember never being able to su in xterm and be able
> to run any programs no matter what combination of settings I
> have used.
That may be true, depending on the version of X11 that you are
running, the current operating system and the setup of the X11
sessions. I can't tell what you had done, since I wasn't there...
> I also think that the error messages might have been different
> but I am starting to lose track of the error messages for
> combinations of settings for hostname, DISPLAY, etc. I
> probably need to start putting all of this down on paper so I
> can find any patterns.
Sure. Keeping notes is always a good idea :)
More information about the freebsd-questions