Problems exporting the X display to a client terminal

I keep getting the error "Error Can't open display: workstation1" whenever I try to run an X display via something like xclock. I have a RHEL 5 server with SE Linux turned off. I am trying to display X to a remote client workstation that is running RHEL 5 WS. I have "xhost +"ed the workstation and I have issued the command, "export DISPLAY=workstation1:0.0" . I have ssh'd into the server with and without the -X option. Either way, I get the "Warning: no auth data" warning. I have used the "gdmsetup" command on the server to allow X forwarding and I have confirmed this in the /etc/sshd/sshd_config file; "X11Forwarding yes". I did a netstat and confirmed that tcp port 6000 is open and running Xorg. My firewalls are turned off. What else am I missing?
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Julian ParkerSenior Systems AdministratorCommented:
Have you run `xhost +`?

Check the man page before you run it, you may want a more secure option.
jazzkiAuthor Commented:
I have xhost +'d the client, not the server.
Julian ParkerSenior Systems AdministratorCommented:
sorry, I misread the Q.

Anything in the logs?

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
10 Tips to Protect Your Business from Ransomware

Did you know that ransomware is the most widespread, destructive malware in the world today? It accounts for 39% of all security breaches, with ransomware gangsters projected to make $11.5B in profits from online extortion by 2019.

Just to clarify, you ran the "xhost +" command on the client, or on the server?

Specifically, you need to make sure the client is running a valid X server on 0.0, and is accepting connections from the server.

The other question I would have is if DNS is working properly, etc.

From a troubleshooting standpoint, have you tried doing a "telnet workstation1 6000"?

And lastly, to confirm, you aren't running a host-based firewall on either side?

Tunneling X over SSH should eliminate any firewall issues.  This really sounds like a client auth issue, or an inability for the session to be tunneled correctly.  It sounds like you've checked over most of the possible issues.  While it seems like it should be a complex issue, I'd suspect it's actually a simple issue, that's slipping thru somehow.  The telnet test should give significant insight, but I'm hoping this is actually an issue of xhost being run on the wrong side.
if you run


what do you get?


DISPLAY=workstation1:0.0 ; export DISPLAY
jazzkiAuthor Commented:
I've checked the /var/log files and have found no errors related to X display issues. The DISPLAY variable is also being exported properly. When I do an "echo $DISPLAY", it returns "workstation1:0.0". I also confirmed that Xservers are running properly on BOTH the client and server. I also am NOT running any host-based firewall on either side.  I think you are on to something Macker. I tried the telnet command as you suggested and this is what I got:
"Trying 192.168.X.X......
 telnet: connect to address 192.168.X.X: No route to host
 telnet: Unable to connect to remote host: No route to host"

So I suspect this is a DNS issue as you said. Not sure where to go from this point.

are you able to resolve the name to the correct ip address? if you put the ip address rather the name in DISPLAY, do you get the same problem?
jazzkiAuthor Commented:
Yes. It is done staticly, in the /etc/hosts file. Same result whether I use the hostname, "workstation1:0.0" or ip address "192.168.X.X:0.0". "Error: Cannot open display: 192.168.X.X"
Julian ParkerSenior Systems AdministratorCommented:
are they on the same subnet? does a route need to be added?
jazzkiAuthor Commented:
Yes, they are on the same subnet
jazzkiAuthor Commented:
Julian ParkerSenior Systems AdministratorCommented:
I think we need to get back to basics; please provide the following information;

1/ Network listings with ipaddress and network mask of all systems; ifconfig -a
2/ DNS info; cat /etc/resolv.conf
3/ Any firewall configuration; iptables -L
4/ Copies of /var/log/messages and /var/log/secure as attachments.
5/ Routing table information; netstat -r
6/ Network interface setup; mii-tool or ethtool
7/ output from when you type telnet <ip> <port> [where you change ip and port! :-)]
8/ output from when you type ssh <user>@<ip> [and again :-)]

jazzkiAuthor Commented:
1.  I have typed in an "abridged version" of the output. FYI, I am doing channel bonding on 4 channels.

              inet addr:   Bcast:   Mask:

2. search localdomain

3. Chain INPUT (policy ACCEPT)
       target prot opt source destination
    Chain FORWARD(policy ACCEPT)
       target prot opt source destination
    Chain OUTPUT(policy ACCEPT)
       target prot opt source destination

4. There was NOTHING in /var/log/message or /var/log/secure that indicated any display errors, X errors, or network connectivity errors.

5.    Kernel IP routing table
      Dest        Gateway        Genmask        Flags        MSS        Window        irtt        Iface         *        U              0                0               0        bond0         *            U              0                0               0        bond0

6. SIOCGMIIPHY on 'eth0' failed: Operation not supported
    eth1 negotiated 100baseTx-FD flow-control link ok
    eth2 negotiated 100baseTx-FD flow-control link ok
    eth3 negotiated 100baseTx-FD flow-control link ok
    eth4 no link
    eth5 no link
    eth6 no link
    eth7 no link

telnet: connect to address No route to host
telnet: Unable to connect to remote host: No route to host

I get the same error above when trying to connect from the client ( to the server(

8. <user>@'s password:
jazzkiAuthor Commented:
All, I discovered this was my own stupid mistake. I ran the ssh -X command but did not realize that it was unnecessary to "export DISPLAY=" on the command line after sshing in. If I simply ran the ssh -X, and then ran my x program like "xclock", it worked. Otherwise, if I explicitly set the display it failed. I did not know this. Thanks for all your help.
Ah, yes... I'm surprised I/we overlooked that.  SSH sets up its own values for DISPLAY, to tunnel back over, and this was probably stepping on it.  I do think there may be a separate issue present, in that you were unable to telnet to the port, but I'd say that if things are working now, and you don't encounter any further problems, best to leave it as-is.
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today

From novice to tech pro — start learning today.