Software & AppsOperating SystemLinux

How To Fix XRDP Gray Screen Issue in Ubuntu for Windows RDP Connection

Ubuntu 18

If you are using Ubuntu and trying to establish a Remote Desktop Protocol (RDP) connection from a Windows system, you might encounter a gray screen issue. This issue typically manifests as a gray or black pixelated screen with an “X” cursor, preventing you from accessing the Ubuntu system remotely. This article provides several solutions to help you troubleshoot and resolve this issue.

Prerequisites

Before proceeding, ensure that you have administrative access to the Ubuntu system. You should also have a basic understanding of Linux terminal commands.

Update Your System

Before you start troubleshooting, it’s always a good idea to ensure your system is up to date. This can be done by running the following command in the terminal:

sudo apt-get update

This command fetches the latest updates from all the repositories configured on your Ubuntu system.

Install XRDP and XFCE4

XRDP is an open-source implementation of the Microsoft RDP that allows you to control remote systems with the same look and feel as local Windows desktops. XFCE4 is a lightweight desktop environment for Unix-like operating systems.

You can install both XRDP and XFCE4 using the following commands:

sudo apt-get install xrdp
sudo apt-get install xfce4

Set XFCE4 as the Default Session

To avoid the gray screen issue, you need to set XFCE4 as the default session. This can be done by running the following command:

echo xfce4-session > ~/.xsession

This command writes xfce4-session into the .xsession file in your home directory, setting XFCE4 as the default session.

Restart XRDP Service

After setting XFCE4 as the default session, you need to restart the XRDP service for the changes to take effect. This can be done by running the following command:

sudo service xrdp restart

Check Hostname Configuration

Sometimes, the issue might be due to incorrect hostname configuration. You can check your hostname configuration by running the following command:

hostname -I

This command will display the IP addresses associated with your hostname. Ensure that the IP address you are using to establish the RDP connection is listed here.

Alternative Solutions

If you are still encountering the gray screen issue after following the above steps, you might want to consider the following alternative solutions:

Using ALT + F2

Pressing ALT + F2 before clicking on the gray screen might bring up the panel, allowing you to access the system.

Creating a New User

The issue might be related to your user profile. You can create a new user and try logging in with RDP using that user. If it works, you might need to copy the working home directory to the problematic user’s home directory and change ownership.

Using X2Go

X2Go is an open-source remote desktop software for Linux that uses the NX technology protocol. You can install X2Go using the following command:

sudo apt-get install x2goserver

After installing X2Go, you can use it as an alternative to XRDP for establishing remote desktop connections.

Conclusion

The XRDP gray screen issue can be quite frustrating, but it can usually be resolved by setting XFCE4 as the default session and ensuring your hostname configuration is correct. If all else fails, consider using an alternative solution like creating a new user or using X2Go. Hopefully, this guide has helped you resolve the issue and establish a successful RDP connection from your Windows system to your Ubuntu system.

What is XRDP?

XRDP is an open-source implementation of the Microsoft Remote Desktop Protocol (RDP) that allows you to control remote systems with the same look and feel as local Windows desktops.

What is XFCE4?

XFCE4 is a lightweight desktop environment for Unix-like operating systems, including Ubuntu. It provides a user-friendly interface for users to interact with their system.

Why am I seeing a gray screen when trying to establish an RDP connection from Windows to Ubuntu?

The gray screen issue typically occurs when the default session for XRDP is not set correctly or when there are issues with the hostname configuration. This prevents you from accessing the Ubuntu system remotely.

How can I update my Ubuntu system?

You can update your Ubuntu system by running the command sudo apt-get update in the terminal. This command fetches the latest updates from all the repositories configured on your system.

How do I install XRDP and XFCE4?

You can install XRDP and XFCE4 by running the commands sudo apt-get install xrdp and sudo apt-get install xfce4 in the terminal, respectively.

How do I set XFCE4 as the default session?

To set XFCE4 as the default session, you can run the command echo xfce4-session > ~/.xsession in the terminal. This command writes xfce4-session into the .xsession file in your home directory.

How do I restart the XRDP service?

After setting XFCE4 as the default session, you can restart the XRDP service by running the command sudo service xrdp restart in the terminal.

How can I check my hostname configuration?

You can check your hostname configuration by running the command hostname -I in the terminal. This command will display the IP addresses associated with your hostname.

What can I do if I’m still encountering the gray screen issue?

If you are still encountering the gray screen issue, you can try using ALT + F2 before clicking on the gray screen to bring up the panel. Alternatively, you can create a new user and try logging in with RDP using that user. If all else fails, you can consider using X2Go as an alternative remote desktop software.

Leave a Comment

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