I have a laptop that runs Debian Jessie with only the Linux console - no X server installed.
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
I've tried this:
[Unit] Description=Lock X session using slock Before=sleep.target [Service] User=<username> ExecStart=/usr/bin/vlock -ans [Install] WantedBy=sleep.target
systemctl enable screenlock.service
A similar solution works for me on another computer with X but this isn't working in the console.
How can that be?