How to Remote Access Linux Desktop GUI from Windows

Ganesh Velrajan Ganesh Velrajan • 9 Min Read • Updated on Sep 23, 2026
How to Remote Access Linux Desktop GUI from Windows
Summary

Install a desktop environment (if your Linux server is headless) and xrdp, which lets Windows’ built-in Remote Desktop Connection talk to a Linux machine.

To connect from On the same local network, that’s it — enter the Linux IP in RDC and connect.

To connect from the internet without opening router ports or owning a static/public IP, run the SocketXP agent on the Linux machine and on your Windows PC — it creates a secure tunnel and gives you a localhost address to RDP into.

If you don’t need a full GUI, SSH is lighter and more secure for command-line work; if you need cross-platform screen mirroring rather than an independent desktop session, VNC is the alternative — see the comparison below.

In this article, we’ll discuss how to remotely access your Linux or Ubuntu desktop GUI from Windows using RDP, making it easier than ever to manage your Linux server from anywhere in the world.

One of the most powerful features of the Linux is its ability to be accessed remotely, allowing you to control and interact with your Linux server or Ubuntu over the internet from an outside network.

And when it comes to remote desktop access on a Linux server, xrdp (X Remote Desktop Protocol) is the go-to solution.

With xrdp, you can unlock a world of possibilities, from setting up a headless Linux server to accessing your Linux server’s graphical desktop from any machine, be it a Windows, macOS, or Linux machine.

Recommended for you: Remote access Linux servers using SSH from Windows - if you only need command-line access, SSH is faster and lighter than setting up a full desktop session.

What is RDP?

Remote Desktop Protocol (RDP) is a network protocol developed by Microsoft and is widely used by users to remotely access and interact with the graphical user interface of a remote machine such as Windows Server, Mac, or Linux machine including Linux server.

RDP follows the client-server model, where an RDP client is installed on a local machine, and an RDP server is installed on the remote server or Linux server.

What is xrdp?

xrdp is an open-source software package that allows for remote desktop access to Linux-based operating systems, including Linux server.

xrdp stands for “X Remote Desktop Protocol” and is a protocol that enables users to connect to a Linux-based desktop environment from a remote device, such as a Windows, macOS, or another Linux machine.

xrdp uses the Remote Desktop Protocol (RDP) developed by Microsoft.

xrdp is often used as an alternative to other remote desktop solutions, such as Virtual Network Computing (VNC), as it provides a more seamless and integrated experience for connecting to Linux-based systems.

It allows users to access their Linux desktop environment remotely, run applications, edit files, and perform other tasks using a graphical interface, making it convenient for remote administration, support, and other use cases.

Want Your Linux Desktop Reachable from Anywhere?

Skip the port forwarding for RDP. Connect through a secure outbound tunnel instead.

xrdp vs. VNC vs. SSH: Which Should You Use?

Featurexrdp (RDP)VNCSSH
Best forFull GUI session, Windows-native clientFull GUI session, cross-platform, screen mirroringCommand-line / terminal work
Client needed on WindowsBuilt-in (Remote Desktop Connection)Third-party (TigerVNC, RealVNC, etc.)Built-in (PowerShell) or PuTTY
Typical port33895900+22
Session typeIndependent desktop sessionIndependent session or mirrors the live local screen, depending on setupText-only, unless paired with X11 forwarding for single app windows
Setup effortLowLow–mediumVery low
Good fit whenYou want a Windows-familiar remote desktop experienceYou need to connect from non-Windows devices too, or need to view what’s already on-screenYou just need to run commands, edit files, or manage services

If you want the full walkthrough for VNC instead, see IoT Remote Desktop Access via VNC. This guide continues with xrdp.

Linux server Remote Desktop Access using xrdp

In this blog article, we will delve into the fascinating concept of Linux server remote desktop access using xrdp.

We will guide you through the step-by-step process of setting up xrdp on your Linux server, exploring its features and configuration options, and providing tips and tricks to optimize your remote desktop experience.

So, grab your Linux server, and let’s embark on an exciting journey of unlocking the true potential of remote desktop access with xrdp!

Recommended for you: How to securely remote access Linux Servers using SSH from Windows.

Step 1: Setting up a Desktop environment on Linux server

Before you can remotely connect to your Linux server via xrdp, you need to make sure your Linux server is set up and running.

This includes installing an operating system (such as Ubuntu) and connecting your Linux server to a display, keyboard, and mouse.

Additionally, make sure your Linux server is connected to the internet via an Ethernet cable or Wi-Fi.

For this tutorial we will assume that your Linux server doesn’t have a GUI desktop environment installed. We will install XFCE desktop environment, to have the actual desktop accessible on the Linux server.

Note: If your Linux server already has a desktop environment set up, say Ubuntu Desktop, then you can skip this step and jump to the next step.

sudo apt install -y xfce4 xfce4-goodies 

Next, we will install xrdp to access this GUI desktop environment from a different machine.

Step 2: Install and setup xrdp on Linux server

Following the below instructions to install xrdp on your Linux server:

  1. Open a terminal window.
  2. Update the package list on your system by running the following command:
    sudo apt update
  3. Install xrdp by running the following command:
    sudo apt install xrdp
  4. Once the installation is complete, start the xrdp service by running the following command:
    sudo systemctl start xrdp
  5. Optionally, you can enable the xrdp service to start automatically at boot by running the following command:
    sudo systemctl enable xrdp
  6. Add your user to the xrdp group. This is missing from most xrdp guides, but it’s what usually causes a black screen or failed login on newer Ubuntu versions right after entering your credentials:
    sudo adduser $USER xrdp
  7. It’s important to configure your firewall settings in your Linux server to allow incoming RDP traffic to your Linux server on TCP port 3389 using the following command:
    sudo ufw allow 3389/tcp

Now you can access your Linux server desktop via xrdp from your Windows or Mac PC in a local network. You can jump to Step #4 if you want to access Linux server remote desktop using an RDP client from a local network.

But our goal is to connect to Linux server desktop remotely over the internet.

For this, we’ll use the SocketXP Linux Server Remote Access solution as shown in the next step.

Step 3: Install SocketXP Linux Server Remote Access Agent

We need to install SocketXP Linux Server Remote Access Agent to run in two different places:

  • Linux server - in IoT Master Mode (Default Mode)
  • Laptop or PC - in IoT Slave Mode

Follow the SocketXP download and install instructions to install the SocketXP Remote Access agent on the Linux server and the access devices.

To make SocketXP agent to run in IoT Master Mode (which is the default mode of SocketXP agent) use the below command.

$ socketxp  connect tcp://localhost:3389

Connected to SocketXP Cloud Gateway.
Access the TCP service securely using the SocketXP agent in IoT Slave Mode.

where localhost port 3389 is the RDP server port, on which xrdp is listening for connections from a RDP client such as RDC.

Next, to access the Linux server device from your Windows laptop or PC, install SocketXP Agent for Windows and run the below command:

$ ./socketxp.exe connect tcp://localhost:3000 --iot-slave --peer-device-id "2233-abcdefgh-2342abc" --peer-device-port 3389 --authtoken <auth token>
Listening for TCP connections at:
Local URL -> tcp://localhost:3000  
where 3000 is a local port on your PC at which you want to access the Linux server. You can choose to use any free local port instead of port 3000.

You shall find the device ID of your Linux server device from the SocketXP Portal page in the IoT Devices section. For our illustration, we assume 2233-abcdefgh-2342abc is the device ID of your IoT device.

Step 4: Connect to Linux server remote desktop using RDP Client

With xrdp up and running on your Linux server, you can now connect to it using an RDP client such as Remote Dekstop Connection (RDC) in Windows or Remmina in Linux.

If you are using Linux, use the following command to install Remmina on your Ubuntu Linux based access device such as your laptop:

sudo apt update
sudo apt install remmina

Connecting from Local Network

To access the remote desktop GUI of your Linux server connected to your local network, simply open the Windows Remote Desktop Client(RDC), enter the IP address or hostname of your Linux server, and click “Connect”. Enter your Linux server’s username and password when prompted.

If you are using Linux, you can use the Remmina Remote Desktop Client, which is a popular RDP client for Linux. Open Remmina, click on “New” to create a new connection, select “RDP” as the protocol, and enter your Linux server’s IP address or hostname, username, and password. Click “Connect” to establish the remote desktop connection.

Connecting from Outside Network Over the Internet

If you want to remotely access Linux server desktop from Windows over the internet using SocketXP Linux Server Remote Access solution, then enter localhost or 127.0.0.1 as the IP address and port 3000 on the RDC client.

This is the IP address and port on which SocketXP agent configured to run in iot-slave mode, in Step#3 above, is listening for local proxy connections.

linux server remote desktop access RDP xrdp from anywhere

Once connected, you will be able to see and interact with your Linux server’s desktop environment, just as if you were physically sitting in front of it. You can run applications, edit files, and perform other tasks remotely.

linux server remote desktop access RDP xrdp from windows over the internet

Conclusion:

With xrdp, remote access to your Linux server desktop GUI has never been easier.

SocketXP Linux Server Remote Access Solution is a highly scalable solution that uses secure SSL/TLS tunnel to remotely connect and access Linux server VNC server from a Windows Laptop or a Mac Book.

By following the steps outlined in this article, you can quickly set up xrdp on your Linux server and establish a secure and convenient remote desktop connection from anywhere, anytime.

Whether you’re managing a Linux server remotely or accessing your Linux server for troubleshooting or maintenance purposes, xrdp is a powerful tool that enables you to stay connected to your Linux server with ease.

Happy remote controlling your Linux server!

Based on your interest, you may also be interested in:

Frequently Asked Questions

  1. Can I RDP into Linux from Windows without installing anything extra on Linux?

    No — Linux doesn't ship an RDP server by default. You need to install xrdp (or another RDP server) first; the RDP client on Windows side (Remote Desktop Connection) is already built in.

  2. Do I need a static IP or public IP to access my Linux desktop over the internet?

    No, not if you use a tunneling solution like SocketXP. It creates an outbound connection from your Linux server to a cloud gateway, so you don't need port forwarding, a static IP, or DDNS.

  3. Is xrdp secure enough to expose directly to the internet?

    Not recommended without protection — exposing port 3389 directly is a common attack target. Use a secure tunnel or VPN in front of it instead of opening the port on your router.

  4. What's the difference between xrdp and VNC for Linux remote access?

    xrdp uses Microsoft's RDP protocol and works with Windows' native Remote Desktop Connection client. VNC uses its own protocol and needs a separate client app, but is more flexible for screen-mirroring use cases and cross-platform setups. See the comparison table above.

  5. Can I use this same setup on a Raspberry Pi?

    Yes — the same xrdp + SocketXP steps work on Raspberry Pi OS. See Remotely Access Raspberry Pi for the Pi-specific guide.

  6. Why can't I just use SSH instead of RDP?

    SSH is great for command-line work but doesn't give you a graphical desktop by default. If you only need to run commands or edit files, SSH is lighter and more secure — see Remote Access Linux Server via SSH.

SocketXP IoT Remote Access and Device Management Platform

Remotely access, manage, and update your IoT & AIoT edge fleet with SocketXP's secure and scalable platform.

Start Your Free Trial Now!

Join thousands of satisfied users who trust SocketXP for a secure, reliable, and scalable IoT Edge device management solution. Start your free trial now.