ConsoleKit2 as of version 1.1.1 implements the Session Controller dbus calls required by Kwin to run under Wayland. This patch first looks for the login1 service before attempting the ConsoleKit service.
Details
- Reviewers
graesslin - Group Reviewers
KWin - Commits
- R108:6ebc3d65f032: Add ConsoleKit2 support for launching Wayland sessions
On a system running ConsoleKit2, logging into a text console and running:
export $(dbus-launch); export QT_QPA_PLATFORM=wayland; startplasmacompositor
Most of this patch is just shuffling code around to support both logind and CK2.
Diff Detail
- Repository
- R108 KWin
- Lint
Lint Skipped - Unit
Unit Tests Skipped
I'm really happy to see such a change!
I'm wondering whether we should do a larger refactoring and rename the class from Logind to something else. After all with that change it's no longer logind...
How would the thing behave if it's an older consolekit version? Just silently fail like currently?
logind.cpp | ||
---|---|---|
111–128 | As this part is now basically copied I suggest to turn it into a private method and pass e.g. an enum to indicate whether it's logind or consolekit. |
Oh wow, I thought I uploaded this new diff ages ago, sorry!
Changes to the diff: switched to using an enum as requested and fixed the VT switch dbus code so it will use CK2's version as well.
I'm wondering whether we should do a larger refactoring and rename the class from Logind to something else. After all with that change it's no longer logind...
If you want I can do that. I was trying to keep the changes small so I don't introduce new bugs as I find and fix any in the ConsoleKit2 implementation.
How would the thing behave if it's an older consolekit version? Just silently fail like currently?
Yes, you'd get the dbus method not found error. Additionally, if ConsoleKit2 doesn't have support for using the session controller (platform that I haven't gotten to yet or it was compiled out) then the TakeControl call will return CK_SESSION_ERROR_NOT_SUPPORTED. The bigger issue is getting libinput ported.
Yes I would also suggest to merge the change without a large refactoring and do that on top now.
Change looks good to me. Do you have commit rights or should I push for you?