Software & AppsOperating SystemLinux

How To Enable Remote Desktop for Root in Ubuntu 18.10 with XRDP

Ubuntu 9

In this tutorial, we will guide you through the process of enabling remote desktop access for the root user in Ubuntu 18.10 using XRDP. XRDP is an open-source remote desktop protocol server that allows you to remotely administer your Ubuntu 18.10 machine.

Please note that enabling root login via XRDP is generally not recommended due to security concerns. It is safer to use sudo for privileged tasks. However, for the purposes of this guide, we will proceed with enabling root login.

Quick Answer

To enable remote desktop for the root user in Ubuntu 18.10 with XRDP, you need to configure the sesman.ini file to allow root login, create a .xsession file to configure the gnome desktop, and modify the xrdp.ini file to enable multi-user remote login. However, it is important to note that enabling root login via XRDP is generally not recommended due to security concerns. It is safer to use sudo for privileged tasks.

Prerequisites

Before we begin, make sure you have:

  • A machine running Ubuntu 18.10.
  • Root or sudo access to the machine.
  • XRDP installed on the machine. If not, you can install it using the command sudo apt-get install xrdp.

Enabling Root Login for XRDP

Step 1: Configure sesman.ini

Open the /etc/xrdp/sesman.ini file using a text editor of your choice. For example, you can use nano:

sudo nano /etc/xrdp/sesman.ini

In this file, look for the AllowRootLogin option. If it’s not present, add it under the [Security] section. Set the value to true to enable root login on the terminal server.

[Security]
AllowRootLogin=true

Save and close the file. In nano, you can do this by pressing Ctrl+X, then Y to confirm saving changes, and finally Enter to confirm the file name.

Step 2: Configure Gnome Desktop

By default, XRDP may not provide a complete gnome desktop environment for normal users. To fix this, execute the following commands:

echo "gnome-session --session=ubuntu-2d" > ~/.xsession

This command creates a .xsession file in the home directory and writes gnome-session --session=ubuntu-2d into it. This line configures XRDP to use the 2D version of the Ubuntu session for the gnome desktop.

Step 3: Enable Multi-User Remote Login

By default, XRDP creates a new session for each user who logs in remotely. However, if you want to allow multiple users to remote login simultaneously, you may need to configure XRDP to use a different port for each session. This can be done by modifying the /etc/xrdp/xrdp.ini file.

Open the file:

sudo nano /etc/xrdp/xrdp.ini

Look for the port option under the [Globals] section. Change its value to -1. This tells XRDP to find an available port when creating a new session.

[Globals]
port=-1

Save and close the file.

Conclusion

You have now successfully enabled remote desktop access for the root user in Ubuntu 18.10 using XRDP. Remember to use this feature responsibly, as logging in as root can expose your system to potential vulnerabilities. Always consider using sudo instead to perform tasks that require privileged access.

For more detailed instructions and troubleshooting, refer to the XRDP documentation at http://www.xrdp.org/.

Stay tuned for more helpful guides on managing your Ubuntu systems.

Is it safe to enable root login via XRDP?

Enabling root login via XRDP is generally not recommended due to security concerns. It is safer to use sudo for privileged tasks.

How do I install XRDP on Ubuntu 18.10?

You can install XRDP on Ubuntu 18.10 by running the command sudo apt-get install xrdp.

How do I configure XRDP to allow root login?

To enable root login for XRDP, you need to edit the /etc/xrdp/sesman.ini file and add the line AllowRootLogin=true under the [Security] section.

How do I configure XRDP to use the Gnome desktop environment?

To configure XRDP to use the Gnome desktop environment, you can create a .xsession file in your home directory with the command echo "gnome-session --session=ubuntu-2d" > ~/.xsession.

Can multiple users remote login simultaneously with XRDP?

By default, XRDP creates a new session for each user who logs in remotely. However, if you want to allow multiple users to remote login simultaneously, you may need to modify the /etc/xrdp/xrdp.ini file and set the port option to -1 under the [Globals] section.

Leave a Comment

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