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
Post a Comment