xrdp immediately terminated session
I have had the same issue, and I followed these instructions from https://askubuntu.com/questions/234856/unable-to-do-remote-desktop-using-xrdp
- install xrdp which uses the remote desktop protocol to present a GUI to the user. It can provide a fully functional Linux terminal server, capable of accepting connections from rdesktop, freerdp, and Microsoft's own terminal server / remote desktop clients. xrdp is the daemon that handles RDP remote desktop access from Windows machines to Linux
- edit the "/etc/xrdp/xrdp.ini" file to include the line: address=0.0.0.0 right under #background=626x72 line. 0.0.0.0 is the local server address of xrdp
- Restart xrdp service
- allow xrdp port (probably 3389) through firewall
- Install xfce4 desktop environment an update to xfce, minimalistic faster and lightweight sudo apt-get install xfce4
- sudo apt-get install xfce4-terminal : way better than xterm
- sudo apt-get install gnome-icon-theme-full tango-icon-theme : installs icon sets
- Now we modify 2 files to make sure xrdp uses xfce4
- echo xfce4-session >~/.xsession
- secondly we modify startup file for xRDP located at /etc/xrdp/startwm.sh so it will start xfce4. Replace the last line with startxfce4 (before it had something which started with a ., but no matter whatever it is, just replace the last line)
- restart xrdp service: sudo service xrdp restart
- Now you are ready to log into the computer from client using Remote Desktop (mstsc.exe). Just supply the ipv4 or hostname of the VNC server.