"Cannot connect to X server" whilest telnetting to another UNIX system
Linux - GeneralThis Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.
Notices
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.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
"Cannot connect to X server" whilest telnetting to another UNIX system
From a Fedora Core 1 system terminal window on my gnome desktop, I'm trying to telnet to a Sun UNIX system and run emacs (or any other X-based program). On the Sun, I get "emacs: Cannot connect to X server 10.3.1.40:0.0", but no emacs. The IP address of my Linux system on our local network is 10.3.1.40, so I know DISPLAY is set properly on the Sun, and I've run "xhost +" on the Linux system before telnetting to the Sun, so that's not the problem either.
I'm on a local network in a hospital, and God only knows what the gateway I'm connected to is doing. I have no access to the gateway, and no knowledge other than "it's there and it's probably set to 'Paranoid' mode since we've had so many hacker problems in the past". To confuse things even more (in my mind), I can telnet from one Sun to another and run emacs just fine, it's just the Linux box that's not behaving. So, my question is, what exactly can I ping, probe, stat, cat, or check so I can fix this, or even determine whether it's my problem or a gateway configuration problem? I'm an old, grizzled programmer, but new to this depth of network system administration, so be gentle with me.
Hmmm, It is late and I am no longer thinking as clearly as I should be, but at the moment the easiest apporach to this problem that I can think of is simply to see if we can go around it. When you get a chance you should try to ssh to the box vice telnet. If the remote box will allow you to make a successful ssh session, then you can try using the -X option on ssh, which handles all of the fun off setting X forwarding for you. The command should look like....
ssh -X user@remote_server
Once you log in, try running 'xeyes' or some other X application to ensure that it worked.
Hi,
Make sure to check the "firewall" setup. The X port (I think it is 6000) may be
blocked. Use "iptables -L -nv" to check the firewall setup (and "man iptables").
SSH won't let me get there, and being a brute-force kinda guy, I disabled iptables (using "chkconfig --level 2345 iptables off"), turned off the firewall using redhat-config-securitylevel, and then rebooted the system to make sure that everything was (hopefully) set properly. Still no X-connection was allowed. SHOULD what I did have turned off all protection on the linux side, or is there something else I can try to turn off?
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.