Bug 440507 - Command-line arguments specified in exec= line get removed
Summary: Command-line arguments specified in exec= line get removed
Status: RESOLVED FIXED
Alias: None
Product: frameworks-kglobalaccel
Classification: Frameworks and Libraries
Component: general (show other bugs)
Version: unspecified
Platform: Other Linux
: HI normal
Target Milestone: ---
Assignee: kdelibs bugs
URL:
Keywords:
: 440107 456589 456972 457872 457932 458213 (view as bug list)
Depends on:
Blocks:
 
Reported: 2021-08-01 18:07 UTC by Martin Rotter
Modified: 2022-09-01 14:27 UTC (History)
11 users (show)

See Also:
Latest Commit:
Version Fixed In: 5.98
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Martin Rotter 2021-08-01 18:07:57 UTC
SUMMARY
I like Tilix (terminal emulator). Tilix has a command "tilix --quake" to launch it as drop-down terminal. Unfortunately, nothing happens when I configure my KDE to use the command.


STEPS TO REPRODUCE: See pictures here - https://imgur.com/a/lc4dnci

OBSERVED RESULT: Nothing happens.


EXPECTED RESULT: "tilix --quake" command is launched.


SOFTWARE/OS VERSIONS
Linux/KDE Plasma: Arch/KDE - 5.22.4
(available in About System)
KDE Plasma Version: 5.22.4
KDE Frameworks Version: 5.84.0
Qt Version: 5.15.2

ADDITIONAL INFORMATION
Comment 1 Nate Graham 2021-08-02 18:05:35 UTC
Can reproduce. It seems like command-line flags get removed. Interestingly enough, any paths you pass in are not removed. So when I set a global shortcut to launch:

dolphin --select /home/nate/Desktop/Contribute.png

What actually happens is that Dolphin is launched like so:

dolphin /home/nate/Desktop/Contribute.png
Comment 2 Martin Rotter 2021-08-03 06:28:49 UTC
Anyway, there is no easy way of hooking arbitrary command to a keyboard shortcut?
Comment 3 Nate Graham 2021-08-04 15:20:50 UTC
The older KHotkeys system will let you do it. Being unable to do it using the newer kglobalaccel system is just a bug.
Comment 4 Nate Graham 2021-08-04 19:33:17 UTC
*** Bug 440107 has been marked as a duplicate of this bug. ***
Comment 5 Nate Graham 2021-09-21 19:48:27 UTC
*** Bug 442626 has been marked as a duplicate of this bug. ***
Comment 6 Ahmad Samir 2022-05-29 18:55:38 UTC
Seems to work now; do you still see this issue?
Comment 7 Nate Graham 2022-08-15 23:48:12 UTC
*** Bug 456972 has been marked as a duplicate of this bug. ***
Comment 8 Nate Graham 2022-08-15 23:48:15 UTC
*** Bug 456589 has been marked as a duplicate of this bug. ***
Comment 9 Nate Graham 2022-08-15 23:48:20 UTC
*** Bug 457932 has been marked as a duplicate of this bug. ***
Comment 10 Nate Graham 2022-08-16 00:12:04 UTC
Git commit 625b53f516d27eb61eaad00175dd7108bf82572f by Nate Graham, on behalf of Nicolas Fella.
Committed on 16/08/2022 at 00:12.
Pushed by ngraham into branch 'master'.

Don't pass Exec arguments to kstart when launching via desktop entry name

If we have a desktop file org.kde.foo.desktop with "Exec=foo bar bla"

we are currently calling "kstart5 --application org.kde.foo bar bla"

However we need to call "kstart5 --application org.kde.foo" without any args

kstart5/ApplicationLauncherJob will read the Exec line again and pick up the args
FIXED-IN: 5.98

M  +2    -3    src/runtime/kserviceactioncomponent.cpp

https://invent.kde.org/frameworks/kglobalaccel/commit/625b53f516d27eb61eaad00175dd7108bf82572f
Comment 11 Nate Graham 2022-09-01 13:29:51 UTC
*** Bug 457872 has been marked as a duplicate of this bug. ***
Comment 12 Nate Graham 2022-09-01 14:27:29 UTC
*** Bug 458213 has been marked as a duplicate of this bug. ***