Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Succeded into migrate Linux distro to ConsoleKit2. #94

darkshram opened this Issue Jun 3, 2017 · 1 comment


None yet
2 participants
Copy link

darkshram commented Jun 3, 2017

It's not an issue at all. Just wanted to share my experience if somebody else had issues migrating to ConsoleKit2. Took me several weeks of building, rebuilding, testing and reading. If there is an issue, it's probably that there is no documentation about how to setup a system to use properly ConsoleKit2, the only one available (o at least the only one I have found) is for programmers. So, I had to discover everything by myself.

The background: I maintain a SystemD-less Linux distro (ALDOS). It's sort-of based on Fedora and CentOS, and currently uses MATE Desktop 1.16, ConsoleKit 0.4.5, Upstart-1.13.2, udev-168 and upower 0.9.23. The plan for the next release was to migrate to MATE Desktop 1.18 (which uses ConsoleKit2 functions), Eudev 3.2.2, ConsoleKit2 1.0.2 and upower 0.99.4.

Built packages for eudev and ConsoleKit2 based on the spec files of udev and ConsoleKit. Made patches and lots of modifications until both eudev and ConsoleKit2 installed properly without reporting any errors in the syslog, running both in debug mode. Also repackaged util-linux with enabled in the login pam.d file. NOTE: The module must load only ONCE, so if it's included in /etc/pam.d/lightdm and /etc/lightdm-autologin, must be removed from there, otherwise will load twice after log-in from LightDM and will duplicate seats (the second without a tty) and therefore without privileges to shutdown, reboot, suspend, hibernate, etc.

Sessions were logged in /var/log/console. But I had a permissions issue with poweroff, reboot, suspend and hibernate: Dbus denied users access to ConsoleKit2. The suspects were polkit and dbus. After doing a lot of research & testing, it was lightdm package (backported from Fedora) the one to blame. Both /etc/pam.d/lightdm and /etc/pam.d/lightdm-autologin included, so every log-in was loading twice this module.

Everything started working perfectly after:

  1. Removing from the pam.d files from lightdm package.
  2. Also, the /etc/X11/xinit/xinitrc, /etc/X11/xinit/xinitrc-common and /etc/X11/xinit/Xsession files from back-ported xorg-x11-xinit package from Fedora have references to obsolete $CK_XINIT_SESSION. They can be removed because they are useless now, and under any circumstance must not be replaced with $CK_LAUNCH_SESSION because will do the same as loading twice (duplicate seats per user, user won't have permissions for many things). Just leave /etc/X11/xinit/xinitrc.d/90-consolekit as the only /etc/X11/xinit/* file using CK_LAUNCH_SESSION.

To make it short: ConsoleKit2 needs to be load only once (I used /etc/pam.d/login as the only file using it) and leave /etc/X11/xinit/xinitrc.d/90-consolekit as the only /etc/X11/xinit file using CK_LAUNCH_SESSION.

An advice to anyone upgrading pam: Only build pam with flex up to 2.6.0. Flex 2.6.1 and later versions will not allow to build pam 1.3.0.

I'm attaching the patches I used for ConsoleKit2 in a Fedora-based distro.


This comment has been minimized.

Copy link

EricKoegel commented Jul 23, 2017

Hey, glad you got everything working. I left this issue open for a while now but I'm going to close it. It should still show up in relevant google searches.

@EricKoegel EricKoegel closed this Jul 23, 2017

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.