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

css - SVG using textPath a symbol not rendering in Firefox -

Java 8 + Maven Javadoc plugin: Error fetching URL -

order - Notification for user in user account opencart -