logo
     
Remote access to Gentoo X11 
    

Contents.

Overview.
I have Linux PCs at home and at work.
My home and work networks are connected by a VPN.
I wanted to run my mail client (kmail) on my PC at work and have it display it's window(s) on my PC at home.
By default Gentoo Linux's X-server does not accept incoming X11 connections so I can't.

The Symptom.
I telnet to my work machine and run kmail but get a 'cannot connect to display' error.
My telnet automatically sets up the correct DISPLAY environment variable on my work PC and a
port-scan on my home PC shows port 6000 (X11) is not open so I know that X11 is not listening for tcp/ip requests.

The Cure
Under Gentoo Linux the X-server is prevented from listening for tcp/ip X11 connections by the line..
#defaultserverargs="-nolisten tcp -br"
..in /usr/bin/startx so I commented it out with a # and restarted my X-server.

Noone else has access to my PC at work so I'm not worried about authenticating on a per-person basis.
The command..
xhost +192.168.32.45
..adds 192.168.32.45 to the list of hosts allowed to connect to my X-server.

Now when I telnet to my work PC and run an X application the window displays on my home PC's desktop.

nb. My firewall and VPN cover most of the security issues so this is not a particularly secure solution.
If you are using remote X11 connections over the Internet without a VPN you are better off usingf ssh's X11 forwarding feature.

nb.2. I have root access to my systems, if you don't then you are stuffed unless you have a friendly sys-admin.

 

- plain version for printing or saving -
- back to top -
 
Mon   2008-05-12   00:03:13 hst © 2002-2008 - hadez.org