0

I am trying to run a program when the Unity lock screen is present but I cannot figure what or how I can listen for this event.

  • You might try setting up something that polls for a process called gdm (or lightdm on versions before 17.10,) though that will likely start just slightly before the actual login screen is presented to the user. Is this only on first boot or is this when the computer locks because of standby or on a timer? – sbergeron Mar 20 '18 at 17:45
  • @sbergeron This would be on first boot and whenever the computer locks on standby or timer. – Senior-Jesticle Mar 20 '18 at 18:04
  • Is this on your computer or on a computer where you can't control the boot process? If it's your computer, I think lightdm might have the ability to run a script automatically when it is engaged, dont know about gdm.

    EDIT: just remembered, dbus exists. I think one of the answers here goes over how it should work. It should also be standard across different login managers: https://askubuntu.com/questions/505681/unity-how-to-detect-if-the-screen-is-locked?rq=1

    – sbergeron Mar 20 '18 at 18:07

0 Answers0