/go/xrdp: xrdp from the Command Line

/go/xrdp lets you use the server's graphical desktop remotely. It installs a desktop environment and xRDP, an open-source Remote Desktop Protocol (RDP) server, then opens port 3389 in the firewall. Afterward you can connect from any Windows computer with the built-in Remote Desktop Connection app. It works on AlmaLinux, Rocky Linux, CentOS, Red Hat, Fedora, Debian, and Ubuntu. The command runs sudo internally, so run it as root or as a user with sudo rights, and the server needs internet access. Every admin action in GoAdmio has a matching /go/ command, so anything you can click you can also script.

Quick start

# Install the desktop and xRDP
/go/xrdp

Options

None.

Examples

# Install the desktop and xRDP
/go/xrdp

# Check that the xRDP service is running
systemctl status xrdp

# Check that port 3389 is listening
ss -tln | grep 3389

To connect, open Remote Desktop Connection on Windows, enter the server’s IP address (the port is 3389 by default), and sign in with a server username and password.

Output

You see the package manager’s output, then, on a supported system, these connection instructions:

Now, it’s time to take RDP sessions from any Windows machine using Remote Desktop Protocol.
Run Remote Desktop on Windows
Username: root
Password: ******** (ROOT Password)

Outcome What you get
Supported operating system Package manager output, then the instructions above.
Unsupported operating system Unknown operating system. Exit status 1. Nothing is installed.

The command does not stop when a step fails, and it prints the instructions even if an install step failed. Check the output for errors, then test the connection.

Log

Each run appends one line to /var/log/go/xrdp.log:

[Nov 21 12:00:00]# xrdp

See the full reference at /go/xrdp and the GoAdmio command index.

GoAdmio is free and open source, with no license fees and no account limits. Read the GoAdmio docs, or see why it is a free cPanel alternative at goadmio.com.

By:

Posted in:


Leave a Reply

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