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

Card Puncher Data Processing

About

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.

Steps

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 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
  • 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.
With Putty
  • Launch Cygwin/X. Close the X terminal windows if necessary
  • Open Putty and change the X11 forwarding configuration as below:

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.

  • 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.

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:

  • authorize the remote server to make a connection with the local X Server using a method (for instance, the xhost command)
  • set the display environment variable to redirect the output to the X server of your local computer.

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.

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:

  • 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

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





Discover More
Linux Remote Desktop Preference
Linux - Enable Remote Desktop on Oracle Enterprise Linux / Red Hat with Gnome

The Remote Desktop application on Red Hat is Vnc but an other standard way to reach your linux operating system is to use the system X. You must allow the remote connection on the desktop by modifying...
12g Obiee Standard Topology
OBIEE - 12.2.1.3 - Linux Installation 12C on Azure

An installation procedure: on a Azure VM Linux. with an Oracle Database with a standard topology (ie a WebLogic Server domain that contains an Administration Server and a cluster that contains two...
Obiee11g Catalog Admin View
OBIEE - Catalog Manager

The catalog manager is an GUI administration tool to manage the webcat object. The file catalogmanager.exe is located: on 10g: BI_ORACLE_HOME\web\catalogmanager on 11g, For the first presentation...
Obiee 11.1 Internet Explorer 6 Not Supported
OBIEE 11g - Oracle Business Intelligence 11.1 Simple installation steps on Windows and OEL Linux 32 bit

Open the setSOADomainEnv.cmd file, located in your Update the PORT_MEM_ARGS entry as follows: set PORT_MEM_ARGS=-Xms512m -Xmx1024m Save the file and close. ;-) Oracle®...
Oracle Database Installationl Location 11gr2 Oel Linux X86 64
Oracle Database 11gR2 - Installation on Linux OEL 5 Update 5 (x86_64)

Installation of Oracle Database 11g Release 2 (11.2) x86_64 on Oracle Enterprise Linux 5 Update 5 on the file system (ie without ASM) or GRID. Linux OEL installation login as root ...
Card Puncher Data Processing
X Windows System (commonly X or X11)

X11 means that the display of a remotely running program is authorized to be sent to your machine (localhost) via an X11 connection between a client (located on the remote server) and a server (running...
Card Puncher Data Processing
X11 - Cygwin/X

Cygwin/X consists of an X server, X libraries, and nearly all of the standard X clients. Cygwin/X uses the Cygwin project which provides a UNIX-like API to Xlib and X clients, thereby minimizing the amount...
Putty X Forwarding
X11 - DISPLAY (environment variable)

The magic word in the X window system is DISPLAY. The DISPLAY environment variable instructs an X client which X server it is to connect to by default. The X display server install itself normally...
Xclock
X11 - X11 and su: How to ?

After making a connection, you shows X windows by following for instance this article: . But when you change of user with the su command, you got . There is no display You then go back to the original...
Card Puncher Data Processing
X11 - Xterm

An xterm is a terminal of a X display server. Putty used Xterm. For instance, when you start the Cygwin X server automatically an xterm session appear and you can make a connection to a Linux Operating...



Share this page:
Follow us:
Task Runner