LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Networking (https://www.linuxquestions.org/questions/linux-networking-3/)
-   -   X window on remote machine! (https://www.linuxquestions.org/questions/linux-networking-3/x-window-on-remote-machine-276567/)

UltraSoul 01-11-2005 11:30 AM

X window on remote machine!
 
My pc's IP is 192.168.0.21. And my pc accesses NIS server whose
IP is 133.9.42.12 through a router. The router's static IP is
133.9.42.192. I use the commands as follows:

<1>xhost +
<2>ssh 133.9.42.192 -l Ultrasoul
Ultrasoul's passwd:*******
<3> echo $SHELL
/bin/tcsh
<4>setenv DISPLAY 192.168.0.21:0.0
<5>xtem &
Can not open 192.168.0.21:0.0 display

So I tried to type as follows:
<5> setenv DISPLAY 133.9.42.192:0.0(my router's ip)
<6> xterm &
the Xterm seems to be started at server side.

I wonder if I can access NIS server by using 192.168.0.21.
I can access server by a static ip which is 133.9.42.192,
it is assigned by my network administrator!

Cedrik 01-11-2005 12:12 PM

What is your output when you login with ssh and then type :
echo $SSH_CLIENT

UltraSoul 01-12-2005 05:01 AM

echo $SSH_CLIENT's output
 
I typed echo $SSH_CLIENT

the output is as follows:

::ffff:133.9.42.192 32912 22
133.9.42.192 is my router's outside IP Address.

Can you tell me how to set the variable DISPLAY for get Xwindows in server side to display in my PC.
My pc's IP is 192.168.0.13.

UltraSoul 01-12-2005 05:09 AM

More information!
 
I login the server by ssh. And type commands as follows:

<1>setenv DISPLAY 133.9.42.192:0
<2>xterm &
<3>ps -a | grep xterm

the output is as follows:
15762 pts/17 0:00 xterm

from the output, I think I have started the xterm process. But it is just be executed in server side.
how to display it in my pc by setting DISPLAY variable? or it is impossible mission by a private
IP address such as 192.168.0.*.

And I wonder what is the meaning of pts/17? Does it mean the server?

Thank you for your patience!

Cedrik 01-12-2005 06:31 AM

after do xhost+ and loggin with ssh, try :
setenv DISPLAY 133.9.42.192:0.0

then xterm &
if it fails I would ask the admin if X server is listening TCP port to offer remote access
I would try ssh -X to connect
pts/17 is your terminal (type tty)

I would try also (but I doubt)
xterm -display 133.9.42.192:0.0 &

UltraSoul 01-12-2005 09:36 PM

problem about failure!
 
I tried to login with ssh -X SunBladeServer -l ps0424 and set DISPLAY accoring to your method.
It seems to be displayed unsuccessfully!

if my pc logins with a static IP of 133.9.42.198 and set DISPLAY 133.9.42.192, i can display the Xwindow in my pc.
From it, I think the server will listen to TCP port. But I login with my Pc's IP of 192.168.0.13, I echo $SSH_CLIENT
and $SSH_CLIENT is 133.9.42.192 because my pc is connected to router whose static IP is 133.9.42.192. So my pc
's login IP is 133.9.42.192.

keefaz 01-13-2005 10:16 AM

Quote:

if my pc logins with a static IP of 133.9.42.198 and set DISPLAY 133.9.42.192, i can display the Xwindow in my pc.
So why don't you want to login with your static ip133.9.42.198 ?

UltraSoul 01-13-2005 12:05 PM

Static IP is limited!
 
Because the Static IP assigned by my network administrator is
limited and We prefer to login to server and use the software in
server occurentlly. So I wonder if we can login to server with
a private IP and run Xwindows locally.

elfoozo 01-29-2005 10:12 PM

Check if your network administrator has defined X11Forwarding yes in the sshd_config file.

Also maybe look at what restrictions are defined in hosts.allow depending how hardened that ssh server is.


All times are GMT -5. The time now is 03:08 AM.