Eos-reboot-required asks for login twice

Running /usr/bin/eos-reboot-required prompts for my password twice, causing me to receive duplicate reboot notifications when updating my system.

Why would anyone need to run this command?

It automatically runs after you update your system to notify you that you need to restart, and credentials are given twice implicitly. I intentionally ran it to confirm this.

1 Like

Okay…

I just tried it myself and i get the same. Normally i would not have seen this because i don’t have any issue when i get the notification. But i see here it comes up twice also after asking for the password twice too.

Screenshot_20220806_231702

Not sure why I didn’t check sooner, but it looks like /usr/bin/users returns the same user multiple times. Based on this answer, a user is printed according to how many sessions it’s logged in to, and I guess your terminal counts as one. I opened three terminals and got four repeats of the same user. Since I update using the terminal, I get duplicate notifications. The script must be updated to skip duplicate users in the loop using users | sed 's/ /\n/g' | sort | uniq instead or something similar.

Thanks for report! :sweat_smile:

Another question is why have two same users…

Also plasma Desktop? As plasmas notifications could cause it …

I’m not sure what you mean by your question. I only have one user. The point of the redundant listings is to indicate how many sessions a specific user is logged into. The who command is more verbose and tells you specifically what these sessions are:

1 Like

No, it’s not a DE issue as I’ve described already.

Mine shows this and always has.

users

ricklinux ricklinux

who

ricklinux tty1         2022-08-07 10:57 (:0)
ricklinux pts/1        2022-08-07 11:30 (:0)

I did not experience the case in question after the last package update. In fact, I didn’t even see the reboot warning window itself, I was even surprised, even though there was a kernel update.

Nice prompt :vulcan_salute:

So we can validate that the number of notifications is related to the number of running sessions for the user?

Just built eos-hooks 1.7-1, coming to mirrors soon.

Thanks again, @Harpium :+1:

3 Likes

I tried it and shows only one instance of the notification now and only required one password entry.

1 Like