Wikia

coLinux

XRDP

Talk0
235pages on
this wiki

coLinux with xRDP for a Windows Remote Desktop Connection

If you use coLinux to run a full Linux desktop distribution, you have the problem how to use the Linux desktop environments e.g. Gnome or KDE under Windows. There are some solutions for this problem, e.g. a VNC server under Linux and a VNC viewer under Windows or to redirect all the X system data transfer over the network connection and use a X server at the Windows side. An other solution would be the noMachine NX server at Linux with the NX client at Windows. All these solutions have some pros and cons (http://colinux.wikia.com/wiki/XCoLinux).

But why should be some special software (a VNC viewer, or a X server, or the NX client) installed at Windows, if Microsoft Windows have its own remote desktop solution build in? The Windows users have the "Microsoft Terminal Server Client" for this, and this a very performant remote desktop solution, which uses a compressed data transfer and caching system: The "Remote Desktop Protocol", or short RDP.

Thanks the xRDP project for Linux it gives a RDP server for Linux (see http://xrdp.sourceforge.net or http://sourceforge.net/projects/xrdp), which can be connected with the Microsoft terminal server client. The installation of xRDP is very easy, you will find the xRDP package at the package manager of the most Linux distributions (e.g. at Synaptic for Ubuntu). But some configuration files in that xRDP packages are not right adapted for the distribution, so that xRDP is not running "out-of-the-box". Because coLinux systems dont have a "virtual" graphics card it gives some more problems with xRDP.

The following description was done with a WUBI installed Ubuntu 8.04.3LTS system at the dual-booted native running Ubuntu and before the WUBI-coLinux adaption (http://colinux.wikia.com/wiki/Wubi) was done.

First install the necessary packages: xrdp (version 0.4.0 at Ubuntu 8.04.3LTS) and x11vnc (version 0.9.3 at Ubuntu 8.04.3LTS) with the package manager (Synaptic at Ubuntu). The xRDP version 0.4.0 is slightly outdated and cannot be used with Windows XP SP3 or Vista, because Microsoft have changed the RDP version slightly. For Windows XP SP3 and Vista you need the xRDP version 0.4.1, which can be found at the Debian repositories, e.g. The x11vnc server will be used with xRDP to get the graphical desktop environment. Some other VNC server (the Gnome vino or the tightvncserver, e.g.) will be funtion with xRDP, but these have some limitations.

Edit as a root user the /etc/xrdp/startwm.sh file, so that startwm.sh do nothing (outcomment all lines), because we will not start any new X session, we will get the full running desktop environment or the login window, e.g.:

#!/bin/sh

# . /etc/X11/Xsession

Edit as a root user the /etc/xrdp/xrdp.ini file, so that the first xrdp section have the right values for the x11vnc server and change the default RDP port 3389 (e.g. into 3390), if you use the SLIRP network connection for the coLinux system (dont forget to forward the RDP port at the coLinux SLIRP configuration), e.g.:

[globals]
bitmap_cache=yes
bitmap_compression=yes
port=3390
crypt_level=low
channel_code=1

[xrdp1]
name=VNC
lib=libvnc.so
username=ask
password=ask
ip=127.0.0.1
port=5900

Edit as a root user the /etc/gdm/gdm.conf file, so that the X server will not be started direct, but with the "wrapper" shell script gdm-startx. Do this at the section for the X server definitions and leave the original X server start parameter, e.g.:

# X Server Definitions
#
# Note: Is your X server not listening to TCP requests? Refer to the 
# security/DisallowTCP setting!

[server-Standard]
name=Standard server
command=/etc/gdm/gdm-startx -br -audit 0 
flexible=true

Additional find the "KillInitClients" entry and remove the comment and set this entry to false, e.g.:

# To try to kill all clients started at greeter time or in the Init script.
# does not always work, only if those clients have a window of their own.
KillInitClients=false
LogDir=/var/log/gdm

If the "clients" will be "killed", you cannot use GDM or other login systems without trouble.

Create the right /etc/gdm/gdm-startx shellscipt, e.g.:

#!/bin/sh
#
# start the X server with the "Default" layout
# if the system is nativly (dual-)booted

LAYOUT=Default

# if the system is started with the coLinux
# kernel, than start the X server with the
# "coLinux" layout

if uname -r | grep -qe "-co-"
then
LAYOUT=coLinux
fi

#
# run the Xserver with the args that were passed

exec X -layout $LAYOUT $*

Edit as a root user the /etc/gdm/Init/Default file and add the start of the VNC server at the end and before the exit 0, e.g.:


fi

/usr/bin/x11vnc -forever -bg

exit 0

To overcome the missing graphics card under coLinux you can use the "dummy" video device of the Xorg server. This is a "virtual" RAM only framebuffer device, which can "emulate" the functions of a real graphics card.

Edit as a root user the /etc/X11/xorg.conf file and rename the original "Default Layout" into the single word identifier "Default", add the "dummy" driver as the "coLinux" device, add a "Generic Monitor" for the use with coLinux, add screen defination for coLinux and last the X server layout for coLinux, e.g.:

# xorg.conf (X.Org X Window System server configuration file)
#
# This file was generated by dexconf, the Debian X Configuration tool, using
# values from the debconf database.
#
# Edit this file with caution, and see the xorg.conf manual page.
# (Type "man xorg.conf" at the shell prompt.)
#
# This file is automatically updated on xserver-xorg package upgrades *only*
# if it has not been modified since the last upgrade of the xserver-xorg
# package.
#
# If you have edited this file but would like it to be automatically updated
# again, run the following command:
# sudo dpkg-reconfigure -phigh xserver-xorg

Section "InputDevice"
Identifier "Generic Keyboard"
Driver "kbd"
Option "XkbRules" "xorg"
Option "XkbModel" "pc105"
Option "XkbLayout" "de"
Option "XkbOptions" "lv3:ralt_switch"
EndSection

Section "InputDevice"
Identifier "Configured Mouse"
Driver "mouse"
Option "CorePointer"
EndSection

Section "Device"
Identifier "Configured Video Device"
EndSection

Section "Device"
Identifier "coLinux Video Device"
Driver "dummy"
EndSection

Section "Monitor"
Identifier "Configured Monitor"
EndSection

Section "Monitor"
Identifier "Generic Monitor"
HorizSync 30 - 85
VertRefresh 50.0 - 160.0
DisplaySize 289 203
EndSection

Section "Screen"
Identifier "Default Screen"
Monitor "Configured Monitor"
Device "Configured Video Device"
EndSection

Section "Screen"
Identifier "coLinux Screen"
Device "coLinux Video Device"
Monitor "Generic Monitor"
Defaultdepth 24
SubSection "Display"
Depth 24
Modes "1600x1200" "1280x1024" "1024x768" "800x600" "720x400" "640x480"
EndSubSection
EndSection

Section "ServerLayout"
Identifier "Default"
Screen "Default Screen"
EndSection

Section "ServerLayout"
Identifier "coLinux"
Screen "coLinux Screen"
EndSection

With the other adaptions of the configuration files (particularly to modify the fstab file) you can just (dual-)boot the Windows system and use the same WUBI generated imgage files for the start with coLinux under Windows. The "Remote Desktop Connection" from Windows can be done with the Windows terminal server client, which is included at any Windows installation or can be downloaded from Microsoft.

All Ubuntu 8.04LTS functions are working under coLinux (including the administrative tasks, e.g. the Synaptic package manager), as they are working under the native (dual-booted) Ubuntu 8.04.LTS.

Around Wikia's network

Random Wiki