How to Install Ubuntu Xrdp Server on (18.04 Version)

Source: Internet
Author: User
Keywords ubuntu Xrdp server ubuntu rdp server linux serve
Tags linux server ubuntu linux ubuntu xrdp server ubuntu rdp server windows remote desktop

Xrdp is an open source implementation of Microsoft Remote Desktop Protocol (RDP) that allows you to graphically control remote systems. With RDP, you can log in to a remote computer and create a real desktop session, just as you log in to your local computer.

This tutorial shows how to install and configure Xrdp server on Ubuntu 18.04.

If you want an open source remote desktop access solution, use VNC.

Install the desktop environment

Usually, the Linux server does not have a desktop environment installed. Our first step is to install X11 and a lightweight desktop environment that will act as the backend for Xrdp.

There are several desktop environments (DE) available in the Ubuntu repository. We will install Xfce. This is a fast, stable, and lightweight desktop environment that is ideal for use on remote servers.

Type the following command as a user with sudo privileges to install Xfce on your server:

sudo apt update sudo apt install xfce4 xfce4-goodies xorg dbus-x11 x11-xserver-utils

Depending on your system, downloading and installing the Xfce package will take some time.

Install Xrdp

Xrdp packages are available in the default Ubuntu repository. To install it, run:

sudo apt install xrdp

After the installation process is complete, the Xrdp service will start automatically. You can verify that Xrdp is running by typing:

The output will look like this:

xrdp.service - xrdp daemon    Loaded: loaded (/lib/systemd/system/xrdp.service; enabled; vendor preset: enabled)    Active: active (running) since Sun 2019-07-28 22:40:53 UTC; 4min 21s ago      Docs: man:xrdp(8)            man:xrdp.ini(5)   ...

Configure Xrdp

The Xrdp configuration file is located in the / etc / xrdp directory. For basic Xrdp connection, we only need to configure Xrdp to use Xfce. To do this, open the following file in a text editor:

/etc/xrdp/xrdp.ini
sudo nano /etc/xrdp/xrdp.ini

Add the following line at the end of the file:

exec startxfce4

Save the file and restart the Xrdp service:
sudo systemctl restart xrdp

Configure firewall
By default, Xrdp listens on port 3389 on all interfaces. If you are running a firewall on an Ubuntu server (which should always be done), you need to add a rule to enable traffic on the Xrdp port.

To allow access to the Xrdp server from a specific IP address or IP range, in this example 192.168.1.0/24, run the following command:
If you want to allow access from anywhere (highly recommended for security reasons), run:
For added security, you can consider setting Xrdp to listen on only the local host and create an SSH tunnel that will securely forward traffic from the local computer on port 3389 to a server on the same port. Another security option is to install OpenVPN and connect to the Xrdp server over a private network.

Connect to Xrdp server
Now that you have set up the Xrdp server, it's time to open the Xrdp client and connect to the server.

If you are a Windows user, you can use the default RDP client. Type "remote" in the Windows search bar and click "Remote Desktop Connection". This will open the RDP client. Enter the remote server IP address in the computer field and click Connect.

On the login screen, enter your username and password, and click OK.

After logging in, you should see the default Xfce desktop. It should look like this:

You can now start interacting with the remote XFCE desktop from your local computer using your keyboard and mouse.

in conclusion
After installing the Xrdp server, you can manage the Ubuntu 18.04 server from your local desktop using an easy-to-use graphical interface.
Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.