Bug 351113 - Should show a warning dialog if trying to open WM settings and kcmshell is not installed
Summary: Should show a warning dialog if trying to open WM settings and kcmshell is no...
Status: RESOLVED NOT A BUG
Alias: None
Product: kwin
Classification: Plasma
Component: core (other bugs)
Version First Reported In: 5.3.2
Platform: Other Linux
: NOR wishlist
Target Milestone: ---
Assignee: KWin default assignee
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-08-09 11:03 UTC by Unknown
Modified: 2025-06-12 12:58 UTC (History)
0 users

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 Unknown 2015-08-09 11:03:06 UTC
When using "More actions -> Window Manager settings" without having kde-cli-tools installed, I get the following:

klauncher not running... launching kdeinit
Could not open library '/usr/lib/libkdeinit5_kcmshell5'.
Cannot load library /usr/lib/libkdeinit5_kcmshell5: (/usr/lib/libkdeinit5_kcmshell5.so: cannot open shared object file: No such file or directory)
kwin_core: Failed to start kcmshell5:  "KDEInit could not launch 'kcmshell5':
Could not open library '/usr/lib/libkdeinit5_kcmshell5'.
Cannot load library /usr/lib/libkdeinit5_kcmshell5: (/usr/lib/libkdeinit5_kcmshell5.so: cannot open shared object file: No such file or directory)"

This is only visible if looking at stderr. Kwin should figure out that kcmshell is missing and show a warning dialog explaining to the user that they should install it.

Reproducible: Always
Comment 1 Martin Flöser 2015-08-10 08:46:10 UTC
The code in question got recently changed, see:

http://quickgit.kde.org/?p=kwin.git&a=blobdiff&h=562255d85cd67f46cbf8b1fc0ed4bfe3c6ee0a85&hp=428d854665d5f2ecbcb08df7f351c80784f7890e&hb=f6458fa1e8e92fdf16a1acc961703d229894454c&f=useractions.cpp

It still doesn't show a warning, but we could emit a KNotification - or as done in TabBox use kdialog. Unfortunately I doubt we can just assume that KNotification or KDialog are installed and useable, either.

Maybe the best idea is to make kcmshell5 a runtime dependency which is checked with cmake and then assume that distros have dependencies set up correctly?
Comment 2 Unknown 2015-08-10 09:01:13 UTC
Down the line, maybe on our side in LXQt we'll make a standalone kwin settings app. I don't want to suggest something way overengineered as a solution, so here's a thought:

- Change the kcmshell5 invocation to a named shell script. "kwin-settings" or something similar. 
- In the script, check whether kcmshell5 exists in the path/is invocable/whatever. If it's not, you can send a dialog or a notification from the shell script fairly reliably.
 - Down the line, more binary checks can be added.

Performance hit should be insignificant and it avoids an unnecessary dependency. Thoughts?
Comment 3 Martin Flöser 2015-08-10 09:22:57 UTC
If the thought is about better integration into LXQt we might want to rethink it completely. Maybe make it an env variable or a setting.

After all I think what we are looking for is for a desktop environment to easily default configure all of KWin. It's not just the settings applications, but also things like:
* tabbox (lnf package)
* window decoration
* overrides for various currently Plasma styled QtQuick elements
* etc. etc.

I think that needs some musing about the easiest way to get KWin there.
Comment 4 Vlad Zahorodnii 2025-06-12 12:58:37 UTC
I don't think that showing a notification is going to help. Notifications don't seem like the right tool here. If a desktop environment or a distribution don't include necessary tools to make kwin work properly, showing notifications in this case is not really a great UX and the user should not be expected to install more packages based on notifications.

That being said, if there's still interest in such a thing, please submit us patches and we can talk more in detail about it.