tags:

views:

718

answers:

3

hey,

I connect to a solaris (10) server through SSH from my linux machine.

However, when I attempt to open another terminal using " xterm" , then it does not work.

I set the DISPLAY env variable to 127.0.0.1:0.0, but it gives the following error:xterm Xt

error: Can't open display: 127.0.0.1:0.0

Please suggest a solution to rectify this.

Thanks

-Mike

A: 

Set the display to your linux IP address, not localhost.

127.0.0.1 is localhost : therefore on the Solaris server, it's the server itself.

philippe
+1  A: 

That's the address of the X server on the target machine. You need to address the X server on the client machine on which you're working. The easiest way is to just use ssh -X or -Y, (see man ssh(1)) as

client: ssh -Y solaris

in order to connect to the remote machine; you need login info too

This just sets up an X connection, tunneled through ssh.

Otherwise, you can do it by hand as

client:
$ echo $DISPLAY
client:3:4

_remember it's not always 0.0_

$ xhost +solaris

You have to allow connections from the remote machine

$ ssh solaris

sets up a remote shell, you still need ssh login info

solaris:
$ export DISPLAY client:3.4

make sure its the server on 'client' you're using

$ xterm

This should now give you a 'solaris' xterm window on 'client'

Charlie Martin
Thanks !. That works with -Y option.
Thought it would; I use it all the time to work on my Solaris box from my Mac desktop. Annoyingly, there are versions of ssh around that want the -X argument instead; keep that in mind.
Charlie Martin
+1  A: 

As Charlie mentioned, use ssh -X hostname when connecting.

If all else fails enter xhost + on your remote machine. Hope that helps.

Eric Wendelin