OPINIONATED OMARCHY
TROUBLESHOOTING CORPUS
790
RECORDS
790
AUDITED
0
UNCHECKED
2388
SOURCES
LIVE
wayland-compat low common DISPUTE

Middle-click paste of the primary selection stopped working in GTK apps

omarchyarchendeavouroscachyosmanjarohyprlanddesktoplaptop
CORRECTED An auditor found the fix wrong or incomplete and rewrote it.
AUDIT NOTE

Re-checked the whole record on this Omarchy 4 workstation (omarchy 4.0.2-1, Hyprland 0.56.2) and against the cited pages. The core claim holds and I confirmed it here rather than accepting the prior note: the shipped /usr/share/glib-2.0/schemas/org.gnome.desktop.interface.gschema.xml carries <default>false</default> for gtk-enable-primary-paste, /usr/share/omarchy/install/user/first-run/gtk-primary-paste.sh exists and is exactly the one gsettings line, and the live value on this machine is true. wl-clip-persist is in extra at 0.5.0-2 (archlinux.org JSON), so the pacman line resolves. The danger is source accurate: hyprland-wiki content/useful-utilities/clipboard-managers.md line 197 says the primary mode is not recommended and links Linus789/wl-clip-persist#3. The cited Ghostty discussion 12181 is real (HTTP 200) and its body matches the record, including that wl-paste --primary works while Ghostty does not paste. Two defects. (1) The record blames one layer and never mentions the compositor. Hyprland has misc:middle_click_paste, documented under 'How to disable middle-click paste?' in the 0.54 FAQ, and confirmed live here: hyprctl getoption misc:middle_click_paste returns bool: true, set: false, so it is default on and Omarchy does not touch it (no hit for the string anywhere under /usr/share/omarchy). If a user has set it false, every step in the old fix is wasted effort. The fix is rewritten as an ordered walk down compositor, then selection source, then GTK setting, then the application itself. (2) The autostart line was put in ~/.config/hypr/hyprland.lua. Omarchy ships ~/.config/hypr/autostart.lua for exactly this, with an o.launch_on_start helper defined at /usr/share/omarchy/default/hypr/helpers.lua:118, and the raw hl.on idiom is kept as the labelled non-Omarchy branch. I also read /usr/share/omarchy/bin/omarchy-refresh-hyprland and omarchy-refresh-config: they overwrite those user files with the defaults and save a .bak.<epoch>, which is visible as nine such files in this user's ~/.config/hypr. No migration under /usr/share/omarchy/migrations calls refresh-config on a hypr file, so omarchy update does not wipe the edit, and that distinction is now in the fix. NOT exercised: I changed no setting and started no process, so the wl-clip-persist autostart and the re-run of the first-run script are argued from reading the scripts, not from running them.

The cause above was rewritten on 2026-09-13 to match this note; the fix was corrected by the audit itself.
RISK

Do not run wl-clip-persist --clipboard primary. Upstream documents that primary-selection mode breaks the selection system in some GTK applications. Text selection itself stops behaving correctly. Use --clipboard regular only.

Symptom

Middle-click paste no longer works. I select text, middle-click somewhere else, and nothing happens in GNOME Text Editor, Ghostty, gedit, Nautilus's rename field, gVim, GTK apps generally. It still works in Firefox and in some terminals. I changed nothing. It just stopped after an update.

Cause

Three separate layers can each swallow a middle-click paste, and the record has to tell them apart. (1) **GTK.** GTK gates middle-click paste on org.gnome.desktop.interface gtk-enable-primary-paste, which ships in gsettings-desktop-schemas and is read by GTK on every desktop, not only GNOME. Upstream flipped that key's default from true to false, so every GTK application that honours it went silent at once. The shipped schema on Omarchy 4 confirms it: /usr/share/glib-2.0/schemas/org.gnome.desktop.interface.gschema.xml carries <default>false</default> for that key. Firefox and a few other applications implement middle-click paste themselves and ignore the setting, which is why they still work, and that split is the giveaway. (2) **The compositor.** Hyprland has its own misc:middle_click_paste, default true. Set to false it disables the feature for every client, and no gsettings change will bring it back. (3) **The application toolkit.** An application can simply not implement it. Ghostty is the current example: the primary selection is populated and Firefox pastes it, but Ghostty does not. A fourth behaviour compounds all of these rather than causing them: on Wayland the primary selection is owned by the source window, so it disappears when that window closes.

On Omarchy 4 specifically the key should already be true. /usr/share/omarchy/install/user/first-run/gtk-primary-paste.sh is one line, gsettings set org.gnome.desktop.interface gtk-enable-primary-paste true, so Omarchy treats the upstream default as a defect and corrects it on first run. If it is false on an Omarchy box, the first-run step did not complete, a different user account never ran it, or something reset the dconf value.

Fix

Work down the layers. Stop at the first one that is wrong.

**1. Is the compositor still passing middle-click paste through?**


hyprctl getoption misc:middle_click_paste

bool: true is correct. bool: false means the failure is compositor wide and nothing else in this record applies. Remove the misc.middle_click_paste = false line from your Hyprland config. On Omarchy 4 that line is never shipped, so it would be your own.

**2. Is the primary selection actually being populated?**

Select some text in any window, then:


wl-paste --primary

If that prints nothing, the source application is not exporting a primary selection at all, which is a different problem from the paste side.

**3. Is the GTK setting on?**


gsettings get org.gnome.desktop.interface gtk-enable-primary-paste
gsettings set org.gnome.desktop.interface gtk-enable-primary-paste true

If gsettings schemas are not available, write the key directly:


dconf write /org/gnome/desktop/interface/gtk-enable-primary-paste true

On Omarchy 4 the shipped first-run script does exactly this, so re-running it is the supported way back:


bash /usr/share/omarchy/install/user/first-run/gtk-primary-paste.sh

The setting is read once at application startup. Fully quit and reopen the application. Some users need a full re-login.

**4. Still only one application broken?**

If step 3 returns true, wl-paste --primary prints the selection, and Firefox pastes it but one specific application does not, the application does not implement middle-click paste. That is upstream's bug, not a system setting. Ghostty is the current example.

**Optional: keep the selection alive after the source window closes.**


sudo pacman -S --needed wl-clip-persist

Put the autostart line in ~/.config/hypr/autostart.lua, which is the user file Omarchy ships for this and which loads after Omarchy's own defaults:


-- ~/.config/hypr/autostart.lua
o.launch_on_start("wl-clip-persist --clipboard regular")

On plain Arch or another Hyprland install with no Omarchy helpers, use the raw Hyprland idiom in ~/.config/hypr/hyprland.lua:


hl.on("hyprland.start", function()
  hl.exec_cmd("wl-clip-persist --clipboard regular")
end)

One thing to know before you edit any of these files. omarchy-refresh-hyprland overwrites ~/.config/hypr/hyprland.lua, bindings.lua, autostart.lua, input.lua, looknfeel.lua and monitors.lua with the shipped defaults, saving yours as <file>.bak.<epoch>. No current migration runs it for those files, so a plain omarchy update leaves your edit alone, but if you ever run that command yourself your line is in the backup, not in the live file.

Verify

hyprctl getoption misc:middle_click_paste prints bool: true. gsettings get org.gnome.desktop.interface gtk-enable-primary-paste returns true. Select text in one GTK window and middle-click into another, and the text pastes. wl-paste --primary prints the current selection.

Sources

middle-click-primary-paste-stopped-working