chiark / gitweb /
loginctl: use $XDG_SESSION_ID for "our" session
authorZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Thu, 1 Jun 2017 02:23:30 +0000 (22:23 -0400)
committerSven Eden <yamakuzure@gmx.net>
Tue, 25 Jul 2017 07:46:52 +0000 (09:46 +0200)
commit4ac036ad95f68f0a5032c41459ce39322b1726f8
treedc5d838964953efd050ce20d73a8743ec7d5c17d
parentd7808ce8dab201703e85b7eee3f21ec65a14537f
loginctl: use $XDG_SESSION_ID for "our" session

Instead of always letting logind guess what the caller's session is, let's
give it the value from $XDG_SESSION_ID when it is present in the caller's
environment.

Nowadays terminal emulators are often running as services under elogind --user,
and not as part of an actual session, so all loginctl calls which depend on
logind guessing the session will fail. I don't see a reason not to honour
$XDG_SESSION_ID.

This applies to LockSession, UnlockSession, TerminateSession, ActivateSession,
SetUserLinger.

Fixes #6032.
src/login/loginctl.c