LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Server (https://www.linuxquestions.org/questions/linux-server-73/)
-   -   How to display an X client on a remote machine (https://www.linuxquestions.org/questions/linux-server-73/how-to-display-an-x-client-on-a-remote-machine-747293/)

premkarat 08-13-2009 10:16 AM

How to display an X client on a remote machine
 
I don't understand how the following works. What I am trying to do is the following.

My linux server is Server A (X server runs here) and my remote computer, Machine B, is a Windows XP box from which am using a SSH connection (putty) to connect to Server A.

What I am trying to do is to get a display of an X client from Server A to Machine B.

Let's say the IP address of Server A is 192.168.76.1 and Machine B is 192.168.76.2

I can get the display of X client from Server A to Machine B by doing one of the following.

1. Export the Display variable from a bash shell from Linux Server A using the following command

export DISPLAY=192.168.76.2:0.0

or
2. Run a X client manager, Reflection X on Machine B and do
export DISPLAY=192.168.76.2.0.0
through the SSH bash shell from machine B.

What I would like to know is

If I don't have a Reflection X or any X client manager on machine B, and through the SSH bash shell from machine B, if I try to do

export DISPLAY=192.168.76.2:0.0

i can't get any of my X client's display on Machine B.

Why is it so?. Why does it require an X client Manager on Machine B. How to get this working?

Note: If I run the same command from Server A and if I dont' run any X client manager on machine B, I can get the display working.
But running the same command through SSH remote connection from machine B, it doesn't.

Any help is much appreciated!!

Cheers,
Prem

pytrash 08-13-2009 11:59 AM

ty for q re Reflection X server for windows
 
Sorry, I can't answer your question but I'm grateful that you asked it. I never dreamed that such a thing existed! It will be very useful to me. Proves the value of lurking here.

pellicle 08-13-2009 01:09 PM

Hi

I'm not sure if this is answering your question, but I'm using X-win32 to have X windows on my win2K box from my redhat box. I understand there are some other options ... for example

http://www.calcmaster.net/visual-c++...on/compare.php

and I think that there is something in the cygwin distribution too ...

premkarat 08-14-2009 05:15 AM

Quote:

Originally Posted by pellicle (Post 3642179)
Hi

I'm not sure if this is answering your question, but I'm using X-win32 to have X windows on my win2K box from my redhat box. I understand there are some other options ... for example

http://www.calcmaster.net/visual-c++...on/compare.php

and I think that there is something in the cygwin distribution too ...


Thanks but yeah it doesn't answer my question. I can get it working using one of the options I mentioned. But with the method am trying to follow, it doesn't and I don't understand why?

jschiwal 08-15-2009 03:03 AM

Quote:

Note: If I run the same command from Server A and if I dont' run any X client manager on machine B, I can get the display working.
But running the same command through SSH remote connection from machine B, it doesn't.
What is an X client manager? You may have the relationship between X server and X client reversed. The X client is the program that is running on the remote computer. The X server is the local terminal. You need to run an X server on the XP computer because it is the terminal. One free X server is Cygwin/X which will also install a Unix like system running on the Windows kernel. Doing this, you could run the ssh client that Cygwin provides. If you configure it during installation to use Unix styled text files, you can create or edit a file in Cygwin locally, and lines will end with newlines (NL) instead of both NL & CR.

Selecting the X forwarding option in Putty, or using the ssh client in Cygwin, the DISPLAY variable will be set automatically. Probably to :10.0.

premkarat 08-18-2009 05:09 AM

Quote:

Originally Posted by jschiwal (Post 3644136)
What is an X client manager? You may have the relationship between X server and X client reversed. The X client is the program that is running on the remote computer. The X server is the local terminal. You need to run an X server on the XP computer because it is the terminal. One free X server is Cygwin/X which will also install a Unix like system running on the Windows kernel. Doing this, you could run the ssh client that Cygwin provides. If you configure it during installation to use Unix styled text files, you can create or edit a file in Cygwin locally, and lines will end with newlines (NL) instead of both NL & CR.

Selecting the X forwarding option in Putty, or using the ssh client in Cygwin, the DISPLAY variable will be set automatically. Probably to :10.0.


Thank you for you reply.

I meant X Server as X client manager. From your explanation, I understand that it is mandatory to run X server on XP box to get the display working. This is where I am confused.

Could you then please explain, how does the display work, when I dont' run any X server on my XP box and still when I export the display using the following command
locally from Linux server. (If I am logged into the linux box locally and run the following command from a bash shell terminal)

export DISPLAY=192.168.76.2:0.0

and then If i run,

$xclock

then I can see the xclock displayed on the Windows XP box. Please note that at this point I don't have any X server running on my Windows XP box.

What really happens at the background and how does the whole thing work at this point?

Sorry may be I am not understanding the mechanics involved here which is what am trying to understand.

Cheers,
Prem

chrism01 08-19-2009 12:42 AM

See the diagram and explanation here: http://en.wikipedia.org/wiki/X_Window_System


All times are GMT -5. The time now is 10:47 PM.