LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices


Reply
  Search this Thread
Old 08-13-2009, 10:16 AM   #1
premkarat
LQ Newbie
 
Registered: Feb 2007
Posts: 9

Rep: Reputation: 1
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
 
Old 08-13-2009, 11:59 AM   #2
pytrash
LQ Newbie
 
Registered: Aug 2009
Location: London, England
Distribution: Ubuntu 9.04
Posts: 4

Rep: Reputation: 0
Cool 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.
 
Old 08-13-2009, 01:09 PM   #3
pellicle
Member
 
Registered: Jul 2008
Location: Finland
Distribution: RHEL4
Posts: 139

Rep: Reputation: 15
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 ...
 
Old 08-14-2009, 05:15 AM   #4
premkarat
LQ Newbie
 
Registered: Feb 2007
Posts: 9

Original Poster
Rep: Reputation: 1
Quote:
Originally Posted by pellicle View Post
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?
 
Old 08-15-2009, 03:03 AM   #5
jschiwal
LQ Guru
 
Registered: Aug 2001
Location: Fargo, ND
Distribution: SuSE AMD64
Posts: 15,733

Rep: Reputation: 682Reputation: 682Reputation: 682Reputation: 682Reputation: 682Reputation: 682
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.
 
Old 08-18-2009, 05:09 AM   #6
premkarat
LQ Newbie
 
Registered: Feb 2007
Posts: 9

Original Poster
Rep: Reputation: 1
Quote:
Originally Posted by jschiwal View Post
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
 
Old 08-19-2009, 12:42 AM   #7
chrism01
LQ Guru
 
Registered: Aug 2004
Location: Sydney
Distribution: Rocky 9.2
Posts: 18,359

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


Reply

Tags
client, display, remote



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
mounting samba filesystem on remote machine as /home on local machine shishirkotkar Linux - Software 1 04-28-2008 05:05 AM
How to login as root in the remote machine with NX client tanveer Linux - Software 5 11-18-2007 11:27 AM
How to Display Running Application on Remote Machine with SHH anamericanjoe Linux - Software 3 09-14-2006 11:39 AM
can't display xwindow on remote machine using Debian 3.1 linian Linux - Software 3 07-20-2006 09:40 AM
X windows display in remote machine! UltraSoul Linux - Networking 3 01-10-2005 10:24 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Server

All times are GMT -5. The time now is 06:57 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration