From mboxrd@z Thu Jan 1 00:00:00 1970 From: William Subject: bug#27580: Fwd: bug#27580: Elogin doesn't start properly Date: Tue, 11 Jul 2017 08:33:36 +0100 Message-ID: References: <87bmos2ary.fsf@gnu.org> Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:45481) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dUtcD-0004DK-FZ for bug-guix@gnu.org; Tue, 11 Jul 2017 07:46:06 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dUtcA-0002lB-DO for bug-guix@gnu.org; Tue, 11 Jul 2017 07:46:05 -0400 Received: from debbugs.gnu.org ([208.118.235.43]:58965) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1dUtcA-0002kw-8q for bug-guix@gnu.org; Tue, 11 Jul 2017 07:46:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1dUtc9-00076s-Ud for bug-guix@gnu.org; Tue, 11 Jul 2017 07:46:01 -0400 Sender: "Debbugs-submit" Resent-Message-ID: In-Reply-To: List-Id: Bug reports for GNU Guix List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-guix-bounces+gcggb-bug-guix=m.gmane.org@gnu.org Sender: "bug-Guix" To: 27580@debbugs.gnu.org Thanks for looking at this Ludo. In systemd the systemd-logind.service looks a little like this: [Service] ExecStart=3D/usr/lib/systemd/systemd-logind BusName=3Dorg.freedesktop.login1 It looks as though it simply executes the systemd-logind program. Shouldn't our shepherd service simply execute elogind-program-wrapper? This may also be right because elogind handles things like the laptop lid being closed, which should be handled even if no one has logged in yet. Will On 10 July 2017 at 23:21, Ludovic Court=C3=A8s wrote: > Hello, > > William skribis: > >> Elogind only starts when loginctl is executed as loginctl activates >> elogind via DBus, meaning that it doesn't record any logins before >> loginctl is run. I don't believe that this is intended; my Arch Linux >> install doesn't miss any logins. > > I thought pam_elogind would trigger bus-activation but it does not, > because of this: > > /* Make this a NOP on non-logind systems */ > if (!logind_running()) > return PAM_SUCCESS; > > where: > > static inline bool logind_running(void) { > return access("/run/systemd/seats/", F_OK) >=3D 0; > } > > When the system is started, /run/systemd is empty, so pam_elogind > directly returns success. > > I=E2=80=99m looking for a way to work around this; to be continued=E2=80= =A6 > > Ludo=E2=80=99. > > PS: The problem does not happen with X and SLiM because they somehow > activate elogind before one has logged in.