1# Example systemd service to lock screen on sleep/suspend 2# 3# To install: 4# 5# * Copy this file to /etc/systemd/system/xtrlock.service 6# * Replace the "FIXME" entries. 7# * Run: sudo systemctl enable xtrlock 8# 9# As user units cannot depend on system units, we cannot provide this via the 10# per-user systemd instance. 11# 12# -- Chris Lamb <lamby@debian.org> Tue, 06 Aug 2019 16:05:59 +0100 13 14[Unit] 15Description=Lock screen 16Requires=network.target 17After=sleep.target 18DefaultDependencies=no 19 20[Service] 21ExecStart=/usr/bin/xtrlock 22User=FIXME 23Group=FIXME 24Environment=DISPLAY=:0 25Type=oneshot 26 27[Install] 28WantedBy=sleep.target 29