Table of Contents

X Server

Accessing your remote machine with an X Server on your Windows machine might be some challenge. Here is the sequence you should check in order to get this running.

Configure sshd

# vim /etc/ssh/sshd_config
X11Forwarding yes
X11DisplayOffset 10
X11UseLocalhost yes

see http://www.straightrunning.com/XmingNotes/trouble.php

Install and configure Xming

  1. Instructions for portable install http://www.portablefreeware.com/index.php?id=419

Install and configure PuTTY

see https://wiki.utdallas.edu/wiki/display/FAQ/X11+Forwarding+using+Xming+and+PuTTY

Check whether you get a X display

$ echo $DISPLAY

This should return

$ localhost:10.0

If you don't get the correct display, restart sshd like so:

# /etc/init.d/ssh restart -d

Leave the terminal window open to check the debug messages. Connect with another terminal window over SSH and watch for the following error message: Failed to allocate internet-domain X11 display socket error

Apparently this is a bug in sshd:

Looks like the fix for CR 6684003 breaks sshd's ability to bind to a local
socket for X forwarding. bind() returns EADDRNOTAVAIL for every bind call to ::1
for ports 6010->6999, but never tries IPv4 localhost addresses.

So apparently if you don't have an IPv6 interface, you get this error. There are two solutions:

  1. add “AddressFamily inet” to the sshd_conf and restart sshd
  2. or enable IPv6 on lo0

Reconfigure who can start an X server:

# dpkg-reconfigure x11-common

This modifies /etc/X11/Xwrapper.config – This file has as setting called “allowed_users”. It can accept three values:

  1. root
  2. anybody
  3. console

X11 Forwarding: http://aruljohn.com/info/x11forwarding/