You are not logged in.
Pages: 1
Hi guys. I have an issue with a systemd service for xautolock. I tried different configuration and can't find the mistake I am doing here.
One of the versions I tried:
[Unit]
Description=lock screen after a few minutes of inactivity[Service]
Type=simple
User=ME
Environment=DISPLAY=:0
ExecStart=/usr/bin/xautolock -detectsleep -time 12 -locker slock[Install]
WantedBy=graphical.target
Output of systemctl status xautolock:
● xautolock.service - lock screen after a few minutes of inactivity
Loaded: loaded (/etc/systemd/system/xautolock.service; enabled; vendor preset: disabled)
Active: failed (Result: exit-code) since Mo 2016-07-25 13:47:53 CEST; 3s ago
Process: 8611 ExecStart=/usr/bin/xautolock -detectsleep -time 12 -locker slock (code=exited, status=1/FAILURE)
Main PID: 8611 (code=exited, status=1/FAILURE)Jul 25 13:47:53 ME systemd[1]: Started lock screen after a few minutes of inactivity.
Jul 25 13:47:53 ME systemd[1]: xautolock.service: Main process exited, code=exited, status=1/FAILURE)
Jul 25 13:47:53 ME systemd[1]: xautolock.service: Unit entered failed state.
Jul 25 13:47:53 ME systemd[1]: xautolock.service: Failed with result 'exit-code'.
Last edited by fch (2016-07-25 12:13:24)
Offline
Anyone?
Offline
Read the journal for more detail on why that specific process failed: `_PID=8611`
Offline
Aug 16 16:05:51 ME xautolock[337]: Couldn't connect to :0
Aug 16 16:05:51 ME systemd[1]: xautolock.service: Main process exited, code=exited, status=1/FAILURE
Aug 16 16:05:51 ME systemd[1]: xautolock.service: Unit entered failed state.
Aug 16 16:05:51 ME systemd[1]: xautolock.service: Failed with result 'exit-code'.
Note that changing the variable "Environment=DISPLAY=:0" didn't help here.
Offline
Start it as a user service.
Offline
Error turned now to:
xautolock.service: Failed at step GROUP spawning /usr/bin/xautolock: Operation not permitted
Last edited by fch (2016-08-19 11:35:21)
Offline
Pages: 1