Software & AppsOperating SystemLinux

How To Fix “Login Failed for Display: 0” Error When Using XRDP on Ubuntu 18.04.3 LTS

ubuntu 3

Encountering the “Login Failed for Display: 0” error when using XRDP on Ubuntu 18.04.3 LTS can be a frustrating experience. However, there are several solutions to this issue. This article will guide you through the process of resolving this error, explaining each step in detail.

Understanding the Error

The “Login Failed for Display: 0” error typically occurs when there’s a compatibility issue between the XRDP server and the Xorg server. XRDP is a free and open-source remote desktop server that provides a graphical interface to remote users. Xorg, on the other hand, is the public, open-source implementation of the X Window System that provides the graphical environment.

Solution 1: Install the xorgxrdp-hwe-18.04 Package

The first solution involves installing the xorgxrdp-hwe-18.04 package. This package is designed to be compatible with the XRDP server. To install it, open the terminal and run the following command:

sudo apt-get install xorgxrdp-hwe-18.04

The sudo command is used to run the following command with root privileges, apt-get is the package handling utility in Ubuntu, and install is the command to install the new package.

Solution 2: Downgrade the xorg-xserver-core Packages

If the first solution doesn’t work, you can try downgrading the xorg-xserver-core packages. To do this, run the following commands in the terminal:

sudo apt-get install xserver-xorg-core
sudo apt-get -y install xserver-xorg-input-all

The -y option is used to automatically answer yes to all prompts, which might be useful if you want to avoid answering any interactive questions.

Solution 3: Use Compiled Packages from Thiago

Another solution is to remove the existing XRDP package and install the compiled packages from Thiago. To do this, run the following commands:

sudo add-apt-repository ppa:martinx/xrdp-hwe-18.04
sudo apt-get update
sudo apt-get install xrdp xorgxrdp

The add-apt-repository command is used to add PPAs (Personal Package Archives) to your source list. The update command is used to resynchronize the package index files from their sources.

Solution 4: Use the Installation Scripts

The final solution is to remove the existing XRDP package and automate the XRDP installation using the provided installation scripts. There are two options available:

  • To use Ubuntu repository packages, follow the instructions and download the script from this blog page.
  • To compile from source, follow the instructions and download the script from this blog page.

Final Checks

After trying the above solutions, ensure that you have set a different username and password for XRDP than the one you are using to connect. Avoid using usernames that start with a number or capital letter, as these can cause login issues. If you are using GNOME as your desktop environment, be aware that there may be known issues. Consider trying a different desktop environment if problems persist.

Conclusion

The “Login Failed for Display: 0” error when using XRDP on Ubuntu 18.04.3 LTS can be resolved by following the above solutions. Remember to carefully follow the instructions provided in each solution and make any necessary adjustments based on your specific setup. With a bit of patience and troubleshooting, you should be able to resolve this issue and continue using XRDP on Ubuntu 18.04.3 LTS without any problems.

What is XRDP?

XRDP is a free and open-source remote desktop server that provides a graphical interface to remote users. It allows users to connect to a remote machine and access its desktop environment.

What is Xorg?

Xorg is the public, open-source implementation of the X Window System. It provides the graphical environment for Unix-like operating systems, including Ubuntu.

Why am I getting the “Login Failed for Display: 0” error?

The "Login Failed for Display: 0" error typically occurs when there’s a compatibility issue between the XRDP server and the Xorg server. It means that the XRDP server is unable to establish a connection with the Xorg server.

How can I install the `xorgxrdp-hwe-18.04` package?

To install the xorgxrdp-hwe-18.04 package, open the terminal and run the command sudo apt-get install xorgxrdp-hwe-18.04. This command will install the package with root privileges.

How can I downgrade the `xorg-xserver-core` packages?

To downgrade the xorg-xserver-core packages, run the following commands in the terminal:

sudo apt-get install xserver-xorg-core
sudo apt-get -y install xserver-xorg-input-all

These commands will install the previous version of the xorg-xserver-core packages.

How can I remove the existing XRDP package and install the compiled packages from Thiago?

To remove the existing XRDP package and install the compiled packages from Thiago, run the following commands:

sudo add-apt-repository ppa:martinx/xrdp-hwe-18.04
sudo apt-get update
sudo apt-get install xrdp xorgxrdp

These commands will add the PPA, update the package index, and install the XRDP and xorgxrdp packages.

Where can I find the installation scripts for XRDP?

The installation scripts for XRDP can be found on two different blog pages. If you want to use Ubuntu repository packages, download the script from this blog page. If you prefer to compile from source, download the script from this blog page.

What are some final checks to ensure XRDP is working properly?

After trying the above solutions, make sure that you have set a different username and password for XRDP than the one you are using to connect. Avoid using usernames that start with a number or capital letter, as these can cause login issues. Additionally, if you are using GNOME as your desktop environment, be aware that there may be known issues. Consider trying a different desktop environment if problems persist.

Can I use XRDP on other Ubuntu versions?

Yes, XRDP can be used on other Ubuntu versions as well. However, the specific steps and packages required may vary depending on the version. It is recommended to refer to the official documentation or community resources for instructions tailored to your specific Ubuntu version.

Leave a Comment

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