Need to get User events like (login, lock, unlock, logoff, shutdown, suspend, and resume status) across OS in .net core

How to get login, lock, unlock, logoff, shutdown, suspend, and resume status in Windows, Linux, macOS and ubuntu using .NET core.

I can able to get these using the below events in windows

  1. SystemEvents.SessionSwitch
  2. SystemEvents.SessionEnding
  3. SystemEvents.PowerModeChanged
  4. NetworkChange.NetworkAvailabilityChanged

How to get all these events in other OS? If possible please provide me some source.

Thanks.

.NET Foundation Website | Blog | Projects | Code of Conduct