xterm xt error cannot open display

General support questions
phil.e
Posts: 33
Joined: 2018/02/13 20:28:14

xterm xt error cannot open display

Post by phil.e » 2018/03/06 16:58:11

I've got a user, entering the following command:

xterm -display random.hostname

Getting the following error:

xterm xt error: cannot open display

This started happening after applying updates last night to openssh and several x11/xorg packages.

They're running CentOS 6.4. I tried rolling back the updates from last night but that failed too. Yum couldn't successfully downgrade to the previous version. The updates were for CentOS 6.9, but I didn't try to apply every available update. I'm wondering if it maybe knocked things out of sync to have packages from both 6.4 and 6.9 running on the same system. :?

User avatar
TrevorH
Forum Moderator
Posts: 23458
Joined: 2009/09/24 10:40:56
Location: Brighton, UK

Re: xterm xt error cannot open display

Post by TrevorH » 2018/03/06 17:12:17

First, no-one, anywhere should run 6.4 as it's more than 5 years old and has enough security holes in it to drive a fleet of trucks through... so you did the right thing by updating to 6.9 even if you have some teething problems. You should however, apply all updates and not cherry pick as new updates are only tested on top of all older ones.

This error is quite common. How is this user connecting to the system to run xterm? Is this being used via ssh X11 forwarding or are they at the local console? If at the local console, have they used su/sudo to run something? If over ssh then have you made sure the xorg-x11-xauth package is still installed? In either case, what do you see if you run echo $DISPLAY at a terminal before you try to invoke xterm?
CentOS 5 died in March 2017 - migrate NOW!
Full time Geek, part time moderator. Use the FAQ Luke

phil.e
Posts: 33
Joined: 2018/02/13 20:28:14

Re: xterm xt error cannot open display

Post by phil.e » 2018/03/06 17:21:12

echo $DISPLAY, as that user, replies with DISPLAY: Undefined variable (as root, I just get a blank reply)

phil.e
Posts: 33
Joined: 2018/02/13 20:28:14

Re: xterm xt error cannot open display

Post by phil.e » 2018/03/06 17:23:24

Sorry, I didn't really answer your other questions:

Their desktop has gnome installed - they are opening a local terminal window and attempting to xterm to another machine.

The xorg-x11-xauth package IS installed.

User avatar
TrevorH
Forum Moderator
Posts: 23458
Joined: 2009/09/24 10:40:56
Location: Brighton, UK

Re: xterm xt error cannot open display

Post by TrevorH » 2018/03/06 17:37:01

echo $DISPLAY, as that user, replies with DISPLAY: Undefined variable (as root, I just get a blank reply)
Can you cut and paste the output from the terminal so I can see exactly what happened? I've never seen it say undefined variable before - for example if I run `echo $DISPLAY` on an el6 box that I'm using via ssh I get "localhost:10.0" back but if I `echo $DISPLAYNNN` to make it use an undefined variable, it just echoes a blank line.
attempting to xterm to another machine.
You might want to explain that too as I'm unaware that xterm has any remote connection capabilities.
CentOS 5 died in March 2017 - migrate NOW!
Full time Geek, part time moderator. Use the FAQ Luke

phil.e
Posts: 33
Joined: 2018/02/13 20:28:14

Re: xterm xt error cannot open display

Post by phil.e » 2018/03/06 17:48:39

This machine is on an offline network so I can't directly copy and paste, but what I posted is exactly what the error was - I'll re-create it here:

hostname> echo $DISPLAY
DISPLAY: Undefined variable

On my own machine which is not having this problem, I get:

hostname> echo $DISPLAY
:0.0

I'm probably misunderstanding the intent of the xterm program then. The user is attempting to open several xterm connections and failing with those errors. I must have incorrectly assumed he was trying to make remote connections.

phil.e
Posts: 33
Joined: 2018/02/13 20:28:14

Re: xterm xt error cannot open display

Post by phil.e » 2018/03/06 18:06:25

Hmm, my error message might be misleading.

I did some more testing - on my own machine, if I run that "echo $DISPLAY" command locally, I get ":0.0", but if I SSH to somewhere else and run that command, I get the "DISPLAY: Undefined variable" error.

When I ssh to that user's workstation, su - to his username and run the command, I get the undefined variable message. I'll have him run the command locally and see if he gets the same response.

tunk
Posts: 377
Joined: 2017/02/22 15:08:17

Re: xterm xt error cannot open display

Post by tunk » 2018/03/06 19:24:33

Are you using ssh with or without the "-X" option? E.g.:
ssh -X user@remote.server
And is that "somewhere else" running CentOS?

phil.e
Posts: 33
Joined: 2018/02/13 20:28:14

Re: xterm xt error cannot open display

Post by phil.e » 2018/03/06 20:53:04

Yes, to both.

I am using the -X option and everything in the environment is either CentOS 6.4 or 6.9

The user just verified for me that running "echo $DISPLAY" locally got him responses of :0.0, :0.1, :0.2, depending on which screen he was on

User avatar
TrevorH
Forum Moderator
Posts: 23458
Joined: 2009/09/24 10:40:56
Location: Brighton, UK

Re: xterm xt error cannot open display

Post by TrevorH » 2018/03/06 22:59:21

Is ipv6 disabled?
CentOS 5 died in March 2017 - migrate NOW!
Full time Geek, part time moderator. Use the FAQ Luke

Post Reply