Re: [PATCH 2/2] core: runtime detect logind and ConsoleKit



On Mon, 2013-05-13 at 16:44 -0400, Colin Walters wrote:
On Tue, 2013-04-16 at 07:05 +0100, Fabio Erculiani wrote:
If --with-session-tracking=systemd, but logind is not currently running, the code
now falls back to ConsoleKit. This is particularly useful for covering
the interim, while waiting for distros to abandon ConsoleKit completely.

There's lots of reimplementations of things like this; polkit has one,
gnome-session has one.  It'd be a lot nicer if it was refactored into
something copy&paste-able.

It looks like you're not deleting nm-session-monitor-ck.c, but it's
unused?

I find the #ifdef approach a bit ugly; it'd be more elegant to have real
GObjects and have an egg_session_monitor_get() which checks for logind
exactly once, and returns an instance of EggSessionMonitorSystemd or
EggSessionMonitorCK as appropriate, rather than constantly checking and
having the code for both rolled together.

There's also https://bugzilla.gnome.org/show_bug.cgi?id=686997 which has
patches which pavel posted some comments to.  The original code grew
orgranically and Matthias didn't refactor it into objects when he did
the original systemd port, and I didn't refactor it into objects when I
refactored Matthias' patches either.  Now might be a good time...

Dan



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]