General / Server / Remote desktop access to an Ubuntu server - using rdp
Remote Access to ubuntu server - using RDP
-
STEPS
1. Install xrdp on Ubuntu
Check the statussudo apt update sudo apt install xrdp -y sudo systemctl status xrdp 2. Install Desktop Environment (UI)
sudo apt install xfce4 3. Configure xrdp Port (Optional)
Use a text editor, like nano, to edit the xrdp configuration file, xrdp.ini:
Locate the port directive in the [Globals] section and set the desired value. In this example, the RDP port is 49952:sudo nano /etc/xrdp/xrdp.ini port=49952 sudo systemctl restart xrdp 4. Open a Port for Incoming Traffic in ufw
Check the status of the ufw firewall:
If the firewall is inactive, use the following command to turn on ufw:sudo ufw status
Allow traffic on port 3389 or choose a different port for your RDP connection. The following command allows RDP connections on port 49952:sudo ufw enable
Reload the ufw firewall tool to apply the changes:sudo ufw allow 49952/tcp sudo ufw reload 5. Enable session
add at the end of the above filesudo nano /etc/xrdp/startwm.sh
restart the machineexport GNOME_SHELL_SESSION_MODE=ubuntu export XDG_CURRENT_DESKTOP=ubuntu:GNOME reboot OR sudo shutdown -r now 5. Configure Remote Desktop Connection on Windows
-
Install Firefox Browser
sudo apt-get purge firefox sudo apt-get install firefox xdg-settings get default-web-browser