XRDP is a remote desktop service for the LINUX servers which allows us to connect remote Linux desktop systems over Microsoft RDP protocol. XRDP also supports two-way clipboard transfer (text, bitmap, file), audio redirection, and drive redirection (mount local client drives on the remote machines).
To install XRDP, run the following command in the terminal:
Command: apt install xrdp
After installing XRDP, enable the xrdp service by using the following systemctl command:
Command: systemctl enable –now xrdp
To connect with the RDP session you may need to allow the port in firewall which by default is closed. Run the below command to open the port.
Command: ufw enable
Command: sudo ufw allow from any to any port 3389 proto tcp
To test the connection using the Remote Desktop Connection client on Windows, first launch the Remote Desktop Connection app. Enter your remote server’s public IP and username into the fillable text boxes for Computer and User name.
You may need to press the down arrow for Show Options to input the username:
Press the Connect button. If you receive an alert that the Remote Desktop can’t connect to the remote computer, check that you have turned on the Remote Desktop option in your system settings.
Then, enter your remote server’s username and the password you created for user during the initial server setup. Press Ok.
Once you have logged in, you should be able to access your Ubuntu Desktop environment:
Furthemore, default xrdp does not allow root to perform remote desktop connection. So you should have a look at the following file /etc/xrdp/sesman.ini and check if there is any AllowRootLogin option.
Set the value to 1, true or yes to enable root login on terminal server as shown in below screenshot.
In this article, you configured xrdp to connect to a graphical desktop for your remote Ubuntu server over an RDP connection from a local machine.
You may also like:- How to Change User in Linux Command Line
- [Solution] Missing logstash-plain.log File in Logstash
- Understanding Netstat – The Network Monitoring Tool
- Top 40 Useful Linux Command Snippets
- Using Elasticsearch Ingest Pipeline to Copy Data from One Field to Another
- Top 10 Useful Windows Commands
- Essential Commands For Process Management in Kali Linux
- How To Install Python 2.7.18 From The Source
- How To Parse SSH Authentication Logs with Logstash
- A Comprehensive Guide to File System Commands in Linux