Catching user switching and getting current active user from root on linux

Grant Edwards invalid at invalid.invalid
Wed Dec 1 10:23:21 EST 2010


On 2010-11-30, mpnordland <mpnordland at gmail.com> wrote:

> I have situation where I need to be able to get the current active
> user,

How do you define "current active user"?

> and catch user switching eg user1 locks screen, leaves computer,
> user2 comes, and logs on. basically, when there is any type of user
> switch my script needs to know.

What do you do when there are multiple users logged in?

-- 
Grant Edwards               grant.b.edwards        Yow! How's the wife?
                                  at               Is she at home enjoying
                              gmail.com            capitalism?



More information about the Python-list mailing list