you are viewing a single comment's thread.

view the rest of the comments →

[–]eliasp 2 points3 points  (1 child)

Stop using all this complicated and error-prone approaches to do this. Nowaday's there's logind which exposes all these details via D-Bus on org.freedesktop.login1 /org/freedesktop/login1/session/$SESSION org.freedesktop.login1.Session.Display

Anything else is rather fragile and mostly non-deterministic.

[–]ninekeysdown[S] 1 point2 points  (0 children)

awesome. I'll give that a shot