?
Solved

Problems exporting the X display to a client terminal

Posted on 2008-11-19
15
Medium Priority
?
1,490 Views
Last Modified: 2012-05-05
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?
0
Comment
Question by:jazzki
  • 7
  • 4
  • 2
  • +1
15 Comments
 
LVL 19

Assisted Solution

by:jools
jools earned 400 total points
ID: 22999806
Have you run `xhost +`?

Check the man page before you run it, you may want a more secure option.
0
 

Author Comment

by:jazzki
ID: 22999833
I have xhost +'d the client, not the server.
0
 
LVL 19

Accepted Solution

by:
jools earned 400 total points
ID: 22999855
sorry, I misread the Q.

Anything in the logs?
0
NEW Veeam Agent for Microsoft Windows

Backup and recover physical and cloud-based servers and workstations, as well as endpoint devices that belong to remote users. Avoid downtime and data loss quickly and easily for Windows-based physical or public cloud-based workloads!

 
LVL 7

Assisted Solution

by:macker-
macker- earned 240 total points
ID: 23000845
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.
0
 
LVL 40

Assisted Solution

by:omarfarid
omarfarid earned 160 total points
ID: 23000858
if you run

echo $DISPLAY

what do you get?

Try

DISPLAY=workstation1:0.0 ; export DISPLAY
0
 

Author Comment

by:jazzki
ID: 23003717
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.

0
 
LVL 40

Assisted Solution

by:omarfarid
omarfarid earned 160 total points
ID: 23003798
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?
0
 

Author Comment

by:jazzki
ID: 23004222
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"
0
 
LVL 19

Assisted Solution

by:jools
jools earned 400 total points
ID: 23004777
are they on the same subnet? does a route need to be added?
0
 

Author Comment

by:jazzki
ID: 23005238
Yes, they are on the same subnet
0
 

Author Comment

by:jazzki
ID: 23016326
Anything....anyone?
0
 
LVL 19

Assisted Solution

by:jools
jools earned 400 total points
ID: 23016518
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 :-)]

0
 

Author Comment

by:jazzki
ID: 23035040
1.  I have typed in an "abridged version" of the output. FYI, I am doing channel bonding on 4 channels.

     bond0:
              inet addr: 192.168.1.1   Bcast:192.168.1.255   Mask: 255.255.255.0
     eth0:
              UP BROADCAST RUNNING SLAVE MULTICAST
     eth1:
              UP BROADCAST RUNNING SLAVE MULTICAST
     eth2:
              UP BROADCAST RUNNING SLAVE MULTICAST
     eth3:
              UP BROADCAST RUNNING SLAVE MULTICAST

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
192.168.1.0         *           255.255.255.0       U              0                0               0        bond0
169.254.0.0         *           255.255.0.0           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

7.
Trying 102.168.1.5....
telnet: connect to address 192.168.1.5: 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 (192.168.1.5) to the server(192.168.1.1)

8. <user>@192.168.1.1's password:
0
 

Author Comment

by:jazzki
ID: 23035667
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.
0
 
LVL 7

Assisted Solution

by:macker-
macker- earned 240 total points
ID: 23047928
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.
0

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Little introduction about CP: CP is a command on linux that use to copy files and folder from one location to another location. Example usage of CP as follow: cp /myfoder /pathto/destination/folder/ cp abc.tar.gz /pathto/destination/folder/ab…
SSH (Secure Shell) - Tips and Tricks As you all know SSH(Secure Shell) is a network protocol, which we use to access/transfer files securely between two networked devices. SSH was actually designed as a replacement for insecure protocols that sen…
Connecting to an Amazon Linux EC2 Instance from Windows Using PuTTY.
How to Install VMware Tools in Red Hat Enterprise Linux 6.4 (RHEL 6.4) Step-by-Step Tutorial
Suggested Courses
Course of the Month14 days, 12 hours left to enroll

840 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question