0

I'm looking on a way to add a popup message on screen unlock (when you leave your post unattended, your screen locks out to black and MDM and you have to input your password again to unlock) on a Linux Mint 18.1 MATE.

The question is two-fold:

  • [ANSWERED] How do I detect the screen unlock event (or DBus message)?
  • Where or how do I hookup the script to initiate the listener (or DBus binding)?

I now know that I can add a zenity popup easily from a bash script. Other than that, I'm stumped.

I have found that you can add a listener to the DBUS as explained here. However, after testing the messages generated I noticed there aren't any lines with a member ActiveChanged involved.

I know that MATE is based on GNOME but I suspect that

dbus-monitor --session "type='signal',interface='org.gnome.ScreenSaver',member=ActiveChanged"

does not generate messages when I lock out and into the session. I've checked changing gnome with freedesktop with the same results.

I wish there were some desktop version of a motd but this seems quite more complicated.


UPDATE 1

With regards to the first question, as suggested in the comments, using

dbus-monitor --session "type='signal',interface='org.mate.ScreenSaver',member=ActiveChanged"

a screen unlock can be detected

hanzo2001
  • 185
  • 1
  • 6

0 Answers0