Skip to content

Instantly share code, notes, and snippets.

@Nivratti
Last active February 13, 2022 07:32
Show Gist options
  • Save Nivratti/5eb6cf074b4c450deecab1463100e99b to your computer and use it in GitHub Desktop.
Save Nivratti/5eb6cf074b4c450deecab1463100e99b to your computer and use it in GitHub Desktop.
Setup Remote Desktop (RDP) on Ubuntu 18.04

How to Install Xrdp Server (Remote Desktop) on Ubuntu 18.04

  1. Install Xfce package:
sudo apt update
sudo apt install -y xfce4 xfce4-goodies xorg dbus-x11 x11-xserver-utils
  1. Installing Xrdp:
sudo apt install -y xrdp
sudo systemctl status xrdp
sudo adduser xrdp ssl-cert
  1. Configuring Xrdp
sudo nano /etc/xrdp/xrdp.ini

and add line at end:

exec startxfce4
  1. restart the Xrdp service
sudo systemctl restart xrdp
  1. Configuring Firewall
sudo apt install ufw
sudo ufw allow from 192.168.1.0/24 to any
sudo ufw allow 3389

sudo iptables -A INPUT -p tcp --dport 3389 -j ACCEPT
 
  1. Modify the Xwrapper.config file when you get a blank screen when removing in.
sudo nano /etc/X11/Xwrapper.config

Change:

allowed_users=console

to

allowed_users=anybody
  1. Restart xrdp service:
sudo systemctl restart xrdp
  1. Create a Sudo User
sudo adduser [username]
sudo usermod -aG sudo [username]

Connecting to the Xrdp Server


  1. Install Remmina RDC
sudo snap install -y remmina
  1. Start Remmina from application menu and enter ip address and credientials to establish rdp connection.

References:

  1. https://linuxize.com/post/how-to-install-xrdp-on-ubuntu-18-04/

  2. https://www.interserver.net/tips/kb/install-xrdp-ubuntu-server-xfce-template/

  3. http://ubuntuhandbook.org/index.php/2018/07/install-latest-remmina-rdc-ubuntu-18-0416-04/

  4. https://linuxize.com/post/how-to-create-a-sudo-user-on-ubuntu/

  5. https://ekozel.com/2019/10/05/setup-remote-desktop-xrdp-on-debian-9/

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment