How to disable redshift (service) on startup

I have redshift installed on a XUbuntu 21.04. Apparently it's a service systemd[4048]: redshift.service: Failed with result 'exit-code' and it runs at startup.

I'd like to disable redshift on startup, but I can't find where and in which format it's started:

> systemctl stop redshift
> Failed to stop redshift.service: Unit redshift.service not loaded.

systemctl list-units --type=service Doesn't list it

The only thing that worked so far was a couple of sudo killall redshift calls right after booting


Solution 1:

According to RedShift filelists it has systemd service for users.
To disable it use command below:

systemctl --user mask redshift.service redshift-gtk.service

and then reboot.

Also it is known that redshift service is broken at least on Ubuntu MATE 21.04, so really we can prevent its start on LightDM startup by executing the following commands for manual masking:

sudo mkdir -p /var/lib/lightdm/.config/systemd/user
sudo ln -sf /dev/null /var/lib/lightdm/.config/systemd/user/redshift.service  
sudo ln -sf /dev/null /var/lib/lightdm/.config/systemd/user/redshift-gtk.service
sudo chown -R lightdm: /var/lib/lightdm/.config

Note: Xubuntu also uses LightDM, so the above will work for it too.

Solution 2:

@N0rbert's solution did not work for me, although it was a pointer in the right direction.

I found user services in /usr/lib/systemd/user and changed redshift.service to redshift.service.disabled. That stopped running on boot.