This guide includes some content from the official guide "Building on Debian 8", plus some updates.
Tested on Xubuntu 16.04, fresh install. I'm using xrdp v.0.9.6 in this guide: some adaptations may be necessary for other releases. Since the official guide uses an environment variable during the build, the whole setup should be performed within a single shell console.