0

I'm running Ubuntu 22.04.2 LTS and want to display the lock screen when I unplug my charger. Is there a script, plugin or program that will let me do this?

  • 2
    Welcome to AskUbuntu. To clarify, you would like your notebook to automatically lock when it is disconnected from power? Or are you asking to have the machine wake from sleep/hibernate and show the lock screen when disconnected? – matigo Apr 11 '23 at 04:25
  • An endless script running in background can monitor battery status as explained in https://askubuntu.com/a/1412872/855322 and then lock the screen as explained in https://askubuntu.com/a/493331/855322 – FedKad Apr 11 '23 at 10:10
  • @matigo yes i want it to automatically lock when it is disconnected from power. – MalcolmInTheCenter Apr 12 '23 at 00:12

0 Answers0