March 7, 2010

Ubuntu XDMCP Access with Xephyr

Filed under: Linux,Ubuntu — mariojump @ 1:45 am

Ubuntu Linux can be remotely accessed via XDMCP as follows.

I used:
XDMCP Server: Ubuntu Linux 9.10 Netbook Remix
XDMCP Client: Ubuntu Linux 9.10 64bit
however, I believe this configuration can be used for other Ubuntu families, too.

Edit /etc/gdm/custom.conf, and set [xdmcp] section as follows.

$ cat /etc/gdm/custom.conf

Restart gdm.
$ /etc/init.d/gdm restart
(If you are using local GNOME, it will restart your current GNOME Desktop, too.)

With the info at:

$ sudo apt-get install xserver-xephyr
$ Xephyr -ac -screen 1280×768 -br -reset -terminate 2> /dev/null :2 &
$ echo $DISPLAY
— This is to restore the $DISPLAY later.

Set the $DISPLAY value to.
$ export DISPLAY=:2.0
This :2.0 needs to match with the Xephyr command line argument above.

$ ssh -XfC -c blowfish username@hostname_or_IPaddress gnome-session
will start the GNOME session in the Xephyr window.

Restore the $DISPLAY variable.
$ export DISPLAY=:0.0



  1. Thanks very much for this terrifically useful blog. It’s so incredibly cool (and very useful) being able to access occasionally my headless server from my Mac.
    There were just a couple of things that I thought worth commenting on: a) the syntax you give is slightly out – won’t give a window with the size you want; b) the defaults these days on ssh for compression etc. mean your ssh command can be simpler – and note I have passwordless shh access to my server; c) also pipe comments to /dev/null if firing up a gnome session – generates tons of stuff we’re probably not interested in. So here’s my terminal session: bash-3.2$ Xephyr -ac -screen 1280x1024 -br -reset -terminate 2> /dev/null :1 &
    [1] 1017
    bash-3.2$ bash-3.2$ echo $DISPLAY
    bash-3.2$ export DISPLAY=:1.0
    bash-3.2$ ssh bothy gnome-session 2> /dev/null

    Comment by Iain Houston — December 6, 2010 @ 10:44 pm | Reply

  2. Oops sorry. Your Xephyr syntax was fine!

    Comment by Iain Houston — December 6, 2010 @ 11:51 pm | Reply

RSS feed for comments on this post. TrackBack URI

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

Create a free website or blog at

%d bloggers like this: