I recommend Lubuntu to use with xrdp, because Ubuntu's default GUI, Unity, does not work with xrdp. Lubuntu uses LXDE which is compatable with xrdp.
# apt-get install xrdp
blahblah
By default, RDP uses 3389 port.
# ufw allow from any to any port 3389
Rule added
Ref: http://c-nergy.be/blog/?p=10887
Since unknonw, Xorg disallow execution from remote session, which blocks xrdp to login.
Open /bin/X11/Xwrapper.config
then change allowed_user
from console
to anybody
.
Common Name is important. Use your server's URL or hostname.
# cd /bin/xrdp
# rm cert.pem key.pem
# openssl req -x509 -newkey rsa:2048 -nodes -keyout key.pem -out cert.pem -days 365
Generating a 2048 bit RSA private key
...
...
writing new private key to 'key.pem'
-----
You are about to be asked to enter information that will be incorporated
into your certificate request.
What you are about to enter is what is called a Distinguished Name or a DN.
There are quite a few fields but you can leave some blank
For some fields there will be a default value,
If you enter '.', the field will be left blank.
-----
Country Name (2 letter code) [AU]:.
State or Province Name (full name) [Some-State]:.
Locality Name (eg, city) []:
Organization Name (eg, company) [Internet Widgits Pty Ltd]:.
Organizational Unit Name (eg, section) []:
Common Name (e.g. server FQDN or YOUR name) []:server-name
Email Address []:
# chown xrdp:root *.pem
# chmod 644 cert.pem
# chmod 600 key.pem
# service xrdp restart
On Windows PC, open Remote Desktop Client (start - run - mstsc
) then input your Linux PC's IP address.
It should work with some warning messages (related to certificates).