Bug 473261 - KGlobalAccel gets started when using kde apps, even when not on kde plasma.
Summary: KGlobalAccel gets started when using kde apps, even when not on kde plasma.
Status: RESOLVED INTENTIONAL
Alias: None
Product: frameworks-kglobalaccel
Classification: Frameworks and Libraries
Component: general (show other bugs)
Version: 5.108.0
Platform: Other Linux
: NOR normal
Target Milestone: ---
Assignee: kdelibs bugs
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2023-08-10 20:25 UTC by peanutplays61
Modified: 2023-08-15 19:23 UTC (History)
2 users (show)

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


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description peanutplays61 2023-08-10 20:25:56 UTC
SUMMARY
***
NOTE: If you are reporting a crash, please try to attach a backtrace with debug symbols.
See https://community.kde.org/Guidelines_and_HOWTOs/Debugging/How_to_create_useful_crash_reports
***

I'm new here, and this is in this category as I don't know where it would be as it effects most important, if not all, kde plasma apps.

I'm not sure if this is intended or not, but my assumption is it isn't as there is no easy way to disable it.
STEPS TO REPRODUCE
1. Download a kde plasma app, like kwrite, on a system with kde installed.
2. Open a de or wm that is not kde plasma
3. Use KWrite or another app, and try to use a kde keybind. 

OBSERVED RESULT
The kde keybinds work

EXPECTED RESULT
None of them work, as you aren't in kde.

SOFTWARE/OS VERSIONS
Windows: 
macOS: 
Linux/KDE Plasma: 
(available in About System)
KDE Plasma Version: 
KDE Frameworks Version: 
Qt Version: 

ADDITIONAL INFORMATION
Comment 1 Nate Graham 2023-08-11 20:27:45 UTC
Keybindings are attached to apps, not to Plasma (and not to KDE; KDE is the name of the community), so this is behaving as expected,
Comment 2 Nicolas Fella 2023-08-13 13:13:56 UTC
(In reply to Nate Graham from comment #1)
> Keybindings are attached to apps, not to Plasma (and not to KDE; KDE is the
> name of the community), so this is behaving as expected,

It's a bit more complex than that.

The way KGlobalAccel currently works mean that when an app wants to interact with it it will be launched via DBus activation. I agree that this is undesirable outside of Plasma. I tried to change that at some point, but that broke shortcuts for people using KWin outside of Plasma, so it was reverted.

For Plasma 6 I've restructured KGlobalAccel to not start kglobalacceld via DBus activation and instead require it to be launched manually if needed. That avoids the problem.

That said I don't see how using KWrite would trigger this, it should only affect the very few apps that do interact with global shortcuts
Comment 3 Nate Graham 2023-08-14 21:47:21 UTC
I'm not sure it's undesirable outside of Plasma. If I install Yakuake in GNOME and I hit F12, I expect Yakuake to activate. The fact that it uses KGlobalAccel for the shortcut is an implementation detail, but to the extent that I want the global shortcut to work, I want KGlobalAccel to be running so it can handle the shortcut.
Comment 4 peanutplays61 2023-08-15 19:23:20 UTC
(In reply to Nicolas Fella from comment #2)
> (In reply to Nate Graham from comment #1)
> > Keybindings are attached to apps, not to Plasma (and not to KDE; KDE is the
> > name of the community), so this is behaving as expected,
> 
> It's a bit more complex than that.
> 
> The way KGlobalAccel currently works mean that when an app wants to interact
> with it it will be launched via DBus activation. I agree that this is
> undesirable outside of Plasma. I tried to change that at some point, but
> that broke shortcuts for people using KWin outside of Plasma, so it was
> reverted.
> 
> For Plasma 6 I've restructured KGlobalAccel to not start kglobalacceld via
> DBus activation and instead require it to be launched manually if needed.
> That avoids the problem.
> 
> That said I don't see how using KWrite would trigger this, it should only
> affect the very few apps that do interact with global shortcuts

The interesting part of kwrite and Kate is that it only launches when you open a document.