Move kcmshell to KCMUtils
Open, Needs TriagePublic

Description

Currently the kcmshell5 executable is in the kde-cli-tools repository and depends on plasma-workspace. To avoid a dependency to that project apps like kwin or kdeconnect have their own kcmshell implementation.

My suggestion would be to move kcmshell under the name kcmshell6 into the kcmutils project and thus avoid having multiple implementations of the same utility.

This could be done when KF6 is branched, without having to worry about conflicting names.

alex created this task.May 4 2021, 12:12 PM
alex updated the task description. (Show Details)
alex moved this task from Backlog to Waiting on KF6 Branching on the KF6 board.May 4 2021, 12:43 PM
dfaure added a subscriber: dfaure.May 4 2021, 1:11 PM

If nothing in the code of kcmshell creates a dependency problem, I'm in favour of this solution, it's also what came to my mind when reading T14330.

Currently there is a dependency problem with kcmshell5. It uses kworkspace which is provided by plasma-workspace. That dependency is the reason I ported KDE Connect away from it.

Now the obvious question is does it need to?

KWorkspace is only used for https://invent.kde.org/plasma/kde-cli-tools/-/blob/master/kcmshell/main.cpp#L165 which IIUC is only there to force KCMs to use Wayland despite OpenSUSE's non-full Wayland session forcing apps to XWayland

alex added a comment.May 4 2021, 6:16 PM

But in the KDE Connect port you have just not called the method which depends on kworkspace.

Specifically we are talking about KWorkSpace::detectPlatform(_argc, _argv);, there the implementation is only a few lines long.
Considering that we currently have multiple implementations of kcmshell, the worst case of duplicating a few lines does not seem hurtful to me.

Consequently I would argue that there is no non-trivially solvable dependency problem.

alex added a comment.May 4 2021, 6:17 PM

Now the obvious question is does it need to?

KWorkspace is only used for https://invent.kde.org/plasma/kde-cli-tools/-/blob/master/kcmshell/main.cpp#L165 which IIUC is only there to force KCMs to use Wayland despite OpenSUSE's non-full Wayland session forcing apps to XWayland

See https://phabricator.kde.org/D11739 and https://bugs.kde.org/show_bug.cgi?id=428339

davidre added a subscriber: davidre.May 5 2021, 7:13 AM

So it's a workaround for OpenSuse's weird session submitted by them (Fabian)? Imo I would just drop it, they forcing XWayland downstream should not require us carrying patches for that.

Pragmatically for the kcms for which that matters, we always open them in systemsettings now (does that have the same patch?)

alex moved this task from Waiting on KF6 Branching to In Progress on the KF6 board.Feb 9 2023, 3:12 PM
alex moved this task from In Progress to Done on the KF6 board.Feb 17 2023, 1:56 PM