Remote Desktop Protocol (RDP) with Ubuntu and XRDP

xrdp – an open-source Remote Desktop Protocol server


Using Windows RDP to Access your Ubuntu Instance
How to use xRDP for remote access to Ubuntu 14.04
Ubuntu 14.04 – How to install xrdp in Ubuntu 14.04

XRDP – Quick fix – Custom XRDP install on Ubuntu 15.04 using systemd

$ sudo apt-get install ubuntu-desktop 
$ sudo apt-get install xrdp
$ sudo /etc/init.d/xrdp start
$ sudo adduser USERNAME
$ service xrdp restart
==== AUTHENTICATING FOR org.freedesktop.systemd1.manage-units ===
Authentication is required to manage system services or units.
Multiple identities can be used for authentication:
 1.  Andreas Bachmann,,, (andreas)
 2.  rdpuser
Choose identity to authenticate as (1-2): Failed to restart xrdp.service: Connection timed out

$ sudo service xrdp restart
A dependency job for xrdp.service failed. See 'journalctl -xe' for details.

# /etc/init.d/xrdp start
[....] Starting xrdp (via systemctl): xrdp.serviceA dependency job for xrdp.service failed. See 'journalctl -xe' for details.

# systemctl enable xrdp-sesman.service
Created symlink from /etc/systemd/system/ to /lib/systemd/system/xrdp-sesman.service.

# systemctl enable xrdp.service
Synchronizing state for xrdp.service with sysvinit using update-rc.d...
Executing /usr/sbin/update-rc.d xrdp defaults
Executing /usr/sbin/update-rc.d xrdp enable
# cat /lib/systemd/system/xrdp.service
Description=xrdp daemon
Requires=xrdp-sesman.service xrdp-sesman.service

ExecStart=/usr/sbin/xrdp $XRDP_OPTIONS
ExecStop=/usr/sbin/xrdp $XRDP_OPTIONS --kill

# cat /lib/systemd/system/xrdp-sesman.service
Description=xrdp session manager

ExecStart=/usr/sbin/xrdp-sesman $SESMAN_OPTIONS
ExecStop=/usr/sbin/xrdp-sesman $SESMAN_OPTIONS --kill

### Change in /lib/systemd/system/xrdp.service and /lib/systemd/system/xrdp-sesman.service:
### /etc/sysconfig/xrdp -> /etc/default/xrdp

# service xrdp start
Warning: xrdp.service changed on disk. Run 'systemctl daemon-reload' to reload units.
A dependency job for xrdp.service failed. See 'journalctl -xe' for details.

# systemctl daemon-reload

# service xrdp start
--> Hangs?!

# /usr/sbin/xrdp
# /usr/sbin/xrdp-sesman
--> Works!

# /usr/sbin/xrdp
running in daemon mode with no access to pid files, quitting

# sudo mkdir /var/run/xrdp
# sudo chown xrdp:xrdp /var/run/xrdp

Leave a Reply

Your email address will not be published. Required fields are marked *