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_treeand search for GIMP. - Hyprland: Run
hyprctl clientsand check theclassfield 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:
- Open System Settings and navigate to Window Management > Window Rules.
- Click Add New....
- Set the Description to "GIMP to Desktop 2".
- Set Window class (application) to Substring
Match and enter
gimp. - Click Add Property... at the bottom and select Desktop.
- Set the rule condition to Apply Initially or Force, and set the value to desktop number 2.
- 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:
- Install the official GNOME Shell extension called Auto Move Windows.
- Open the extension's preferences using the Extensions app.
- Click Add Rule, select GNU Image Manipulation Program from the application list, and assign it to workspace 2.