I have a laptop that runs Debian Jessie with only the Linux console - no X server installed.A recent dist-upgrade replaced sysvinit with systemd.Now I'm trying to get systemd to lock the console when the computer sleeps (this was previously handled by a script in /etc/pm/sleep.d.)I've tried this:/etc/systemd/system/screenlock.service:[Unit]Description=Lock X session using slockBefore=sleep.target[Service]User=<username>ExecStart=/usr/bin/vlock -ans[Install]WantedBy=sleep.targetAnd then:systemctl enable screenlock.serviceA similar solution works for me on another computer with X but this isn't working in the console.How can that be?
Systemd: locking the console
systemd;screen lock
I got it working by using physlock instead of vlock with the /etc/systemd/system/screenlock.service file like this:[Unit]Description=Lock X session using slockBefore=sleep.target[Service]User=<username>ExecStart=/usr/local/bin/physlock -d[Install]WantedBy=sleep.target