Skip to content

Redshift crashes after starting it as a user service #742

Closed
@Jacotsu

Description

@Jacotsu

When i start the service with systemctl --user start redshift it crashes with the following log

To Reproduce
Steps to reproduce the behavior:

  1. Install redshift, wlroots and sway version 1.1-rc1-51-gf5d1c272
  2. Set adjustment-method=wayland in .config/redshift.conf
  3. Start logging with journalctl --user -u redshift
  4. Start the service with systemctl --user start redshift
  5. See error

Expected behavior
Automatic wayland display detection

Error output/logs/screenshots

ott 25 17:44:42 stufa systemd[3362]: Started Redshift display colour temperature adjustment.
ott 25 17:44:42 stufa redshift[3818]: Could not connect to wayland display, exiting.
ott 25 17:44:42 stufa redshift[3818]: Failed to start adjustment method wayland.
ott 25 17:44:42 stufa systemd[3362]: redshift.service: Main process exited, code=exited, status=1/FAILURE
ott 25 17:44:42 stufa systemd[3362]: redshift.service: Failed with result 'exit-code'.
ott 25 17:44:42 stufa systemd[3362]: redshift.service: Service RestartSec=100ms expired, scheduling restart.
ott 25 17:44:42 stufa systemd[3362]: redshift.service: Scheduled restart job, restart counter is at 4.

Software versions (please complete the following information):

  • OS: Linux
  • Redshift version: 1.12
  • Distribution: Ubuntu 19.10
  • Redshift installed from: PPA

Possible Fix
By using the following service file redshift starts normally as a user service and works

[Unit]
Description=Redshift display colour temperature adjustment
Documentation=http://jonls.dk/redshift/
After=display-manager.service

[Service]
ExecStart=env WAYLAND_DISPLAY=wayland-0 /usr/local/bin/redshift
Restart=always

[Install]
WantedBy=default.target

Probably there's a better way to fix this issue

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions