Skip to content

Instantly share code, notes, and snippets.

@jmkim
Last active June 3, 2025 17:56
Show Gist options
  • Save jmkim/910514bb8b0b897b8dfa4ce61dbe75c9 to your computer and use it in GitHub Desktop.
Save jmkim/910514bb8b0b897b8dfa4ce61dbe75c9 to your computer and use it in GitHub Desktop.
How to Use Remmina Multi-Monitor on Wayland

How to Use Remmina Multi-Monitor on Wayland

Why Doesn't Remmina Work with Multiple Monitors?

Remmina was developed for X11 and works well on it.

Currently, Remmina's multi-monitor feature does not work on Wayland #2644 #2686.

To use Remmina with multiple monitors, you must run it on Xwayland instead.

Note that Remmina is transitioning to GTK4 PR#2465, which involves many re-implementations, including the multi-monitor feature.

Running Remmina on Xwayland

Run the following command in your terminal:

GDK_BACKEND=x11 remmina

How to Enable Key Grabbing

By default, Wayland does not enable Xwayland key grabbing. You must manually enable it and add Remmina to its access rules list.

Steps to Apply

  1. Run Remmina on Xwayland (see above).

  2. Identify the Xwayland window and get its name: Run the following command in your terminal:

    xprop WM_CLASS
  3. Click the Remmina window running on Xwayland. The output should look like this:

    WM_CLASS(STRING) = "org.remmina.Remmina", "org.remmina.Remmina"
    

    Note this value (in this case, org.remmina.Remmina).

    • If nothing happens, ensure that Remmina is running on Xwayland. If it is, you will see a + crosshair pointer when your cursor is over the Remmina window.
  4. Set the Xwayland grab access rules: Run the following command in your terminal:

    # Replace org.remmina.Remmina with your actual value
    gsettings set org.gnome.mutter.wayland xwayland-grab-access-rules "['org.remmina.Remmina']"
    • Before doing this, if you want to save your previous value, run:

      gsettings get org.gnome.mutter.wayland xwayland-grab-access-rules
  5. Enable Xwayland key grabbing: Run the following command in your terminal:

    gsettings set org.gnome.mutter.wayland xwayland-allow-grabs true
    • Before doing this, if you want to save your previous value, run:

      gsettings get org.gnome.mutter.wayland xwayland-allow-grabs

Steps to Revert

  1. Disable Xwayland key grabbing: Run the following command in your terminal:

    gsettings set org.gnome.mutter.wayland xwayland-allow-grabs false
  2. Remove Xwayland grab access rules: Run the following command in your terminal:

    gsettings set org.gnome.mutter.wayland xwayland-grab-access-rules "[]"  # or restore your previous value

What About Running Remmina with sudo?

Worst practice.

Even though it seems like running Remmina with sudo works fine on Wayland, it may actually be running on Xwayland. Normally, running an application in a terminal with root privileges results in it running on Xwayland instead of Wayland.

It just seems like it solves the issue, but it actually doesn't.

# Remmina on Xwayland
#
# Jongmin Kim <[email protected]>
# See https://jmkim.kr/posts/remmina-multi-monitor-on-wayland/
#
# Last updated: 2025-02-13 11:34:04 +0900
#
# Upstream-Contact: Antenore Gatta <[email protected]>
# Upstream-Source: https://gitlab.com/Remmina/Remmina/-/blob/master/data/desktop/org.remmina.Remmina.desktop.in
# Copyright: 2009-2011 Vic Lee
# 2010 Jay Sorg
# 2011-2014 Marc-Andre Moreau
# 2012 Daniel M. Weeks
# 2012 Jean-Louis Dupond
# 2012 Andrey Gankov
# 2012 Luca Falavigna
# 2014-2017 Antenore Gatta
# 2014-2017 Giovanni Panozzo
# 2016 Denis Ollier
# 2025 Jongmin Kim <[email protected]>
# License: GPL-2+ with SSL exception
[Desktop Entry]
Version=1.0
Name=Remmina X11
GenericName=Remote Desktop Client
X-GNOME-FullName=Remmina Remote Desktop Client
Comment=Connect to remote desktops
TryExec=remmina-file-wrapper
Exec=env GDK_BACKEND=x11 remmina-file-wrapper %U
Icon=org.remmina.Remmina
Terminal=false
Type=Application
Categories=GTK;GNOME;X-GNOME-NetworkSettings;Network;
Keywords=remote desktop;rdp;vnc;ssh;spice;
StartupWMClass=org.remmina.Remmina
MimeType=x-scheme-handler/rdp;x-scheme-handler/spice;x-scheme-handler/vnc;x-scheme-handler/ssh;x-scheme-handler/remmina;application/x-remmina;
Actions=Kiosk;Profile;Tray;Quit;
[Desktop Action Profile]
Name=Create a New Connection Profile
Exec=env GDK_BACKEND=x11 /usr/bin/remmina --new
[Desktop Action Kiosk]
# Start Remmina with a minimal interface for kiosk/thin client mode
Name=Start Remmina in Kiosk mode
Exec=env GDK_BACKEND=x11 /usr/bin/remmina --kiosk
[Desktop Action Tray]
Name=Start Remmina Minimized
Exec=env GDK_BACKEND=x11 /usr/bin/remmina --icon
[Desktop Action Quit]
Name=Quit
Exec=env GDK_BACKEND=x11 /usr/bin/remmina --quit
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment