-
Notifications
You must be signed in to change notification settings - Fork 553
Description
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):
- Open CopyQ ->
File->Preferences->Shortcuts. - Assign a shortcut to "Show main window under mouse cursor" (e.g.,
Meta+V). - Press the shortcut. Result: Fails to show.
Test 2 (KDE Custom Command directly):
- Clear the CopyQ internal shortcut.
- Go to KDE
System Settings -> Keyboard -> Shortcuts -> Add Custom Command. - Set the command to
/usr/bin/copyq toggleand assign the shortcut. - 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 toggleThen, map the KDE Custom Shortcut to execute: bash /path/to/copyq_toggle.sh
Expected Behavior:
- CopyQ's internal shortcut registration should successfully trigger the Wayland window via the desktop portal.
- If that's a KDE Wayland limitation,
copyq toggleshould gracefully handle being launched from a strippedkglobalacceldenvironment without requiring a bash wrapper script.