Skip to content

[Bug] Internal global shortcuts fail to trigger on KDE Plasma Fedora 43 / Wayland #3488

@WiliTest

Description

@WiliTest

Environment:

  • OS / Desktop Environment: fedora plasma 43(QDBUS6)
  • Windowing System: Wayland
  • CopyQ Version: 13.0.0
  • System Language: EN

Description:

When setting a global shortcut directly through CopyQ's internal Preferences -> Shortcuts menu, the shortcut fails to trigger the CopyQ panel under KDE Plasma Wayland.

To work around this, users normally map a KDE Custom Shortcut to /usr/bin/copyq toggle. However, this also fails silently on Plasma 6 Wayland. It appears KDE's shortcut daemon (kglobalacceld) runs commands in a stripped environment, causing Qt/CopyQ to fail to launch or communicate with the daemon. It only works if wrapped in a bash script that explicitly forces Wayland variables.

Note: Running copyq toggle manually in Konsole works.

Steps to Reproduce:

Test 1 (Internal Shortcut):

  1. Open CopyQ -> File -> Preferences -> Shortcuts.
  2. Assign a shortcut to "Show main window under mouse cursor" (e.g., Meta+V).
  3. Press the shortcut. Result: Fails to show.

Test 2 (KDE Custom Command directly):

  1. Clear the CopyQ internal shortcut.
  2. Go to KDE System Settings -> Keyboard -> Shortcuts -> Add Custom Command.
  3. Set the command to /usr/bin/copyq toggle and assign the shortcut.
  4. Press the shortcut. Result: Fails to show.

Logs / Error Output:

When redirecting the output of the KDE Custom Command shortcut to a log, it reveals that the KDE shortcut runner is stripping the locale and environment:

XDG_SESSION_TYPE=wayland
WAYLAND_DISPLAY=wayland-0
DISPLAY=:0
XDG_RUNTIME_DIR=/run/user/1000
Attempting to toggle CopyQ...
Warning: [default] Detected locale "C" with character encoding "ANSI_X3.4-1968", which is not UTF-8.
Warning:    Qt depends on a UTF-8 locale, and has switched to "C.UTF-8" instead.
true
Command finished with exit code: 0

(Even though it outputs true and exit code 0, the window never actually renders on screen unless wrapped).

The Only Working Workaround:

To actually get the window to toggle via a shortcut, I had to create a bash script (copyq_toggle.sh) that manually forces the Qt platform:

#!/bin/bash
export QT_QPA_PLATFORM=wayland
/usr/bin/copyq toggle

Then, map the KDE Custom Shortcut to execute: bash /path/to/copyq_toggle.sh

Expected Behavior:

  1. CopyQ's internal shortcut registration should successfully trigger the Wayland window via the desktop portal.
  2. If that's a KDE Wayland limitation, copyq toggle should gracefully handle being launched from a stripped kglobalacceld environment without requiring a bash wrapper script.

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions