Remote Desktop Access setup with xrdp on Raspberry Pi raspbian stretch

Remote Desktop Access setup with xrdp on Raspberry Pi raspbian stretch

In this tutorial, we are going to access our Raspberry Pi’s desktop using xrdp. This is a continuation to the earlier post on No Keyboard, Ethernet & Monitor: Setting up Raspberry Pi in headless Mode .

The Microsoft Remote Desktop Protocol (RDP) provides remote display and input capabilities over network connections for Windows-based applications running on a server. RDP is designed to support different types of network topologies and multiple LAN protocols.

There are several different implementations of the RDP protocol for Linux including xrdp. The xrdp project the remote desktop protocol to provide access to a Linux desktop not a Windows desktop. The xrdp server is able to work with other open source RDP clients as well as with Microsoft’s Remote Desktop Connection program. This surely is one of the easiest way to remotely access raspberry pi with Desktop display.

Read also:

 

So lets get started but you will need to setup SSH first in order to access the Raspberry Pi, refer to: No Keyboard, Ethernet & Monitor: Setting up Raspberry Pi in headless Mode  on how to achieve that and enable VNC server using raspi-config -> interfacing options -> VNC. Then run this command to install xrdp from CLI:

sudo apt-get install xrdp

 

 

putty install xdrp - steinacoz
putty install xdrp – steinacoz

 

Xdrp  will be installed as a service and will be started automatically. There is no further configuration needed to make a remote connection. On a Windows PC, launch the Remote Desktop Connection program. In the “Computer:” field, enter the IP address of your Pi. You can refer to this on how to get the IP Address using Angry IP Scanner: No Keyboard, Ethernet & Monitor: Setting up Raspberry Pi in headless Mode 

 

 

remote desktop connection - steinacoz
remote desktop connection – steinacoz

 

If the connection is successful, a new window will surface which will prompt for the Pi’s security credentials. Input the username and password and you are in.

enter username and password xrdp - steinacoz
enter username and password xrdp – steinacoz

 

You now have full access to your Raspberry Pi Desktop if not the whole system. That is it for this tutorial, stay tuned for the next one. You should be seeing an image like this by now:

 

raspberry pi desktop - steinacoz
raspberry pi desktop – steinacoz

 

5 thoughts on “Remote Desktop Access setup with xrdp on Raspberry Pi raspbian stretch

  1. I have several Raspberry Pi and have been using xrdp for a long time with all of them (using rdesktop on Linux Mint). I decided to upgrade some of the machines to stretch (from jessie). On the upgraded Pi machines xrdp no longer works – after completing the login window it disappears leaving the blue xrdp screen blank and this continues until I manually close the window. I get the same results whether I use the host name or IP for the Pi. SSH still connects without problem.

    Any thoughts as to a fix for this problem would be greatly appreciated.

    Peter

    1. Can you do a clean install of the OS instead of upgrade. Then install xdrp using its command sudo apt-get install xdrp.

      Don’t forget to enable vnc server from raspig-config

  2. I’m with Peter Rich here…
    Both clean installs and upgrades to RPI break XRDP.
    I’ve been using it for a couple years but something March/April broke it to the point I can’t get it working on even a clean install.

    1. I just followed your instruction to ENABLE VNC on a new install and now XRDP worked.
      I never had to do that previously – in fact I use to have to UNINSTALL vnc-server.

      Now I have to enable it – thanks for the tip (wish I found it sooner)!

  3. I would also add the following, which seems to be required for sudo apps like shutdown, reboot, GParted, raspberry configuration,etc.

    # to repair xrdp append ‘@xhost si:localuser:root’ to /home/pi/.config/lxsession/LXDE-pi/autostart othterwise sudo gui like
    echo ‘@xhost si:localuser:root’ | sudo tee -a /home/pi/.config/lxsession/LXDE-pi/autostart
    sudo reboot # required

Leave a Reply

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