Sample Header Ad - 728x90

Distribution independent detection of screen lock event

1 vote
0 answers
54 views
I am writing an application which needs to pause whenever the screen is locked. Since the users of the application will be running different DM's (Gnome, Mate, Cinnamon, XFCE, Plasma etc.) I am looking for a DM independent way of detecting the screen lock event. Most of the solutions on SE (e.g. https://askubuntu.com/questions/1229618/detect-that-the-system-is-locked#1229619) depend on polling the gnome-screensaver which will not work with other DM's Is a clean DM independent solution for detecting screen lock available? or do I have to check for and poll every locker application for every DM? PS: If possible I would also want my script to await instead of frequently polling for file/program.
Asked by vijayvithal (139 rep)
Aug 9, 2024, 04:24 AM
Last activity: Aug 9, 2024, 05:42 AM