Search This Blog

Showing posts with label RDP to XRDP. Show all posts
Showing posts with label RDP to XRDP. Show all posts

Sunday, August 8, 2021

Remote Login to Ubuntu 20 from Windows 10

 Remote login to Ubuntu 20 from Windows 10

Making a note on how to enable remote login to a desktop/notebook having ubuntu 20 installed from windows. As of first steps there are some prerequisites that we need to have and some software we will need to install on the ubuntu machine. I am assuming that you are having sudo access on the ubuntu machine. The steps are outlined as below
1. Login to the ubuntu machine. or ssh username@ip_address
2. Install XRDP Packages
sudo apt-get
sudo apt-get install xrdp

3. Install the desktop environment
sudo apt-get install xfce4
sudo apt-get install xfce-terminal

4. After installation, configure XRDP to use XFCE with below command

sudo sed -i.bak '/fi/a #xrdp multiple users configuration \n xfce-session \n' /etc/xrdp/startwm.sh

5. Allow RDP port in Firewall
sudo ufw allow 3389/tcp

6. Restart the Xrdp application
sudo /etc/init.d/xrdp restart

7. After doing the above steps I was logging in and getting a blank screen. The reason being that xrdp/startwm.sh was missing some configurations

sudo apt-get install xorg
sudo -s
vi /etc/xrdp/startwm.sh

8. Once the script filr opens add the lines below

unset DBUS_SESSION_BUS_ADDRESS
unset XDG_RUNTIME_DIR
.$HOME/.profile


When you open the file it will look as below

vi /etc/xrdp/startwm.sh


9. Finally, reboot the machine/VM after the configurations are set
reboot