How to use X applications remotely

From Salix OS
Jump to: navigation, search

If you have several computers running Salix you can run X applications on one machine from another computer using several methods. Some of them are described below:


X forwarding via SSH

Configure the server

enable X forwarding by uncommenting the following line in /etc/ssh/sshd_config:

X11Forwarding yes

make sure ssh daemon is restarted and running:

service restart sshd

if you want sshd to run at boot:

chmod a+x  /etc/rc.d/rc.sshd

Connect to the server

Just login via ssh from any Linux machine able to run X using -X or -Y option (difference among them not clear to me):

ssh -Y user@server application_name

like this:

ssh -Y jack@ thunar

Thunar will be executed on machine with IP but the display will be forwarded to the client`s X server.

Or just log in, then run the desired application from command line like this:

 ssh -Y jack@

then type thunar


XDMCP states for X Display Manager Control Protocol and uses UDP port 177.

Configure GDM on the server

In order to use XDMPC one has to configure Gnome Display Manager by editing /etc/gdm/custom.conf in [xdmcp] section to have:


Restarting GDM is required. Root can do this by init 3; init 4 combination:

init 3
init 4

Log in via GDM on the remote server

X -query servername :display

This might look like this:

X -query :1

Option :0 for display is usually already claimed so :1 or higher will be needed to work. One has to realize that XDMCP authenticates unencrypted and if snooping is possible, leaves the system vulnerable to attack. It is more secure to use an ssh tunnel for X traffic.

Using VNC

Install the server

Salix provides tightvnc server in the repositories. In order to install use:

slapt-get -i tightvnc

Every user can run his own VNC server. Just log in and type:


You will be asked to define passwords for access and view-only access and the server start running in the background. You might define the display resolution if necessary (ie. your viewer has a small screen):

vncserver -geometry 700x500

To install a VNC server for the actual displayed screen, see this documentation.


Connecting to a VNC server can be done on any system (Windows, Linux) with a web browser with JAVA enabled or a VNC client provided with tightvnc package (KDE and GNOME also have their own vnc viewers). The simplest method however (and quite efficient) is using a browser by pointing to appropriate port on the server.:


It should look like this:


The port to use can be calculated as 5800+display used by VNC server (when you start VNC it tells you which display it claims in the form hostname:display). If several people started VNC server before you then your display may be 2, 3, etc. like this: