Linux - X Windows System (commonly X or X11)
Table of Contents
1 - About
When you want to redirect the display (keyboard, mouse, screen, …) of a remote server on the local computer, you use the X window system.
It can be generally the case in a Linux installation (Database, …) when you are not installing the software on your local computer.
The X Window System (commonly X or X11) is a computer software system and network protocol that provides a graphical user interface (GUI) for networked computers known also as X emulation.
Running X applications over the network is quite bandwidth-intensive. If you are off campus or running highly-graphical applications, it may take a few moments for the screen to refresh.
The /etc/X11/ directory is for X11 configuration files such as XF86Config.
2 - Articles Related
3 - How to show remote application on your local computer
You must do two things to achieve all this:
- Tell the local display (keyboard, mouse, screen, …) from the local X server to accept connections from the remote Linux server.
- Tell the remote application on the remote Linux server to direct its output to your local display via the DISPLAY environment variable
The two next section gives general details about this two steps and you can read a tutorial with the X Server CygwinX on this article: Linux - How to display remote clients (such as firefox, installation screen) with the X Server CygwinX ?
3.1 - Telling the local X Server
The local X server will not accept connections from just anywhere. You don't want everyone to be able to display windows on your screen. Or read what you type because your keyboard is a part of the display.
Someone with access to your display can read and write your screens, read your keystrokes, and read your mouse actions.
Most X servers know two ways of authenticating connections to it:
- the host list mechanism (xhost)
- and the magic cookie mechanism (xauth)
Then there is ssh, the secure shell, that can forward X connections.
3.2 - Telling the remote Client on the remote Linux Server
The client program (for instance, your graphics application) knows which display to connect to by inspecting the DISPLAY environment variable.
This setting can be overridden, though, by giving the client the command line argument -display hostname:0 when it's started.
The DISPLAY variable is automatically transported to the remote host with some client such as
- some versions of telnet
- the ssh client such as putty. With putty, $DISPLAY is automatically set to point at display 10 or above when X-forwarding
[root@ebs121 ~]# echo $DISPLAY localhost:10.0
To turn on X forwarding over ssh,
- use the command line switch -X
- or write the following in your local ssh configuration file:
Host remote.host.name ForwardX11 yes