python get active user in linux when 2 users are logged in -


i write python script starts desktop user session in ubuntu linux. send requests server on external device signal. if change user in ubuntu (not logout first, login second) - 2 requests server 1 device signal. want determine user in "active" desktop session , send request user only. how can it?

p.s. script has minimal gui user, cannot run background service.


Comments

Popular posts from this blog

objective c - Deep Linking for iOS Apps which are not installed yet? -

Changing nested dictionary in VBA -

javascript - SignalR sharing connection between 2 apps -