mirror of
https://github.com/kuhyx/screen-locker.git
synced 2026-07-04 14:43:14 +02:00
screen_locker is now pip-installed into system Python's user site-packages (see the prior packaging-discovery fix), so the unit no longer needs a path override to resolve the module.
20 lines
506 B
Desktop File
20 lines
506 B
Desktop File
[Unit]
|
|
Description=Workout Screen Locker
|
|
After=graphical-session.target
|
|
|
|
[Service]
|
|
Type=simple
|
|
# No WorkingDirectory/PYTHONPATH needed: screen_locker is pip-installed
|
|
# (pip install --user --break-system-packages -e .), so /usr/bin/python3
|
|
# finds it via user site-packages.
|
|
Environment=DISPLAY=:0
|
|
ExecStartPre=/bin/sleep 1
|
|
ExecStart=/usr/bin/python3 -m screen_locker.screen_lock --production
|
|
Restart=on-failure
|
|
RestartSec=2s
|
|
RestartPreventExitStatus=0
|
|
User=%u
|
|
|
|
[Install]
|
|
WantedBy=graphical-session.target
|