Raspberry Pi Remote Login with XRDP


Raspberry Pi Remote Login with XRDP

Introduction

I’ve recently had a need to interact with Raspberry Pi from a Windows machine. First thing that catched my eye was Raspberry Pi Remote Login with XRDP.

xrdp provides a graphical login to remote machines using Microsoft Remote Desktop Protocol (RDP). xrdp accepts connections from a variety of RDP clients: FreeRDP, rdesktop, NeutrinoRDP and Microsoft Remote Desktop Client (for Windows, Mac OS, iOS and Android). It’s worth mentioning that RDP transport is encrypted using TLS by default.

So, It had a neat way of connecting to RaspPi through the Remote Desktop Connection already present on Windows.

Raspberry Pi Remote Login with XRDP Remote Desktop Connection

XRDP Setup

Most distribution should distribute the latest release of xrdp in their repository.

Debian/Ubuntu:

# apt-get install xrdp

RedHat/CentOS:

# yum install epel-release
# yum install xrdp
Start the service:
# service xrdp (re)start
Note: Xrdp connect to sesman to verify the user name / password, and also starts the user session if credentials are ok. You must also start /usr/sbin/xrdp-sesman before trying to login (if it’s not already running).
# service xrdp-sesman (re)start
A number of option (session types) is present on the login panel:
  • Xorg : (commonly referred as simply X) is the most popular display server
  • Xvnc : Unix VNC server
  • Console : Similar to vnc-any
  • vnc-any : Virtual Network Computing – graphical desktop sharing system (uses RFB)
  • sesman-any :
  • rdp-any : Remote Desktop Protocol
  • neutrinordp-any : Fork of FreeRDP maintained by xrdp team
Defult Xorg in this case was just fine.
Raspberry Pi Remote Login with XRDP Login Panel
xrdp should listen on both ipv4 and ipv6. In case you have xrdp listening only on ipv6, you can try and force it to listen to ipv4 only by entirely disabling ipv6:
# nano /etc/modprobe.d/ipv6.conf
# Don't load ipv6 by default
alias net-pf-10 off
#alias ipv6 off

# added to disable ipv6
options ipv6 disable_ipv6=1
# added to prevent ipv6 driver from loading
blacklist ipv6
Note: XRDP might fail working this way too. Another frequently mentioned solution is to explicitly pass ipv6 to ipv4. I didn’t have such problems this time
Enable start on boot:
# update-rc.d xdrp enable

Raspberry Pi Remote Login with XRDP RaspDesktop

 

Raspberry Pi Remote Login with XRDP Conclusion

Very usefull tool. Especially when you have a raspberry pi placed somewhere without peripherals available. Check some alternatives:

  • TeamView and Raspberry Pi
  • Raspbeery Pi Remote Login with VNC
  • SSH + X11 Forwarding + Raspbeery Pi

 

Documentation Box
Download Box