Software & AppsOperating SystemLinux

How To Fix Slow xrdp and xfce4 on Ubuntu > 18.04 for Windows Remote Desktop Connection

Ubuntu 8

In this article, we will discuss how to improve the performance of xrdp and xfce4 on Ubuntu 18.04 and later versions for Windows Remote Desktop Connection. This guide is intended for users experiencing slow performance while using xrdp and xfce4 on Ubuntu.

Quick Answer

To fix slow xrdp and xfce4 on Ubuntu > 18.04 for Windows Remote Desktop Connection, you can optimize the settings in the XRDP configuration file. Adjust the color depth to a value supported by Xorg, such as 24 bits per pixel, and keep the encryption level at the default value of "high" for better security. After making the changes, restart the XRDP service for the improvements to take effect.

Introduction

XRDP is an open-source remote desktop protocol (RDP) server that allows you to connect to a Linux desktop from a Windows machine. XFCE4 is a lightweight desktop environment for UNIX-like operating systems. However, you may experience slow performance when using XRDP with XFCE4 on Ubuntu. This guide will help you optimize the settings to improve the performance.

Backup Your XRDP Configuration File

Before making any changes, it’s crucial to backup your XRDP configuration file. This allows you to revert to the previous settings if something goes wrong. Run the following command to make a backup:

cp /etc/xrdp/xrdp.ini /etc/xrdp/xrdp.ini.bck

This command copies the xrdp.ini file to xrdp.ini.bck in the same directory.

Edit XRDP Configuration File

To improve the performance of XRDP, you need to edit the XRDP configuration file. Use the following command to open the file for editing:

nano /etc/xrdp/xrdp.ini

This command opens the xrdp.ini file in the nano text editor.

Modify XRDP Settings

In the XRDP configuration file, locate the variables max_bpp, xserverbpp, and crypt_level.

Adjust Color Depth

The max_bpp and xserverbpp variables control the color depth used by XRDP. A higher color depth can result in better image quality, but it also requires more bandwidth, which can slow down the performance.

To balance image quality and performance, set these variables to a value supported by Xorg, which is up to 24 bits per pixel. Change these values to:

max_bpp = 24
xserverbpp = 24

Adjust Encryption Level

The crypt_level variable determines the encryption level used for the XRDP session. Higher encryption levels provide better security but can slow down the performance.

However, setting crypt_level to low disables encryption, which is not recommended for a VPS on the Internet due to security risks. Therefore, it is better to keep the default value of high for better security.

Save Changes and Restart XRDP Service

After making the changes, save the XRDP configuration file and exit the editor. Then, restart the XRDP service for the changes to take effect. Use the following command to restart the service:

sudo systemctl restart xrdp

This command restarts the XRDP service, applying the changes you made to the configuration file.

Conclusion

This guide should help improve the performance of XRDP on your Ubuntu VPS. However, keep in mind that XRDP may still have limitations compared to Windows servers. If the performance is still unsatisfactory, consider alternative remote desktop solutions or further optimizing your VPS environment. Remember, always make a backup before making changes to configuration files to prevent any potential issues.

What is xrdp?

xrdp is an open-source remote desktop protocol (RDP) server that allows you to connect to a Linux desktop from a Windows machine.

What is xfce4?

XFCE4 is a lightweight desktop environment for UNIX-like operating systems.

Why is xrdp and xfce4 slow on Ubuntu?

The slow performance of xrdp and xfce4 on Ubuntu can be due to various factors, including suboptimal configuration settings and limited system resources.

How can I backup the XRDP configuration file?

To backup the XRDP configuration file, you can use the command cp /etc/xrdp/xrdp.ini /etc/xrdp/xrdp.ini.bck. This command creates a backup of the xrdp.ini file in the same directory.

How do I edit the XRDP configuration file?

You can edit the XRDP configuration file by using the command nano /etc/xrdp/xrdp.ini. This command opens the xrdp.ini file in the nano text editor.

What variables should I modify in the XRDP configuration file?

In the XRDP configuration file, you should modify the max_bpp, xserverbpp, and crypt_level variables to optimize the performance of xrdp and xfce4 on Ubuntu.

What color depth should I set for xrdp?

To balance image quality and performance, it is recommended to set the max_bpp and xserverbpp variables to a value supported by Xorg, which is up to 24 bits per pixel.

What encryption level should I set for xrdp?

The crypt_level variable determines the encryption level used for the XRDP session. It is recommended to keep the default value of high for better security.

How do I save the changes made to the XRDP configuration file?

After making the changes to the XRDP configuration file, you can save the file by pressing Ctrl + O in the nano text editor, and then exit the editor by pressing Ctrl + X.

How do I restart the XRDP service?

To restart the XRDP service and apply the changes made to the configuration file, you can use the command sudo systemctl restart xrdp.

Leave a Comment

Your email address will not be published. Required fields are marked *