Add method to unlock greeter via consolekit.
AbandonedPublic

Authored by tcberner on May 29 2017, 7:50 AM.

Details

Reviewers
graesslin
Group Reviewers
FreeBSD
Plasma
Summary

This is useful on FreeBSD, where we don't have loginctl.

Diff Detail

Repository
R133 KScreenLocker
Branch
master
Lint
No Linters Available
Unit
No Unit Test Coverage
tcberner created this revision.May 29 2017, 7:50 AM
Restricted Application added a project: Plasma. · View Herald TranscriptMay 29 2017, 7:50 AM
Restricted Application added a subscriber: plasma-devel. · View Herald Transcript
graesslin requested changes to this revision.Jun 14 2017, 6:40 PM
graesslin added inline comments.
CMakeLists.txt
78

I would keep this information about the contact. We want to be friendly here and it's such a touchy topic that I prefer to be very explicit that we do want to support other solutions.

81–87

I would prefer if we only search for one of the two. What I want to not have is a situation where we get false positive warnings about missing runtime components. E.g. if your distro is using logind there is just no point in looking for ConsoleKit and it would now produce a false positive runtime warning. The same applies the other way around.

Maybe we could work with add_feature_info?

109–111

given that it's used for a configure check: this is not a runtime but a build time dependency.

abstractlocker.cpp
52–57

please update this part as the code got changed ;-)

62

cant we make the bash script just do what it is supposed to do?

67–70

I would scrap that part. It's too technical and doesn't help the user.

ck-unlock-session.cmake
18

Is this asking for the password in some way? Or do we now install a script which allows to bypass authentication? With logind one can configure the system to always require a password.

cmake/FindConsoleKit.cmake
28

just wondering: why dbus-send and not qdbus? qdbus would be a binary our session depends on anyway.

config-kscreenlocker.h.cmake
17

This also turns loginctl into a build time dependency.

This revision now requires changes to proceed.Jun 14 2017, 6:40 PM
tcberner added inline comments.Jun 14 2017, 7:00 PM
CMakeLists.txt
78

Ok.

81–87

Ok, I'll adapt it.

abstractlocker.cpp
62

I'm not sure, if we can predictably get the name of the correct "broken" session from within the script -- of course, the script could just unlock all the sessions by iterating over them, but that seems rude. Maybe the error message text could be modified to contain correct session name:

"# ck-unlock-session [the current session name]\n\n"
67–70

I think seeing this message annoys the users. So pointing them to possible solutions for future failures is a good thing, even when it might be a bit technical.

ck-unlock-session.cmake
18

It does not ask for a password, but by default, only root should be able to do it.

cmake/FindConsoleKit.cmake
28

No reason, just didn't think of it. I will try to change it to qdbus.

graesslin added inline comments.Jun 14 2017, 8:17 PM
abstractlocker.cpp
62

That sounds reasonable and is what has been done for loginctl lately.

67–70

I doubt that. If the users see this message and don't have either consolekit or loginctl support either their distro messed things up or they compiled themselves and know what they are doing and have seen the cmake warnings. In both cases it doesn't really help to have this information then.

Could this be updated? Over at Alpine Linux and postmarketOS we'd love to use this patch as we don't have systemd (but do have consolekit2), but currently it fails to apply.

Of course merging it upstream would be the best!

Sure. I kind of forgot about it. Sorry.

You can find a more current version at
https://github.com/freebsd/freebsd-ports-kde/tree/kde5.9-import/security/plasma5-kscreenlocker/files

Note, the only needed thing is basically that ck skript. The rest is just adapting the error message.

I will update it this weekend.

tcberner updated this revision to Diff 24889.Jan 7 2018, 5:53 PM
tcberner edited the summary of this revision. (Show Details)

Update.

I was not yet able to test it, yet....

  • switches to qdbus in ck-unlock-session script
  • only looks for ConsoleKit if loginctl was not found

Unfortunately, I don't think we get the information on the session name form ck.
So to unlock it's stil a two step process of first calling it without the name to
figure out which session might be broken.

tcberner updated this revision to Diff 24892.Jan 7 2018, 5:56 PM

Fix qdbus name.

tcberner abandoned this revision.Jan 27 2018, 10:17 AM

Continued in D9713