I am very new to Ubuntu and I just installed Ubuntu 20.04 LTS today and trying to setup XRDP so that I can remote -in into my Ubuntu machine from Windows
I executed the following steps:
sudo apt install xrdp
I then tried all of these but only one at-a-time
sudo apt-get install kde-full
sudo apt-get install kde-desktop
sudo apt-get install kde-standard
sudo apt-get install kde-plasma-desktop
echo "startkde" > ~/.xsession
sudo systemctl restart xrdp
when I try to connect, I get the login screen from xrdp and I select xorg and enter my username and password.
But then RDP session ends immediately
Can someone please help me set up XRDP and figure out what might be the issue? I can't stand gnome desktop. I would like to have KDE with XRDP.
Thanks
Best Answer
This is how I configure XRDP for KDE-Plasma (works on my Ubuntu 20.04)
Set session to plasma:
variables for xsessionrc:
If you have plasma installed, you can also login, and execute this on a console:
to see if your values are the same.
Now to avoid the "authentication-required"-dialog:
Partial credits:
In case of error:
or just change the default-session-manager:
To allow root-access, go to
/etc/pam.d/sddm
and comment out this line:2021 Update/Note:
Latest version of Windows 10 comes with an SSH client (and server).So you can now natively tunnel your RDP-session over internet from a windows-box.
(I guess this is why we want xrdp in the first place)
So to do this, create a ssh-key:
With this command, ssh-keygen generates an RSA public-key in
along with id_rsa (private key)
Now append the content of id_rsa.pub (text-file) to
in your linux box (this allows ssh-login for the user with home-directory ~ with the rsa-private-key and validates with the rsa-public-key - only copy the public key!)
Then your can open a ssh-connection with port-forwarding:
(replace 71.44.33.22 with your ip/domain) Now you can connect with mstsc to
127.0.0.1:1234
which gets forwarded to71.44.33.22:3389
. 3389 is the default-xrdp-port.Please validate that the ssh-login works in the first place, before you try to connect with mstsc.
Also, if you do this, please consider your rsa-keys as compromised, as Microsoft is a surveillance company. Don't do this for serious stuff. ! You have now been warned !
That said, your private Linux box is most-likely nothing that warrants this kind of seriousness.
Note on Syntax:
-C for compression (argh, the speed, the speed).
You can also save the remote desktop session connection settings to a file, e.g. "C:\Program Files\Connections\Computername"
together with a connect.bat with content
Create a shortcut for the .bat file on the desktop with icons from
C:\Windows\System32\mstsc.exe
orC:\Windows\SysWOW64\mstsc.exe
.Best Linux program to connect to XRPD is remmina (IMHO).
To install: