LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   cannot connet to X server (https://www.linuxquestions.org/questions/linux-newbie-8/cannot-connet-to-x-server-474141/)

cc-aero 08-15-2006 02:28 PM

cannot connet to X server
 
Greetings All,

I am experiencing a newbie problem with my SuSE SLES10 installation. When I ssh into a remote host (SGI IRIX 6.5.24) and attempt to run an application with redirected input I get the following error:

Can't open display

I have already tried xhost +. If I ssh into another SLES9 machine, the redirected input works as normal.

dannystaple 08-15-2006 02:34 PM

What is the DISPLAY environment variable set to on the SGI machine?

I presume (this is just a sanity check) that you are using -X on the ssh command line.

Danny

cc-aero 08-15-2006 02:49 PM

I am using

ssh -X <SGI-workstation>

Also, On the SGI workstation I have set the DISPLAY env variable by hand to <SLES10-workstation>:0.0

Chet

dannystaple 08-17-2006 04:59 PM

Quote:

I have set the DISPLAY env variable by hand to <SLES10-workstation>:0.0
That will be your problem then. When you use -X, the ports are forwarded, and the return path is done via ssh. Actually having the hostname/ip for the X server will not work, as that will be going via the firewalled route.

You should not be setting the DISPLAY by hand, and should probably end up with a display variable that is something like "localhost:xx.0" - where xx is some number (I often see something between 10 and 12).

Danny

cc-aero 08-18-2006 10:35 AM

If I log in and try to run yast I get:

/root# ssh -X <SLES-9-workstation>
/root# yast2
y2controlcenter: cannot connect to x server <SLES-10-workstation>:0.0

but if I set the display:

/root# setenv DISPLAY localhost:10.0
/root# yast2

the Yast gui runs on the remote host just fine. Is this normal behavior? If I repeat the process again, this time using ssh without the -X, I cannot run no matter what I set the display to.

Chet

dannystaple 08-19-2006 05:31 AM

Without the -X you are not forwarding anything, so I would not expect that to work.

With the -X, the display is being forwarded to a local port - this is what SSH port forwarding is all about. So you would expect the display variable on the machine you are connecting to, to have a value with localhost:10.0, as that is referencing the forwarded port.

Where is the display being set to <SLES-10-workstation>:0.0? This may be a profile script overriding the value the X-forwarding should give, which is probably localhost:10.0.

Danny


All times are GMT -5. The time now is 07:46 AM.