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

Mark Wooding mdw at distorted.org.uk
Wed Dec 1 13:19:20 EST 2010


Grant Edwards <invalid at invalid.invalid> writes:

> On 2010-11-30, mpnordland <mpnordland at gmail.com> wrote:
> > 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?

In case it's not clear: this situation doesn't just occur on `exotic'
systems like Unix servers.  Even Windows systems can have several people
logged into the console (with one active, using `fast user switching')
and another one or two connected using terminal services.

-- [mdw]



More information about the Python-list mailing list