Wednesday, December 29, 2010

Get KDE 4 .4.2 working with xrdp

Problem Statement

KDE4 [1] looks horrible when accessed remotely via vnc [2] and since xrdp [3] is simply a proxy that depends on vnc we get the same horrble look when accessing KDE using Windows RDP client.

The usual response from KDE developers is that vnc is bad and you should change your vnc server or use another remote desktop technology so I tested all vnc server implementations I found and I can tell that x11vnc is the only one that is simple and works correctly with KDE4 so the solution to my problem was simple: get xrdp to work with x11vnc.

Configure KDE4 with x11vnc server

This cannot be more easy. In Ubuntu simply install the package:

then in a terminal (konsole) run this command:

The first time you run this command it will ask you to input a password. Choose any one you like and remember it because you will need it to connect remotely to x11vnc. The -noxdamage option is only needed if you have desktop effects enabled in plasma. If you have these plasma effects enabled and you do not use the -noxdamage option you will see some XDamage errors in the x11vnc output. You can also ask x11vnc to turn off the monitor when a remote client connects using the -clientdpms option and to lock the screen when the client disconnects using the -gone option. Be warned that the -clientdpms and -gone options were not working very well last time I tried. For example is difficult to recover the session from the desktop unless the remote client

Configure KDE4 with xrdp server

Install the xrdp packages:

Edit the /etc/xrdp/xrdp.ini file and add an entry like:

Finally restart xrdp service:

Accessing remotely you KDE session via Windows RDP client

In a windows machine open the remote desktop client (usually found in accessories) and input your KDE machine IP address. After the connection is established you will get a popup with some options including the one we created above (MyHOME) so select it, input the password you set to x11vnc and enjoy.


If you use Gnome instead of KDE you be encounter a bug that messes up the keyboard [6]. To fix it you must disable the keyboard plugin of the gnome-settings-daemon using hte gconf-editor. To do this open the gconf-editor and navigate all the way to the folder:

and set the active option to False.

Enabling the Kana Henkan key (Japanese Keyboards)

To get the japanese kana key (top left in japanese keyboards) to work you need to apply a patch
[7] and install the patched deb: