Installing xrdp on Ubuntu 15.10

I recently decided to install RDP on my Ubuntu 15.10 guest host, so I could access it from my Windows environment. The native RDP worked fine except for clipboard not working which was a requirement. So I decided to install the latest version of xrdp in order to get that functionality. The installation instructions are pretty straightforward, but they are missing one key feature, and that is a login profile that is heavily customized for bash.

While the build and installation process was pretty straight-forward, I was unable to complete a login after connecting to my guest with the Windows RDP client. After spending hours trying to diagnose the cause, I found that my profile was failing to load in the RDP startup session - startvm.sh - because it runs in sh not bash, and my profile is heavily customized for bash. So here's what I had to do to get xrdp to load my bash profile and allow me to login:
  1. Create a bash version of startvm.sh
  2. $ sudo vi /etc/xrdp/startwm-bash.sh
    #!/bin/bash -l
    . /etc/xrdp/startwm.sh

  3. Make startvm-bash.sh executable
  4. sudo chmod 755 /etc/xrdp/startwm-bash.sh

  5. Edit the file /etc/xrdp/sesman.ini and set startvm-bash.sh as the DefaultWindowManager
  6. DefaultWindowManager=startwm-bash.sh

  7. Reload the xrdp configuration and restart the services
  8. sudo systemctl daemon-reload
    sudo systemctl restart xrdp-sesman.service

RDP is now working with clipboard support!

Comments

Popular posts from this blog

Forced birth is slavery

Willful ignorance is a spectrum

The Right to Bear Arms is Outdated and Needs to be Repealed from the Constitution