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.
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.
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.
The slow performance of xrdp and xfce4 on Ubuntu can be due to various factors, including suboptimal configuration settings and limited system resources.
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.
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.
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.
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.
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.
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
.
To restart the XRDP service and apply the changes made to the configuration file, you can use the command sudo systemctl restart xrdp
.