System Administration
Showing results for 
Search instead for 
Did you mean: 

Run Xwin from remote

Frequent Advisor

Run Xwin from remote

I have setup a RH server and installed xwindow on it , I can use the xwindow on console , if I also want to use the xwindow from my desktop , can advise what can i do ? thx
Ivan Ferreira
Honored Contributor

Re: Run Xwin from remote

You have the following options:

Connect to the remote host using "ssh -X" and start the X application, like mozilla.

Connect using XDMCP. If you want to use XDMCP, probably you should take a look to Xnest.

Connect using VNC.
Por que hacerlo dificil si es posible hacerlo facil? - Why do it the hard way, when you can do it the easy way?
Rick Retterer
Respected Contributor

Re: Run Xwin from remote

To be a little more specific...

To use SSH X Forwarding or XDMCP, you will need to install a X Server Software package on your PC. There are a couple expensive PC Xservers you can purchase, such as HummingBird eXceed, or WRQ's ReflectionsX. However, there are a couple of Freeware X Servers you can also install and use. Check CNET or one of the many software down load sites to look at the few that are available.

You can also use XVNC, but again that will require you to install a VNC Client on your PC as well. There are a couple of these that are "freeware" that you can use, such as "TightVNC", or "RealVNC".

Linux provides VNC as part of their package and you simply need to startup the Host Component. Check the Man Page for vncserver, and vncpassword for instructions on how to set it up.

On your PC, you can also use a Web Browser to connect to the Linux VNC server simply by using the URL of your Linux host and port
5800 + your Server number that you specified when you started the server.


I first created a password for my account by running the command:

# vncpasswd ! See the man page.

This creates a password for you in the hidden .vnc directory under your $HOME directory.

Next, I modifed the file also in your $HOME/.vnc directory named xstartup and uncommented the lines to startup a session.
(Read the comments in the file)

Finally, I started the Server using a server id of 3... like this:

# vncserver :3 ! See the manpage on this.

Then I'm ready to connect by using the browser on my PC (I'll use Internet Express)

I was prompted to enter my username and the VNC password I created using vncpasswd.

Shortly I had a KDE Session up on my pc from my linux system.

While I had to be brief in my description here, there is lots of information on the web about using XDMCP and XVNC to run a Linux Session remotely on your PC.

- Rick Retterer

Andrew Cowan
Honored Contributor

Re: Run Xwin from remote


The easiest way to do this is to install "xming" on your PC. You can download this from next open a command window and run ipconfig to discover the IP address of your PC. From your Linux system set your DISPLAY variable the IP Address of your PC e.g .export DISPLAY=

Next start XLaunch from your PC desktop. Select "Multiple Windows", "Start no client", and tick "No access control". (I know this is a security risk, however once you've got the link working you can change this). Finally save your configuration. An icon should appear in your toolbar.

Finally run a simple X application such as xterm and that should now appear on your Windows desktop. Once you have this working you can experiment with starting full desktops if required, however I would advise against this as they are very inefficient and use a lot of bandwidth.

Finally if you want security simply replace the Linux steps with setting the "Allow X-Forwarding" option on your SSH Deamon and local windows client app (e.g. Putty). ssh into the target, and the $DISPLAY will be automatically set, and the X traffic tunnelled back to Windows.

Good luck,
James Trice
Occasional Visitor

Re: Run Xwin from remote

I would recommend installing cygwin on your PC with the X11 software from that distribution. Then open a bash shell and ssh -X to the RH server.
Honored Contributor

Re: Run Xwin from remote

Is your desktop Microsoft or Linux? If MS, you'll need to install an Xwindows server. I use this one -- -- because it is free.