Created
July 31, 2018 07:27
-
-
Save icve/c9f4eceb0b74492a789d710641631339 to your computer and use it in GitHub Desktop.
LightDM Suspend hook (systemd)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| [Unit] | |
| Description=User suspend lightDM lock screen | |
| Before=sleep.target | |
| [Service] | |
| User=%I | |
| Environment=DISPLAY=:0 | |
| Environment=XDG_SEAT_PATH=/org/freedesktop/DisplayManager/Seat0 | |
| ExecStart=/usr/bin/dm-tool lock | |
| ExecStartPost=/usr/bin/sleep 1 | |
| [Install] | |
| WantedBy=sleep.target | |
| # 1. copy file into /etc/systemd/system/suspend\@.service | |
| # 2. run sudo systemctl enable suspend@<username> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment