02-apr-2017: Dokuwiki and its plugins were upgraded to the latest release.
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 +192.168.1.36

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:

   DISPLAY=X11_SERVER_IP:0;export DISPLAY;APPLICATION_YOU_WANT_TO_RUN &
   
   EXAMPLE: DISPLAY=192.168.1.10:0;export DISPLAY;xterm &

X11 Forwarding Over SSH

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

 CHANGE:
 #X11Forwarding no
 
 TO:
 X11Forwarding yes
 
 CHANGE:
 #X11UseLocalhost yes
 
 TO:
 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:

   ssh -X USER@REMOTE_MACHINE 
   XAPPLICATION_YOU_WANT_TO_RUN

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

   ssh -Y USER@REMOTE_MACHINE

Sources

* Originally written by arfon


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