Bug 97160 - act_user_is_logged_in doesn't work
Summary: act_user_is_logged_in doesn't work
Alias: None
Product: accountsservice
Classification: Unclassified
Component: general (show other bugs)
Version: unspecified
Hardware: Other All
: medium normal
Assignee: Matthias Clasen
QA Contact:
Depends on:
Reported: 2016-08-01 07:28 UTC by Ondrej Holy
Modified: 2018-08-07 09:32 UTC (History)
3 users (show)

See Also:
i915 platform:
i915 features:

outputs (3.69 KB, text/plain)
2016-08-03 07:57 UTC, Ondrej Holy

Description Ondrej Holy 2016-08-01 07:28:53 UTC
It seems that act_user_is_logged_in/act_user_is_logged_in_anywhere doesn't work in recent versions (it always returns FALSE). At least on Fedora 24 (accountsservice-0.6.40-4.fc24.x86_64), regardless which session (X11/Wayland) is used if it is relevant. It can be simply tested using gnome-control-center's User Accounts panel, where Last Login field should contain "Logged in" if act_user_is_logged_in returns TRUE.
Comment 1 Ray Strode [halfline] 2016-08-01 13:41:52 UTC
works here.

selinux maybe?

does running

$ loginctl

show your sessoin?
Comment 2 Ondrej Holy 2016-08-02 07:20:57 UTC
It happens regardless SELinux status. loginctl shows sessions for my user. Do you see "Logged in" in the panel? I can't see it even on Fedora 24 live, however Fedora 23 works as expected. It doesn't work if I build gnome-control-center from F23 on F24, so I suppose that something else is wrong. Isn't there any testing tool for accountsservice? D-Bus API seem don't expose all properties...
Comment 3 Ray Strode [halfline] 2016-08-02 15:11:44 UTC
yea it shows:

Last Login     Logged In 

here in control-center

╎❯ rpm -q control-center accountsservice

can you post the output of

╎❯ loginctl show-session


╎❯ loginctl session-status $XDG_SESSION_ID

Comment 4 Ondrej Holy 2016-08-03 07:57:45 UTC
Created attachment 125506 [details]

It is interesting. I saw "Logged in" immediately after system reboot, but I've opened the panel after few minutes and last login time was shown instead of it. I haven't got any idea why. I am not able to reproduce this behavior by another reboots and "Logged in" isn't shown at all. I am attaching outputs from the commands you wanted...

I have never seen "Logged in" with Fedora 24 Live, so you can play with it: 

It works correctly with Fedora 23 Live:
Comment 5 Ray Strode [halfline] 2016-08-03 13:45:20 UTC
is the output of the commands  from after control-center showed the wrong thing?
Comment 6 Ondrej Holy 2016-08-03 14:16:34 UTC
Comment 7 GitLab Migration User 2018-08-07 09:32:28 UTC
-- GitLab Migration Automatic Message --

This bug has been migrated to freedesktop.org's GitLab instance and has been closed from further activity.

You can subscribe and participate further through the new bug through this link to our GitLab instance: https://gitlab.freedesktop.org/accountsservice/accountsservice/issues/32.

Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.