bsyuni Posted September 9, 2004 Report Share Posted September 9, 2004 (edited) I have one laptop and one desktop computer. Tp is my laptop and res3 is my desktop. I have been used tp as a terminal to connect res3 using ssh. I was able to run any X based program in res3 form tp. Recently I have some problem and I tried something to fix it but it dose not work. So far connection using ssh is fine but I can not run X based program form tp. The error message is as follows; [yuni@tp yuni]$ ssh -X yuni@res3 yuni@res3's password: [yuni@res3 yuni]$ emacs _X11TransSocketINETConnect: Can't get address for localhost emacs: Cannot connect to X server localhost:10.0. Check the DISPLAY environment variable or use `-d'. Also use the `xhost' program to verify that it is set to permit connections from your machine. And xhost does not work. [bsyuni@tp bsyuni]$ xhost +res3 res3 being added to access control list [bsyuni@tp bsyuni]$ ssh yuni@res3 yuni@res3's password: [yuni@res3 yuni]$ emacs _X11TransSocketINETConnect: Can't get address for localhost emacs: Cannot connect to X server localhost:10.0. Check the DISPLAY environment variable or use `-d'. Also use the `xhost' program to verify that it is set to permit connections from your machine. [yuni@res3 yuni]$ Thank you in advance. Edited September 9, 2004 by bsyuni Quote Link to comment Share on other sites More sharing options...
Steve Scrimpshire Posted September 9, 2004 Report Share Posted September 9, 2004 You need to do xhost +res3 on the tp machine and xhost +tp on the res3 machine. Quote Link to comment Share on other sites More sharing options...
bsyuni Posted September 9, 2004 Author Report Share Posted September 9, 2004 I gave them xhost command as you mentioned above but I still have a same error message. I can connect tp to k2 which is another machine using ssh and run X based program. Therefore tp is fine but I do not have any idea what happen in res3 machine. It just suddenly happen. again. Quote Link to comment Share on other sites More sharing options...
ac_dispatcher Posted September 11, 2004 Report Share Posted September 11, 2004 Im not at my computer right now but if I remember correctly X11 fowarding needs to be turned on. Found this on google: Before establishing the ssh connection the xserver must be started and the environment variable DISPLAY must be set for ssh. $ DISPLAY=localhost:0.0$ export DISPLAY $ ssh -Y remotehost or $ DISPLAY=localhost:0.0 ssh -Y remotehost The parameter -Y enables trusted X11 Forwarding. This is available since OpenSSH 3.8. If you have an older version of ssh you will have to use -X. Make sure you're not starting ssh with the parameter -x (lowercase). This disables X11Forwarding. Check that X11Forwarding is not disabled in the openssh client configuration. The configfiles are by default ~/.ssh/config and /etc/ssh_config. The file in the home directory overrides settings in the global one. The configfile is split into various sections starting with "Host wildcard". The section applies to all hosts where wildcard matches the hostname. If this section contains an entry "ForwardX11 no" then X11Forwarding is disabled. To enable it change the entry to: ForwardX11 yes I ripped the whole thing from a web site try some of that Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.