You are not logged in.
I've done so that xlock starts after I've resumed my laptop with the following service:
[Unit]
Description=User resume actions
After=suspend.target
[Service]
User=%I
Type=simple
Environment=DISPLAY=:0
ExecStart=/usr/bin/xlock
[Install]
WantedBy=suspend.targetEverything works fine, with the exception that xlock doesn't start until 2 seconds after resuming. Is there a way to start xlock instantly? Are there any other options to lock my screen after resuming? Starting before suspend doesn't work as it will just prevent the laptop from suspending. Thanks!
Offline