Launch GIMP on a Second Desktop in Wayland

Under the Wayland display protocol, applications cannot position themselves on specific virtual desktops due to built-in security isolation. To launch GIMP on a secondary workspace, you must configure placement rules within your Wayland compositor rather than within GIMP itself. This guide covers how to identify GIMP's application identifier and configure automatic placement rules for popular Wayland compositors, including Sway, Hyprland, KDE Plasma, and GNOME.

Step 1: Identify GIMP’s App ID

Wayland compositors identify windows using an app_id (similar to WM_CLASS in X11). For GIMP, this is typically either gimp (for native package installs) or org.gimp.GIMP (for Flatpak installs).

To confirm your version's ID, launch GIMP and run one of the following commands in a terminal depending on your desktop:

  • Sway: Run swaymsg -t get_tree and search for GIMP.
  • Hyprland: Run hyprctl clients and check the class field for GIMP.

Step 2: Configure Your Window Manager

Sway

In Sway, window assignments are configured in your Sway configuration file (usually located at ~/.config/sway/config).

Add the following directive to map GIMP to workspace 2:

assign [app_id="(?i)gimp"] workspace number 2

If using the Flatpak version, specify the exact ID:

assign [app_id="org.gimp.GIMP"] workspace number 2

Reload Sway using swaymsg reload to apply the changes.


Hyprland

In Hyprland, rules are configured in ~/.config/hypr/hyprland.conf. Use the windowrulev2 syntax to target the application class and assign it to workspace 2.

Add the following line to your configuration:

windowrulev2 = workspace 2, class:^(.*gimp.*)$

Hyprland automatically reloads configuration files upon saving.


KDE Plasma (Wayland)

KDE Plasma handles window placement through KWin rules via the graphical interface:

  1. Open System Settings and navigate to Window Management > Window Rules.
  2. Click Add New....
  3. Set the Description to "GIMP to Desktop 2".
  4. Set Window class (application) to Substring Match and enter gimp.
  5. Click Add Property... at the bottom and select Desktop.
  6. Set the rule condition to Apply Initially or Force, and set the value to desktop number 2.
  7. Click Save and Apply.

GNOME (Wayland)

The default GNOME Shell compositor (Mutter) does not support manual window rule text files. To assign GIMP to a specific workspace in GNOME:

  1. Install the official GNOME Shell extension called Auto Move Windows.
  2. Open the extension's preferences using the Extensions app.
  3. Click Add Rule, select GNU Image Manipulation Program from the application list, and assign it to workspace 2.