Ubuntu Dev-Branch with KVM and XDMCP

If you are using kvm on Linux, i.e. Ubuntu, you might be interested in the development process for the next upcoming release. Often you have to desire, if you like to upgrade a current stable release to an snapshot or not.

With kvm you have the ability to setup a guest with a development branch. Normally you would have to use vnc or similar to work with the graphical surface (if not only using ssh).

But Linux does have xdmcp support and with gdm as login manager it is very easy to setup gdm locally and in the guest OS to run the guests desktop on the local X11 screen.

First a screenshot from my network setup, which is not the main content of this article, but you need a setup, where the IPs are setup correctly (in my case this does my router do).

Network setup

On your local machine, enter sudo gdmsetup to get the gdm dialog for you local X11 login manager.

Lcal gdm setup

You may then ssh into the guest. If you have installed xauth there, you can use the -X option to ssh. Then run sudo gdmsetup in the guest.

KVM guest gdm setup

That´s all. Now you can use your local gdm to look for remote computers. It will list the guests IP and you can double click it. After that the guest will present its login dialog. I demonstrate it in pictures:

First select logout in your Gnome-session (if using Gnome 🙂 ). Select the switch user option.

0

You get the following gdm screen

1

Now the network is broadcasted and your machines are listed:

2

Choose your kvm guest and start the session

3

Log in and be happy.

4

You also might want to use Xnest and then login to the guest in a window. In my tests there are problems with the theme-engine and with the keyboard layout. So I only use the X11 method and not the Xnest one.

If your keyboard still is setup wrong and you are using Gnome, you might go into preferences and search for keyboard. Select your layout, country, whatever, logout and login again. Voila.