Bug 445833 - custom hotkey command with "~" in path does not work
Summary: custom hotkey command with "~" in path does not work
Status: RESOLVED UNMAINTAINED
Alias: None
Product: systemsettings
Classification: Applications
Component: kcm_khotkeys (other bugs)
Version First Reported In: 5.23.3
Platform: Other Linux
: NOR normal
Target Milestone: ---
Assignee: Michael Jansen
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2021-11-20 17:00 UTC by g111
Modified: 2024-03-04 19:42 UTC (History)
2 users (show)

See Also:
Latest Commit:
Version Fixed/Implemented In:
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description g111 2021-11-20 17:00:24 UTC
SUMMARY
I have placed a command in my ~/bin/ directory and wanted to configure a hotkey to execute this command with a parameter. So I configured the command/URL like "~/bin/foo --bla". When invoking the hotkey I have got an error requester that the command "/home/gert/bin/foo --bla" could not be executed: "Unable to run the command specified. The file or folder "/home/gert/bin/foo --bla" does not exist. So the "~" was correctly expanded but somehow not correctly executed.

When changing the "~" to "/home/gert" everything did work fine.

STEPS TO REPRODUCE
1. Place a programm in ~/bin/. E.g. a symlink: ln -s /usr/bin/xeyes ~/bin/
2. Create a custom hotkey to envoke the command: ~/bin/xeyes -distance
3. Press the hotkey

OBSERVED RESULT
The mentioned error requester occurs.

EXPECTED RESULT
xeyes should open

4. Now change the command to: /home/XXX/bin/xeyes -distance
    (Where XXX is your user's home directory)
  => The hotkey does work

SOFTWARE/OS VERSIONS
Operating System: Kubuntu 21.10
KDE Plasma Version: 5.23.3
KDE Frameworks Version: 5.88.0
Qt Version: 5.15.2
Comment 1 g111 2021-11-20 17:02:22 UTC
One additional information: It is important to invoke the command with a parameter. Without a parameter it works with "~", too.
Comment 2 Nate Graham 2024-03-04 19:42:08 UTC
As announced in https://pointieststick.com/2023/07/26/what-we-plan-to-remove-in-plasma-6/ and https://community.kde.org/Plasma/Plasma_6#Removals, I'm afraid KHotKeys has reached end-of-life in Plasma 6. Accordingly, all bug reports and feature requests for it must be closed now.

Most of what KHotKeys could do can already be done with the newer KGlobalAccel system in Plasma 6. A few features such as mouse gestures and triggering conditions based on changes to window states are not yet implemented in the new system. These will be added in the future if and when resources materialize for them, and/or when a kind soul submits patches to implement them! :) Meanwhile, the 3rd-party "Mouse Actions" app (https://github.com/jersou/mouse-actions) may be usable for implementing your own mouse gestures again.

Thanks for your understanding, everyone.