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.


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

  • 2
    use org.mate.ScreenSaver Nov 29, 2017 at 11:09
  • Yes, this now works and gives me a boolean value that I can use. Now I'm just missing the hookup procedure
    – hanzo2001
    Nov 29, 2017 at 11:19


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.