Linux - NewbieThis 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!
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
I had found many posts which talked about this problem. I also had ever tried all methods they mentioned, but my problem is still there. I write it down here and hope to get your help. Thank you!
I am using a MAC OS X 10.6 ssh a remote redhat server. I hope to see X of redhat on my own MAC. Below is what I've done:
'MAC_ip' stands for my mac; 'redhat_ip' stands for redhat server.
1) ssh to redhat server
2) change to root
3) type command: DISPLAY=MAC_ip:0.0
4) type command: export
5) Back to MAC
6) change to root
7) type command: xhost +Redhat_ip
8) vim /etc/ssh_config, add X11Forwarding yes
9) Back to redhat, type: xclock
I got below message:
Error: Can't open display: MAC_ip:0.0
I also tried some methods to login as others suggested:
% ssh -X user@redhat_ip
Warning: untrusted X11 forwarding setup failed: xauth key data not generated
Warning: No xauth data; using fake authentication data for X11 forwarding.
Last login: Thu Mar 31 08:59:46 2011 from MAC_ip
Somebody also suggested to use 'ssh -Y', although I don't quite understand it, I also tried.
% DISPLAY=MAC_ip:0.0 ssh -Y user@redhat_ip xclock
connect MAC_ip port 6000: Connection refused
Error: Can't open display: localhost:10.0
This is really bother. Please advice. Thank you!
Last edited by doublealice; 03-31-2011 at 01:46 PM.
doublealice, you are yet another among the legions of people confused about the X11 client-server model. Don't be insulted, it fools almost everyone as they first approach it.
I hope to see X of redhat on my own MAC
This will never happen (except perhaps using a remote desktop tool). What you probably mean is that you want the applications running on your remote Redhat host to use the X server running on your local Mac.
To do so is relatively easy. First, do as themanwhowas suggests, and make sure X11 forwarding is enabled on the Redhat host. Next, from the commandline on your Mac, with X11 running on the Mac:
If an xterm console appears on your local Mac, then X forwarding is working. The xterm is running on the Redhat host, but is displaying its output and receiving keyboard and pointer input from the X server running on your Mac. What's more, X11 is being securely tunneled through the ssh session, and no compromise of the server is required by using the likes of xhost.
As chrism01 correctly points out, there may be no X11 server on the Redhat server. This is absolutely no obstacle, and is a very common model for management of headless file and database servers.
Did you undo all of the xhost/xauth configuration that you originally tried? My interpretation of the error/warning messages is that they originate there.
Xlib: extension "RANDR" missing on display "localhost:10.0".
These messages say that the application expects certain optional functionality in the X server, and has failed to find it. The RandR extension allows the client application to query the server about some of its hardware capabilities, and is not universally supported. Evidently, there is also some issue with support combined with Xinerama. I don't know of any sure-fire remedy, especially since there is a driver-specific aspect to this matter. Does the same version of firefox running on the local host exhibit the same complaint? Firefox is a bit of a rascal when run on a remote host, as it will try to piggy-back onto an existing instance that is running on the X server host, unless started with the -no-remote option. Perhaps there is some interplay there.
Rod, I am new to a linux server. Thank you so much for explaining the problem to me. The reason I started up the firefox from the remote server was I needed to check if apache server worked on localhost well or not. Probably it is not a good way to do so. Anyway, I've learned a lot from you and may keep asking questions in the future. Thanks!
Is the RandR extension builtinto the iMAC X server? If not, then the messages are likely to keep appearing. It may also be (speculation only here) that you are trying to get the X server to do something which is in conflict with a setting imposed by the iMAC desktop. Do those errors happen when you run any old X application, or only when you try to run a desktop on another desktop?
RHEL does not automatically come with xorg-x11-xauth installed. This must be installed for X11 forwarding to work:
yum install xorg-x11-xauth
Discovered this using the -v option to ssh, making it verbose.
Last edited by chuck_theobald; 06-06-2012 at 12:03 PM.
Thank you chuck_theobald. The missing package on RHEL was what fixed this for me. I realize this thread is older, but for anyone else out there trying to tunnel X through multiple hops and hissing "Cannot open display" on a RHEL Client 2 or 3 hops away it's easy to get bogged down in the intricacies of SSH forwarding, when actually, it might just be this missing package. After I'd added the xorg-x11-xauth package I was able to simply ssh -Y <hop1>, then ssh -Y <hop2> and run the app, with the display coming back to my laptop perfectly.