28-mar-2016: Welcome to our new server! Faster and less prone to crashing.

Welcome to the Slackware Documentation Project

Remote X: Linux to Linux

As X11 in its newer versions doesn't allow incoming tcp connections by default anymore (see the relative commit), since Slackware 14.2 you have to launch your X server (the one which has to display the remote application) explicitly enabling them, like

   startx -- -listen tcp

if you are using a display manager to launch your X session refer to its documentation for enabling this in its configuration file.

Plain Ol' Vanilla X11 Forwarding

NOTE: in the X11 world, the SERVER machine is the one listening for a connection (your desktop). The CLIENT machine is the one initiating the connection (the machine you are executing the commands on). I know, it sounds backwards but, it is actually correct if you understand the X11 connection.

1) Tell your X11 Server Linux box to accept X11 connections from the Client machines with the xhost command. You can add the the command to .bashrc or .profile:

 EXAMPLE: xhost +

2) Start the connection from the client (the remote) machine to the server (your desktop) machine: Connect to the remote machine via ssh/telnet/rlogin/whatever and run:

   EXAMPLE: DISPLAY=;export DISPLAY;xterm &

X11 Forwarding Over SSH

1) Edit /etc/ssh/sshd_conf on the remote machine.

 #X11Forwarding no
 X11Forwarding yes
 #X11UseLocalhost yes
 X11UseLocalhost yes

2) ensure that X11Forwarding is enabled in /etc/ssh/ssh_conf on the local machine.

3) open an X11 forwarded ssh session to the remote machine:


PROBLEM: ssh connection is complaining about an “Invalid MIT-MAGIC-COOKIE”.
FIX: start a less secure ssh session:



* Originally written by arfon

In Other Languages
Translations of this page?:
QR Code
QR Code howtos:window_managers:remotex_linux2linux (generated for current page)