The X Windows System permit to see on your local computer, software that run on a remote server. This software are known als:
- X Window System applications
- remote client
This articles shows a step by step tutorial.
Start the server on your machine
Start a X server on your machine for instance X11 - Cygwin/X
To do that start XLaunch.
- Program Files > Cygwin-X > Xlaunch
- Make sure you have the openssh package installed.
- Launch Cygwin/X
- In an X terminal, you can run the following in an X terminal:
$ 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.
- Enter your password when prompted by ssh.
- Your ssh session should now show you a shell prompt for your remote machine.
- Open Putty and change the X11 forwarding configuration as below:
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.
- Made a connection and enter your credentials
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.
Without the X11 forwarding, you are subjected to the X11 SECURITY and then you must:
In this example:
- 192.168.2.223 is the IP of the server
- 192.168.2.2 is the IP of the local computer where the x server is installed. localhost can also be used.
gerardnico@gerardnico01 ~ $ xhost 192.168.2.223 192.168.2.223 being added to access control list gerardnico@gerardnico01 ~ $ ssh -l root 192.168.2.223 [email protected] password: Last login: Sat May 22 18:59:04 2010 from rixni01.cornac.net [root@oel5u5 ~]# export DISPLAY=192.168.2.2:0.0 [root@oel5u5 ~]# echo $DISPLAY 192.168.2.2:0.0 [root@oel5u5 ~]# xclock&
Then the xclock application must launch.
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:
- forgot to add the remote server to your authorized list
- gave a bad IP/name of your remote server
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
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.