Guake / Guake/guake

GNOME Wayland: F12 hides Guake but cannot show it (libkeybinder)

Open
#2,350 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
Python
Stars
4.7k
Forks
604
PR merge metrics
No merged PRs in 30d

Description

Be sure to check the existing issues (both open and closed!), and make sure you are running the latest version of Guake.

Related: #492, #994, #1642, #2011, #2127.

**Describe the bug**

On a GNOME Wayland session, Guake’s built-in global `F12` binding is asymmetric:

- If Guake is already visible and focused, `F12` hides it.
- If Guake is hidden (or a native Wayland app / the empty desktop is focused), `F12` does nothing. Guake never comes back.

This matches the known `libkeybinder` limitation on Wayland, but the “hide works, show does not” behaviour is easy to misdiagnose as a window-mapping bug.

**Expected behavior**

`F12` should toggle Guake both ways from anywhere on the desktop (empty GNOME Shell, Nautilus, Firefox, etc.).

**Actual behavior**

Only hide works, and only while Guake itself has focus. Show never works via Guake’s own hotkey.

Guake is running (`org.guake3.RemoteControl` is on the session bus). CLI / D-Bus toggle works:

```bash
guake --show # visibility 0 -> 1
guake --hide # visibility 1 -> 0
guake-toggle # toggles both ways
```

**To Reproduce**

1. Log into GNOME on Wayland (`XDG_SESSION_TYPE=wayland`).
2. Start Guake and leave the default `show-hide` binding on `F12`.
3. Open Guake from the app menu / autostart (not via the hotkey).
4. Press `F12` while Guake is focused → window hides.
5. Press `F12` again on the desktop or in a GNOME/Wayland app → Guake does not appear.

**Working workaround on GNOME**

Guake’s own grab cannot see keys when a Wayland surface is focused, so the compositor must own `F12`. This is the recipe that restored toggle on Pardus 25 / GNOME 48:

```bash
# 1. Stop Guake from grabbing F12 (avoids double-toggle when an X11 window is focused)
gsettings set guake.keybindings.global show-hide ''

# 2. Register a GNOME custom shortcut
gsettings set org.gnome.settings-daemon.plugins.media-keys.custom-keybinding:/org/gnome/settings-daemon/plugins/media-keys/custom-keybindings/custom-guake-toggle/ name 'Guake Toggle'
gsettings set org.gnome.settings-daemon.plugins.media-keys.custom-keybinding:/org/gnome/settings-daemon/plugins/media-keys/custom-keybindings/custom-guake-toggle/ command '/usr/bin/guake-toggle'
gsettings set org.gnome.settings-daemon.plugins.media-keys.custom-keybinding:/org/gnome/settings-daemon/plugins/media-keys/custom-keybindings/custom-guake-toggle/ binding 'F12'

# 3. Append that path to org.gnome.settings-daemon.plugins.media-keys custom-keybindings

# 4. Optional: GTK4 inspector also binds F12 by default
gsettings set org.gtk.gtk4.Settings.Debug enable-inspector-keybinding false
```

After this, `gsd-media-keys` launches `guake-toggle` on `F12`, and show/hide both work.

This is the FAQ workaround (`guake-toggle` in the WM shortcuts), made explicit for GNOME gsettings.

**Feature ask (implements #2011)**

Please detect GNOME + Wayland (or a failed global bind) and either:

1. Show a first-run dialog with these instructions, and offer to unbind Guake’s own `show-hide` key, as described in #2011, or
2. Offer to install the GNOME custom shortcut automatically (`F12` → `guake-toggle`) so users do not have to discover this by hand.

Happy to turn (2) into a PR if that approach is acceptable.

-------------------------------------------------------------------------------

Please run `$ guake --support`, and paste the results here. Don't put backticks (`` ` ``) around it! The output already contains Markdown formatting. And make sure you run the command **OUTSIDE** the Guake.

$ guake --support

Guake Version: 3.10

Vte Version: 0.80.1

Vte Runtime Version: 0.80.1

--------------------------------------------------
GTK+ Version: 3.24.49

GDK Backend:

Contributor guide

No contributing guide indexed for this repository

Research direction

Start by reproducing the issue in a GNOME Wayland session, then trace the existing global show-hide binding and the guake-toggle entry point. Check how failed global binding or GNOME detection could reach the proposed first-run instructions or shortcut setup. Done means F12 can toggle Guake from both focused and unfocused Wayland applications without double-toggling.

Written by the indexing model from the issue text.

Assessment

Tech stack
linux, python
Domain
desktop
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Active
Clarity
Mostly clear
Newbie friendliness
48/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.