Chapter 1. Remotely accessing the desktop


You can remotely connect to the desktop on a RHEL server by using graphical GNOME applications. The connection depends on how the server is configured.

You can use one or more of the following options:

Desktop sharing
Allows remote clients to connect to the desktop session of the Linux user that is currently logged in on the server.
Remote login
Allows remote clients to open the GNOME login screen, where they can login as a Linux user with the correct credentials.

You can enable a remote desktop connection from a single client by configuring the Red Hat Enterprise Linux server.

Prerequisites

  • The gnome-remote-desktop package is installed.

Procedure

  1. Configure a firewall rule to enable access to the server:

    $ sudo firewall-cmd --permanent --add-port=3389/tcp
    success
    Note

    If you also configure remote login on the server, the port number for desktop sharing changes. In that case, modify the firewall rule to add port number 3390 instead.

  2. Reload firewall rules:

    $ sudo firewall-cmd --reload
    success
  3. Open Settings in GNOME.
  4. Open the System screen.
  5. Select Remote Desktop.

    screen sharing 1

  6. Set Desktop Sharing to On.
  7. Optional: To allow the remote user to control your screen, set Remote Control to On.
  8. Set a user name and a password in the Login Details section. Remote clients must enter these credentials when connecting to your desktop from a remote client.

    screen sharing 2

1.2. Configuring GNOME remote login

By activating Remote Login in GNOME, you can allow remote clients to log in to the GNOME session as the Linux users on your system.

Prerequisites

  • The gnome-remote-desktop package is installed.

Procedure

  1. Configure a firewall rule to enable access to the server:

    $ sudo firewall-cmd --permanent --add-port=3389/tcp
    success
  2. Reload firewall rules:

    $ sudo firewall-cmd --reload
    success
  3. Open Settings in GNOME.
  4. Open the System screen.
  5. Select Remote Desktop.

    screen sharing 1

  6. Click the Remote Login tab in the menu header.
  7. Set Remote Login to On to enable screen sharing.

    remote login 1

  8. Set a user name and a password in the Login Details section. Remote clients must enter these credentials when connecting to this system’s login screen from a remote client.

1.3. Connecting to a remote desktop by using GNOME

You can connect from a Red Hat Enterprise Linux client to a remote desktop server by using the Connections application. The connection depends on the remote server configuration.

Prerequisites

Procedure

  1. On the client, launch the Connections application.
  2. Click the + button in the top bar to open a new connection.

    gnome connections 1

  3. Enter the IP address of the server.
  4. Choose the connection type based on the operating system you want to connect to:

    Remote Desktop Protocol (RDP)
    Use RDP for connecting to Windows and RHEL 10 servers.
    Virtual Network Computing (VNC)
    Use VNC for connecting to servers with RHEL 9 and previous versions.
  5. Click Connect.

Verification

  1. On the client, check that you can see the shared server desktop.
  2. On the server, a screen sharing indicator appears on the right side of the top panel:

    screen sharing indicator

    You can control screen sharing in the System menu of the server.

You can connect to a remote desktop session on a headless server for a single user through RDP (Remote Desktop Protocol).

A headless server is a system that operates without a connected monitor. You can initiate and manage a GNOME desktop session to manage servers securely in environments where direct physical access is not available.

Important

Run the setup as a non-root user with sudo privileges. Attempting to run it as the root user causes the setup to fail. The credentials used to access this type of session are different from the system credentials of the user. For example, changing the user password on the host does not update the password used for RDP access.

Connecting to a remote desktop through RDP protocol requires setting up a TLS key and a TLS certificate.

Prerequisites

Procedure

  1. Configure a firewall rule to enable access to the server:

    $ sudo firewall-cmd --permanent --add-port=3389/tcp
    success
  2. Reload firewall rules:

    $ sudo firewall-cmd --reload
    success
  3. Create a directory for the self-signed TLS certificate:

    $ mkdir -p ~/.local/share/gnome-remote-desktop
  4. Generate a self-signed TLS certificate for the RDP service:

    $ winpr-makecert -silent -rdp -path ~/.local/share/gnome-remote-desktop tls
  5. Configure GNOME Remote Desktop by using RDP:

    $ grdctl --headless rdp set-tls-key ~/.local/share/gnome-remote-desktop/tls.key
    $ grdctl --headless rdp set-tls-cert ~/.local/share/gnome-remote-desktop/tls.crt
    $ grdctl --headless rdp set-credentials
    $ grdctl --headless rdp enable

    Refer gdrctl man page for more information.

  6. Enable a headless server for single-user service:

    $ systemctl --user enable --now gnome-remote-desktop-headless.service
  7. Start the headless GNOME session persistently for a single user as root:

    $ sudo systemctl enable --now gnome-headless-session@<your_username>.service

    Replace <your_username> with the username of the user for whom you want to start the headless GNOME session.

  8. Make <your_username>.service persistent across system reboot:

    $ sudo systemctl set-default graphical.target

Verification

  • Verify that the session started successfully:

    $ sudo systemctl status gnome-headless-session@<your_username>.service

Integrate GNOME Remote Desktop with the GNOME Display Manager (GDM) to provide remote login functionality for multiple users by using the Remote Desktop Protocol (RDP).

Remote users authenticate by using a system-wide password, which grants access to the graphical login screen. Then they log in with their individual credentials, enabling remote access to the desktop environment.

Connecting to a remote desktop through RDP for multiple users requires setting up a TLS key and a TLS certificate.

Prerequisites

Procedure

  1. Create a directory for the self-signed TLS certificate as the gnome-remote-desktop user:

    $ sudo -u gnome-remote-desktop mkdir -p ~gnome-remote-desktop/.local/share/gnome-remote-desktop
  2. Generate a self-signed TLS certificate for the RDP service as the gnome-remote-desktop user:

    $ sudo -u gnome-remote-desktop winpr-makecert -silent -rdp -path ~gnome-remote-desktop/.local/share/gnome-remote-desktop tls
  3. Connecting to a remote desktop through RDP for multiple users:

    $ sudo grdctl --system rdp set-tls-key ~gnome-remote-desktop/.local/share/gnome-remote-desktop/tls.key
    $ sudo grdctl --system rdp set-tls-cert ~gnome-remote-desktop/.local/share/gnome-remote-desktop/tls.crt
    $ sudo grdctl --system rdp set-credentials
    $ sudo grdctl --system rdp enable

    Refer gdrctl man page for more information.

  4. Enable the system remote login service and GDM:

    $ sudo systemctl enable --now gdm
    $ sudo systemctl enable --now gnome-remote-desktop.service
  5. Make gnome-remote-desktop.service persistent across system reboot:

    $ sudo systemctl set-default graphical.target

Verification

  • Verify that the session started successfully:

    $ sudo systemctl status gnome-remote-desktop.service
Red Hat logoGithubredditYoutubeTwitter

Learn

Try, buy, & sell

Communities

About Red Hat Documentation

We help Red Hat users innovate and achieve their goals with our products and services with content they can trust. Explore our recent updates.

Making open source more inclusive

Red Hat is committed to replacing problematic language in our code, documentation, and web properties. For more details, see the Red Hat Blog.

About Red Hat

We deliver hardened solutions that make it easier for enterprises to work across platforms and environments, from the core datacenter to the network edge.

Theme

© 2026 Red Hat
Back to top