xdmcp

General Information

XDMCP is a remote desktop protocol. With XDMCP, one computer A running X11 can connecting computer B running X11, and interact with computer B as if one were physically at computer B. XDMCP is integrated into X.org, the default X11 server in Ubuntu. XDMCP also needs to be implemented by the display manager.

Warnings

  • XDMCP is inherently insecure as it does not encrypt your traffic. XDMCP is analogous to telnet, and therefore they share the same security issues. Over wireless, anyone can listen to your traffic and easily record your keystrokes. They can likely read what is being display on your screen. Over a wired LAN, this is more difficult but still possible. Over both, it is still somewhat easy for someone hijack your session and assume control of the sever. Therefore, only use XDMCP on a wired network that you you trust. Also, consider using alternatives that feature security (and often compression) such as NX.

  • XDMCP uses a large amount of bandwidth because it uses no compression. A 100mbit (wired) network may be necessary. However, the lack of compression can make XDMCP provide very fast graphics when the bandwidth is available.

Servers

Ubuntu 12.04 LTS+

Ubuntu 12.04 LTS uses lightdm by default. XDMCP is disabled by default but can be enabled by adding the following to "/etc/lightdm/lightdm.conf"

[XDMCPServer]
enabled=true

Restart lightdm after this:

sudo restart lightdm

You should now be able to query the server.

GNOME Ubuntu 10.04 LTS Server

Please note that these instructions apply to the rewrite of GDM since Ubuntu 9.10 (although they have not been tested under 9.10.) These instructions are not officially documented and therefore this functionality may be considered a work in progress. This author believes that this functionality is indeed a work in progress because he has observed the following bugs:

  • An inability to login by default (with Xming clients at least.) Switching between regular GNOME and failesafe GNOME sessions repeatedly seems to fix this.
  • An inability of Xnest clients to reconnect. The server reports that the maximum number of sessions from a host have been reached, even though the session has been entirely ended. The only workaround is to restart GDM (by following the instructions to do that below.)

To enable XMDCP in Ubuntu 10.04 with the default (GNOME) GDM display manager, create the file "custom.conf" under /etc/gdm/ with the following contents:

[daemon]
RemoteGreeter=/usr/lib/gdm/gdmlogin

[xdmcp]
Enable=true

Then restart GDM, either by restarting the entire computer or running the following command (log out locally before you run this!):

sudo service gdm restart

Clients

X Server

You can run a separate X server (Switchable to by Ctrl+Alt+8..0) which will query for XDMCP Connection e.g:

sudo Xorg -terminate -query $REMOTE_HOST :1

This will start another X server at VT8. $REMOTE_HOST is the hostname or an IP address that is running XDMCP server. :1 is the number of the display. The default display you are using is :0 and can be seen in $DISPLAY variable. "-terminate" option can be specified to shut down X server once the session is finished and X server is reset.

Remmina

To enable XDMCP in Remmina run the following:

sudo apt-get install remmina-plugin-xdmcp

This plugin depends on Xephyr, a X server outputting to a window on a pre-existing X display.

Xephyr directly

Xephyr -query $REMOTE_HOST :1

To set window size, use -screen WIDTHxHEIGHT option. Option -fullscreen will run Xephyr in full screen mode. To capture and release mouse pointer and keyboard use Ctrl+Shift. $REMOTE_HOST is the hostname or an IP address that is running XDMCP server.

tsclient

To enable XDMCP in tsclient, run the following command:

sudo apt-get install xnest

Xming for Windows

Xming is an X server for Microsoft Windows. Officially it supports Windows XP, Server 2003, and Vista. It appears to work on (64-bit) Windows 7 as well.

It supports being an XDMCP client, but this is not officially documented in the manual.

First download it from sourceforgeand install it.

You can then connect to server with IP address of 192.168.1.101 by running the following command on 32-bit Windows:

"C:\Program Files\Xming\Xming.exe" -query 192.168.1.101 -clipboard

or on 64-bit Windows

"C:\Program Files (x86)\Xming\Xming.exe" -query 192.168.1.101 -clipboard

You can replace the IP address with a hostname as well.

Please note that many of the other command line switches in Xming do not work with -query for XDMCP. This includes -wgl for 3d acceleration; using

Xming.exe +extension Composite -query ...

may help in older version (is enabled by default since 7.5.0.97).

Please note, do not run any 3d programs as that program will crash, leave a black box for the area of the session, and you will have to kill the 3d program manually. The default kill level does not work, although kill -5 does.

To make connecting to a specified server more convenient, you can browse to the (regular) Xming shortcut in the start menu. Copy and paste it to the Xming folder. Then edit the copy of the shortcut by right-clicking and going to properties. Edit the name under the general tab to be whatever you want. Edit the target under the shortcut tab to be what is listed in the above examples (remove the default switches like -multiwindow .)

Cygwin with X for Windows

The Ubuntu help pages have extensive documentation on this more complex client here.

Notes

You may want to use either Unity 2D or KDE, XFCE or other desktop environments that are not using llvmpipe/Gallium. Unity and GNOME Shell will perform quite slow since any pixel changed will trigger a full desktop refresh.

Xephyr does not support GLX extension starting from 12.10 due to a change in the Xorg architecture (1079096).

xdmcp (last edited 2015-09-11 10:41:03 by c58-109-78-145)