Table of Contents

X11 - How to display remote clients (such as firefox, installation screen) with the X Server CygwinX ?

About

The X Windows System permit to see on your local computer, software that run on a remote server. This software are known als:

This articles shows a step by step tutorial.

Steps

Start the server on your machine

Start a X server on your machine for instance X11 - Cygwin/X

To do that start XLaunch.

Make a connection with X11 forwarding

Enabled

The SSH protocol has the ability to securely forward X Window System applications over your encrypted SSH connection, so that you can run an application on the SSH server machine and have it put its windows up on your local machine without sending any X network traffic in the clear.

To enable x forwarding, you have two ways:

With openssh
$ ssh -Y username@remote_hostname_or_ip_address

where the Y parameter enables trusted X11 forwarding. Trusted X11 forwardings are not subjected to the X11 SECURITY extension controls.

With Putty

Putty X Forwarding

The X display location box is blank by default, which means that PuTTY will try to use a sensible default such as :0, which is the usual display location where your X server will be installed.

Launch remote X clients

From Putty of OpenSsh, you have now a ssh connection and you can now launch remote X clients in your session. For example:

firefox&
xlogo
xclock

will launch an x terminal running on your remote host that will display on your Cygwin/X screen.

By appending & to the command name, the remote clients start in the background and you don't have to open several others ssh sessions.

Disabled

Without the X11 forwarding, you are subjected to the X11 SECURITY and then you must:

In this example:

xhost 192.168.2.223
192.168.2.223 being added to access control list

ssh -l root 192.168.2.223
export DISPLAY=192.168.2.2:0.0
xclock&

Then the xclock application must launch.

Xclock

By starting the remote clients in the background, by appending & to the command name (xclock&), you don't have to open several ssh sessions.

Support

Connection to “192.168.2.2:0.0” refused by server without X Forwarding

If when you don't use the X forwarding method by using xhost, you:

you will then receive this error:

[root@oel5u5 ~]# xclock&
Xlib: connection to "192.168.2.2:0.0" refused by server
Xlib: No protocol specified

Error: Can''t open display: 192.168.2.2:0.0

To resolve this error, exit your ssh session, use the xhost command to add the remote server to your authorized list and follow again the complete process.

Authorization required, but no authorization protocol specified

Xlib: connection to "localhost:10.0" refused by server
Xlib: Authorization required, but no authorization protocol specified
Error: Can't open display: localhost:10.0

or

Authorization required, but no authorization protocol specified
Error: Can't open display: localhost:10.0

This was an error with my X Server. I had started XWin Server in place of X Launch. Restart your X Server to be sure.

Documentation / Reference