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:

    # firewall-cmd --permanent --add-port=3389/tcp
    success
    Copy to Clipboard Toggle word wrap
    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:

    # firewall-cmd --reload
    success
    Copy to Clipboard Toggle word wrap
  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:

    # firewall-cmd --permanent --add-port=3389/tcp
    success
    Copy to Clipboard Toggle word wrap
  2. Reload firewall rules:

    # firewall-cmd --reload
    success
    Copy to Clipboard Toggle word wrap
  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.

Note

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. Create a directory for the self-signed TLS certificate:

    $ mkdir -p ~/.local/share/gnome-remote-desktop
    Copy to Clipboard Toggle word wrap
  2. Generate a self-signed TLS certificate for the RDP service:

    $ winpr-makecert -silent -rdp -path ~/.local/share/gnome-remote-desktop tls
    Copy to Clipboard Toggle word wrap
  3. 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
    Copy to Clipboard Toggle word wrap

    Refer gdrctl man page for more information.

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

    $ systemctl --user enable --now gnome-remote-desktop-headless.service
    Copy to Clipboard Toggle word wrap
  5. Start the headless GNOME session persistently for a single user as root:

    $ sudo systemctl enable --now gnome-headless-session@<your_username>.service
    Copy to Clipboard Toggle word wrap

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

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

    $ sudo systemctl set-default graphical.target
    Copy to Clipboard Toggle word wrap

Verification

  • Verify that the session started successfully:

    $ sudo systemctl status gnome-headless-session@<your_username>.service
    Copy to Clipboard Toggle word wrap

GNOME Remote Desktop can be integrated with the GNOME Display Manager (GDM) to provide remote login functionality for multiple users through RDP. Remote users authenticate by using a system-wide password, which grants access to the graphical login screen. Users can log in with their individual credentials, enabling secure 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
    Copy to Clipboard Toggle word wrap
  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
    Copy to Clipboard Toggle word wrap
  3. Connecting to a remote desktop through RDP for multiple users:

    $ grdctl --system rdp set-tls-key ~gnome-remote-desktop/.local/share/gnome-remote-desktop/tls.key
    $ grdctl --system rdp set-tls-cert ~gnome-remote-desktop/.local/share/gnome-remote-desktop/tls.crt
    $ grdctl --system rdp set-credentials
    $ grdctl --system rdp enable
    Copy to Clipboard Toggle word wrap

    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
    Copy to Clipboard Toggle word wrap
  5. Make gnome-remote-desktop.service persistent across system reboot:

    $ sudo systemctl set-default graphical.target
    Copy to Clipboard Toggle word wrap

Verification

  • Verify that the session started successfully:

    $ sudo systemctl status gnome-remote-desktop.service
    Copy to Clipboard Toggle word wrap
Back to top
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

© 2025 Red Hat