You are not logged in.
Hello, I'm using Arch Linux with GNOME 44 with GDM and I note that, also when I reboot, my system sees two sessions from my user account that I never used and I don't know if it is expected or it is a wrong behavior of the system itself.
When I run "users" command, I get
athena athenaand when I run "w" on Wayland, I get:
01:50:02 up 4 min, 2 users, load average: 0.71, 0.33, 0.14
USER TTY LOGIN@ IDLE JCPU PCPU WHAT
athena seat0 01:49 0.00s 0.00s 0.00s /usr/lib/gdm-wayland-session /usr/bin/gnome-session
athena tty2 01:49 4:12 0.03s 0.00s /usr/lib/gdm-wayland-session /usr/bin/gnome-sessionBut I never logged on tty2.
When I run "w" on Xorg, I get:
01:54:17 up 1 min, 2 users, load average: 6.57, 1.64, 0.55
USER TTY LOGIN@ IDLE JCPU PCPU WHAT
athena seat0 01:54 0.00s 0.00s 0.00s /usr/lib/gdm-x-session --run-script /usr/bin/gnome-session
athena :0 01:54 ?xdm? 22.23s 0.00s /usr/lib/gdm-x-session --run-script /usr/bin/gnome-sessionDespite all this, when I run "loginctl", I get:
SESSION UID USER SEAT TTY
3 1000 athena seat0 tty2
1 sessions listed.Why on the first 2 commands I get my user two times? At this point what is the most efficient way or command to check how many users are logged in the system?
Offline
This seems common, GDM adds two sessions to /var/run/utmp
xterm will (by default) also add an entry, so if you run "xterm" you'll get another "session" in users and w (on some pts)
Offline
Long term utmp is not Y2038 safe so is being replace by systemd-logind e.g. [1][2] so the outputs at some future point should become consistent.
[1] https://gitlab.com/procps-ng/procps/-/c … b0d7b9e9d0
[2] https://github.com/util-linux/util-linu … 1836ab2edc
Offline