Drop WorkingDirectory/PYTHONPATH from workout-locker.service

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.
This commit is contained in:
Krzysztof kuhy Rudnicki 2026-06-22 12:43:58 +02:00
parent 6b22b2e2e3
commit 9489ee5202

View File

@ -4,9 +4,10 @@ After=graphical-session.target
[Service] [Service]
Type=simple Type=simple
WorkingDirectory=/opt/screen-locker # 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 Environment=DISPLAY=:0
Environment=PYTHONPATH=/opt/screen-locker
ExecStartPre=/bin/sleep 1 ExecStartPre=/bin/sleep 1
ExecStart=/usr/bin/python3 -m screen_locker.screen_lock --production ExecStart=/usr/bin/python3 -m screen_locker.screen_lock --production
Restart=on-failure Restart=on-failure