Difference between revisions of "Xrdp"

From ArchWiki
Jump to: navigation, search
(Expand the article as I did some testing)
(automake issue is fixed in AUR)
(12 intermediate revisions by 6 users not shown)
Line 1: Line 1:
[[Category:Remote Desktop Protocol (English)]]
+
[[Category:Remote Desktop Protocol]]
{{i18n|Xrdp}}
+
 
'''xrdp''' is a daemon that supports Microsoft's [[Wikipedia:Remote Desktop Protocol|Remote Desktop Protocol]] (RDP).
 
'''xrdp''' is a daemon that supports Microsoft's [[Wikipedia:Remote Desktop Protocol|Remote Desktop Protocol]] (RDP).
 
It uses Xvnc or X11rdp as a backend.
 
It uses Xvnc or X11rdp as a backend.
  
 
== Installation ==
 
== Installation ==
There is {{AUR|xrdp}} in the [[AUR]]. However, this doesn't work without further changes and it depends on {{Pkg|tightvnc}}, which has severe problems giving the correct colors.
 
  
With {{AUR|xrdp-git}} there is currently a better alternative. It depdens on {{AUR|tigervnc}}, which is a successor of ''tightvnc'' that doesn't have the mentioned problems.
+
Users can find install xrdp from the AUR : {{AUR|xrdp}}.
  
 
=== Fixing Problems in {{AUR|xrdp}} ===
 
=== Fixing Problems in {{AUR|xrdp}} ===
 
You won't have these problems when you use {{AUR|xrdp-git}} so you can skip this section when you chose the git version.
 
You won't have these problems when you use {{AUR|xrdp-git}} so you can skip this section when you chose the git version.
  
You should have something like that at the end of
+
If Xvnc (tightvnc) fails with
{{hc|/etc/xrdp/sesman.ini|<nowiki>[Xvnc]
+
param1=-bs
+
param2=-ac
+
param3=-nolisten
+
param4=tcp
+
param5=-localhost
+
param6=-fp
+
param7=/usr/share/fonts/misc/</nowiki>}}
+
otherwise Xvnc (tightvnc) will not start, complaining:
+
 
{{bc|Fatal server error:
 
{{bc|Fatal server error:
 
could not open default font 'fixed'}}
 
could not open default font 'fixed'}}
''xrdp'' will just fail without giving you that error.
+
you must create a symlink at {{ic|/usr/X11R6/lib/X11/fonts}} pointing to {{ic|/usr/share/fonts}}.
You can only see the error message when you try to start Xvnc manually for a test.
+
  
What you can't seem to fix is the message {{ic|Couldn't open RGB_DB '/usr/X11R6/lib/X11/rgb'}}.
+
''xrdp'' will just fail without giving you that error. You can only see the error message when you try to start Xvnc manually for a test.
There seems to be no file available to suppress that warning and it is probably because of this,
+
 
that some colors seem to be wrong (pink or blue instead of black).
+
To fix the message {{ic|Couldn't open RGB_DB '/usr/X11R6/lib/X11/rgb'}} copy {{ic|/usr/share/X11/rgb.txt}} to {{ic|/usr/X11R6/lib/X11/rgb.txt}} or create a symlink. If this file is missing, standard X11 colors are wrong (pink or blue instead of black) and Xterm is broken.
  
 
=== Autoboot at Startup ===
 
=== Autoboot at Startup ===
Line 35: Line 23:
  
 
Otherwise you have to copy {{ic|/etc/xrdp/xrdp.sh}} to {{ic|/etc/rc.d}} and use that.
 
Otherwise you have to copy {{ic|/etc/xrdp/xrdp.sh}} to {{ic|/etc/rc.d}} and use that.
 +
 +
=== Autoboot at Startup with Systemd ===
 +
The aur xrdp package contains service files for systemd.
 +
Enable xrdp.service :
 +
{{bc|<nowiki>
 +
# systemctl enable xrdp.service
 +
</nowiki>}}
 +
 +
Enable xrdp-sesman.service :
 +
{{bc|<nowiki>
 +
# systemctl enable xrdp-sesman.service
 +
</nowiki>}}
 +
 +
=== Running with Vino (Gnome VNC-Server for root session) ===
 +
 +
Enable the server to be seen via vino-preferences.
 +
Since vino defaults to port : 5900 for connections, we will edit the xrdp configuration file to understand this.
 +
Append the the vino session to xrdp's configuration file (/etc/xrdp/xrdp.ini) with the following code :
 +
{{bc|<nowiki>
 +
# echo "
 +
[xrdp8]
 +
name=Vino-Session
 +
lib=libvnc.so
 +
username=ask
 +
password=ask
 +
ip=127.0.0.1
 +
port=5900
 +
" >> "/etc/xrdp/xrdp.ini"
 +
</nowiki>}}
 +
 +
Remember to restart the xrdp server, and one should be able to connect to the vino session (tested using xfreerdp).
  
 
== Usage ==
 
== Usage ==
Line 44: Line 63:
 
Opening a window manager out of a ''SESSION'' list provided in {{ic|/etc/xrdp/startwm.sh}}.
 
Opening a window manager out of a ''SESSION'' list provided in {{ic|/etc/xrdp/startwm.sh}}.
  
When you just close the RDP connection, you can access the same session again next time you connect with RDP.
+
When you just close the session window and RDP connection, you can access the same session again next time you connect with RDP. When you exit the window manager or desktop environment from the session window, the session will close and a new session will be opened the next time.
When you exit the window manager, the session will close and a new session will be opened the next time.
+
  
 
''xrdp'' checks only if a session with the same geometry is already opened.
 
''xrdp'' checks only if a session with the same geometry is already opened.
Line 51: Line 69:
  
 
== See also ==
 
== See also ==
* [[Virtual Network Computing]] - VNC, an alternative to RDP, also used as backend here
+
* [[Vncserver]] - VNC, an alternative to RDP, also used as backend here

Revision as of 09:31, 8 July 2013

xrdp is a daemon that supports Microsoft's Remote Desktop Protocol (RDP). It uses Xvnc or X11rdp as a backend.

Installation

Users can find install xrdp from the AUR : xrdpAUR.

Fixing Problems in xrdpAUR

You won't have these problems when you use xrdp-gitAUR so you can skip this section when you chose the git version.

If Xvnc (tightvnc) fails with

Fatal server error:
could not open default font 'fixed'

you must create a symlink at /usr/X11R6/lib/X11/fonts pointing to /usr/share/fonts.

xrdp will just fail without giving you that error. You can only see the error message when you try to start Xvnc manually for a test.

To fix the message Couldn't open RGB_DB '/usr/X11R6/lib/X11/rgb' copy /usr/share/X11/rgb.txt to /usr/X11R6/lib/X11/rgb.txt or create a symlink. If this file is missing, standard X11 colors are wrong (pink or blue instead of black) and Xterm is broken.

Autoboot at Startup

When you installed xrdp-gitAUR you can just add rdpd to the DAEMONS section of /etc/rc.conf file.

Otherwise you have to copy /etc/xrdp/xrdp.sh to /etc/rc.d and use that.

Autoboot at Startup with Systemd

The aur xrdp package contains service files for systemd. Enable xrdp.service :

# systemctl enable xrdp.service

Enable xrdp-sesman.service :

# systemctl enable xrdp-sesman.service

Running with Vino (Gnome VNC-Server for root session)

Enable the server to be seen via vino-preferences. Since vino defaults to port : 5900 for connections, we will edit the xrdp configuration file to understand this. Append the the vino session to xrdp's configuration file (/etc/xrdp/xrdp.ini) with the following code :

# echo "
[xrdp8]
name=Vino-Session
lib=libvnc.so
username=ask
password=ask
ip=127.0.0.1
port=5900
" >> "/etc/xrdp/xrdp.ini"

Remember to restart the xrdp server, and one should be able to connect to the vino session (tested using xfreerdp).

Usage

After starting xrdp you can point any RDP client to localhost (on standard RDP port 3389) xrdp will give a small message window.

When you choose sessman-Xvnc you can give a username and password for any account on your host and xrdp will start another Xvnc instance for you. Opening a window manager out of a SESSION list provided in /etc/xrdp/startwm.sh.

When you just close the session window and RDP connection, you can access the same session again next time you connect with RDP. When you exit the window manager or desktop environment from the session window, the session will close and a new session will be opened the next time.

xrdp checks only if a session with the same geometry is already opened. It will start a new session if the geometry/resolution doesn't match.

See also

  • Vncserver - VNC, an alternative to RDP, also used as backend here