diff options
Diffstat (limited to 'src/login')
-rw-r--r-- | src/login/logind-dbus.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/src/login/logind-dbus.c b/src/login/logind-dbus.c index 77a06f2ce4..d64debe51f 100644 --- a/src/login/logind-dbus.c +++ b/src/login/logind-dbus.c @@ -979,9 +979,12 @@ static int have_multiple_sessions( assert(m); - /* Check for other users' sessions. Greeter sessions do not count. */ + /* Check for other users' sessions. Greeter sessions do not + * count, and non-login sessions do not count either. */ HASHMAP_FOREACH(session, m->sessions, i) - if (session->class == SESSION_USER && session->user->uid != uid) + if (session->class == SESSION_USER && + (session->type == SESSION_TTY || session->type == SESSION_X11) && + session->user->uid != uid) return true; return false; |