Latest LQ Deal: Linux Power User Bundle
Go Back > Forums > Linux Forums > Linux - Newbie
User Name
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!


  Search this Thread
Old 05-26-2009, 12:21 PM   #1
LQ Newbie
Registered: May 2009
Posts: 2

Rep: Reputation: 0
can't open display...

Hi folks,
I read through some of the posts and haven't been able to fix the "can't open display problem. Running a re-installed rhel5.2 linux version. Can't open a display when 'ssh -X <sgi machine>' or 'ssh -Y <sgi machine>'
'xhost +' enabled on rhel5.2, DISPLAY set on client, /etc/ssh/ssh_config has X11TrustedForwarding set to 'yes'. Not sure what else to try.
Old 05-26-2009, 01:53 PM   #2
Registered: Jul 2007
Location: Scunthorpe, UK
Distribution: Ubuntu 8.10; Gentoo; Debian Lenny
Posts: 961

Rep: Reputation: 69
What specifically are you doing? Can you walk us through it?
Old 05-26-2009, 02:18 PM   #3
LQ Newbie
Registered: Aug 2004
Location: NY
Distribution: Ubuntu,Red Hat,Centos 5
Posts: 29

Rep: Reputation: 0
Just wondering, are both these machines red hat boxes? It sounds like you might have the config files correct, but yes please provide a little bit more information on the exact problem and the OSs involved.
Old 05-27-2009, 08:17 AM   #4
LQ Newbie
Registered: May 2009
Posts: 2

Original Poster
Rep: Reputation: 0
Some clarification: I have a linux box on my desk running RHEL 5.2. I 'ssh -Y <SGI box ip address>'. So on the linux box I have 'xhost +' enabled. I run a secure shell to an SGI box. I am able to connect and immediately set my display using the tch, 'setenv DISPLAY <ip_address of my linux box:0>' I get the can't open display message. This is some sort of configuration or xauth issue. I already set 'X11Forwarding' to yes and 'X11TrustedForwarding' to yes in /etc/ssh/ssh_config' to yes even though I don't have to when using 'ssh -Y' from the command line. I copied the xauth from my linux box to the remote SGI box using the command 'xauth extract - $DISPLAY | rsh <remote machine> xauth merge -'. I still get the can't open display for just trying to open an xterm. This used to work. RHEL 5.2 was re-installed on my linux box after faulty hard drive removed and a new one was installed. There must be something I need to set up on the SGI remote side, since I can open an xterm when connecting to another linux box running RHEL 5.2.
Old 05-28-2009, 06:27 PM   #5
LQ Newbie
Registered: Apr 2009
Distribution: gentoo, xubuntu, opensuse, solaris 10, opensolaris, centos
Posts: 12

Rep: Reputation: Disabled
On your desktop, are you running gdm?
If so, is it set to deny tcp access to the xserver? (by default it is)
Also, is it possible a firewall may be blocking access to you x server?
Old 05-28-2009, 06:46 PM   #6
Registered: Mar 2009
Distribution: CentOS - Ubuntu - Debian
Posts: 83

Rep: Reputation: 27

From what i have worked the configuration steps are:

On the remote box:
- Enable X11Forwarding on /etc/ssh/sshd_config
- Be sure to restart the sshd daemon to the new configuration is applied.
- The firewall on the SGI box has to allow connections via local interface
(haven't seen an SGI box en years so i don't remember the interface names)
so check your firewall rules also.
- The box needs an xauth command in the path so the ssh service can
negotiate the X authentication.

On the client, enable X11 on the /etc/ssh/ssh_config (not sshd_config)
o start the connection with
ssh -X user@remotebox

When logged, the DISPLAY variable on the remote machine should be
automatically set to localhost:10.0 (could be 11:0,12.0 etc. if other
people is logged), there is no need to set the DISPLAY variable or
use the xhost command, when using ssh+x11 forwarding,
all traffic is sent through the ssh tunnel.

In order to debug, you have to check:
- Locally, from the same terminal you should be able to
start a new X app (xeyes, xterm etc.), you local
DISPLAY variable should be ok if you can do that.
- After login to the remote box the DISPLAY variable
should be localhost:10.0 or similar, that confirms that
sshd is setting up the X11 forwarding.
- If the DISPLAY variable is set correctly but you still
can't start applications check your firewall.

Best regards,


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
export display and Gtk-WARNING **: cannot open display: zimma Linux - Server 0 04-24-2009 02:51 AM
xterm -display remote:0.0 Can't open display - xterm from tru64 to debian 3.1 loopy69 Linux - Software 2 04-01-2008 06:54 PM
Cannot open display Styx Linux - Software 1 05-17-2006 11:56 AM
Cannot open display ::eboye:: SUSE / openSUSE 2 11-19-2005 07:45 AM
Cannot open Display ferreter Linux - General 1 08-17-2003 04:23 PM > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 06:51 PM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration