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

Java 8 + Maven Javadoc plugin: Error fetching URL -

android - How to delete or change the searchview icon inside the SearchView actionBar? -

c++ - Msgpack packing bools bug -