# How to Install Remote Desktop (xrdp) on Ubuntu.

## **Install Xrdp on Ubuntu**

**XRDP: Remote Desktop Protocol Server for Unix-like Systems**

XRDP is an open-source server application that allows you to utilize Microsoft's Remote Desktop Protocol (RDP) on operating systems aside from Windows, including Linux and BSD variants. This enables seamless remote desktop access between Windows clients and non-Windows servers, offering a cohesive environment for mixed-OS networks.

xRDP allows users to connect to a Linux machine from another computer using a compatible RDP client.

### Steps Of Installing Xrdp On Ubuntu

* Update Ubuntu Server
* Install Graphical Interface
* Install Xrdp
* Connect To Xrdp

### **Update && upgrade the system**

```
sudo apt-get update -y && apt-get upgrade -y
```

### Installing XRDP

```
sudo apt-get install xubuntu-desktop -y
```

```
sudo apt-get install xrdp -y
```

Check the status and start, enabling the service of xrdp

```
systemctl status xrdp
```

<figure><img src="https://1876135298-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FEC5NwtFshv6EATOemuUn%2Fuploads%2FWyDakf3sWMLYccy6C2Vc%2Fimage.png?alt=media&#x26;token=7399040a-2239-4a28-8cd7-62e1159474b2" alt=""><figcaption></figcaption></figure>

```
systemctl start xrdp
systemctl enable xrdp
```

### Add Xrdp User To SSL-Cert Group

```
sudo usermod -a -G ssl-cert xrdp
```

Now again restart the service

```
systemctl restart xrdp
```

### Firewall configuration&#x20;

```
sudo ufw allow 3389/tcp
```

check the status and start, enable the UFW&#x20;

```
ufw status
```

```
ufw enable 
```

```
ufw reload
```

<figure><img src="https://1876135298-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FEC5NwtFshv6EATOemuUn%2Fuploads%2FOkhfMq8MxEL3cAxj7b2X%2Fimage.png?alt=media&#x26;token=a4e5a01d-db18-4d49-8a34-5d6386d7d29c" alt=""><figcaption></figcaption></figure>

Connect to Remote Desktop&#x20;

<figure><img src="https://1876135298-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FEC5NwtFshv6EATOemuUn%2Fuploads%2F9Q3RGBRoGA5tWikVFJCW%2Fimage.png?alt=media&#x26;token=3824be3a-462f-42ef-b710-ad57ccf82e9f" alt=""><figcaption></figcaption></figure>

Enter Ubuntu server user and password

<figure><img src="https://1876135298-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FEC5NwtFshv6EATOemuUn%2Fuploads%2FWxRXiy4RoeTz6DO8p8f3%2Fimage.png?alt=media&#x26;token=9c3fb98e-12e7-4255-8cc9-de816c716f6b" alt=""><figcaption></figcaption></figure>

<figure><img src="https://1876135298-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FEC5NwtFshv6EATOemuUn%2Fuploads%2FD7JTCFIXkvLJnqIMwJCj%2FScreenshot_23.png?alt=media&#x26;token=6dc92391-e6c3-4e18-ab47-fc9036d7a4e9" alt=""><figcaption></figcaption></figure>

**Troubleshooting -**&#x20;

*If you encounter issues after entering your username and password, as illustrated in the provided image:*

<figure><img src="https://1876135298-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FEC5NwtFshv6EATOemuUn%2Fuploads%2FKd0CLVrx6g5sTjjdZcNv%2FScreenshot%202023-10-20%20021947.png?alt=media&#x26;token=b8869ede-f35b-4ecc-b9a1-b5d5074be84c" alt=""><figcaption></figcaption></figure>

Certainly! Please provide the original markdown content you need help with for a revised version.

```
service xrdp stop
```

```
vi /etc/xrdp/startwm.sh
```

so this content comment out (#)

*"test -x /etc/X11/Xsession && exec /etc/X11/Xsession exec /bin/sh" "/etc/X11/Xsession"*

*Add this content* -&#x20;

**startxfce4**

<figure><img src="https://1876135298-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FEC5NwtFshv6EATOemuUn%2Fuploads%2FdtPrdIwdA95KtCzp6YBb%2Fimage.png?alt=media&#x26;token=0b3e9a60-d72c-497c-8bdf-a22677a66923" alt=""><figcaption></figcaption></figure>

```
service xrdp start
```
