You are not logged in.
I recently installed Redshift and I'm trying to get it to auto start when I log in. However, I get a weird error message whenever I try to start or enable the systemd service:
$ sudo systemctl --user enable redshift.service
Failed to connect to bus: $DBUS_SESSION_BUS_ADDRESS and $XDG_RUNTIME_DIR not defined
$ sudo systemctl --user start redshift.service
Failed to connect to bus: $DBUS_SESSION_BUS_ADDRESS and $XDG_RUNTIME_DIR not definedWhen I try to start Redshift from bash, it works normally:
$ redshift
Trying location provider `geoclue2'...
Using provider `geoclue2'.
Using method `randr'.
Waiting for initial location to become available...
Location: XXX.XX N, XXX.XX W(Location censored for obvious reasons)
I do not know what $DBUS_SESSION_BUS_ADDRESS or $XDG_RUNTIME_DIR are, I do not know where they would be located, and I do not know how I could even start to fix this. I looked online and found something about not being able to connect to a bus, but I couldn't find any information on what that meant. I've already tried reinstalling Redshift multiple times, but nothing changes when I do.
How can I fix this? Do I just have to make new files somewhere? Do I have to reinstall something?
Last edited by nuclear-gnocchi (2021-01-11 17:00:35)
Offline
I would suggest starting by reading General_troubleshooting#Session_permissions.
Additionally how do you login? What is the output of the following
systemctl status --system
systemctl status --user
envOffline
$ sudo systemctl --user enable redshift.service
You don't elevate privileges to start your user services.
Offline
nuclear-gnocchi wrote:$ sudo systemctl --user enable redshift.service
You don't elevate privileges to start your user services.
Oh, whoops. I got it working with
$systemctl --user enable redshift.serviceThanks ![]()
Offline
Please remember to mark your thread [SOLVED] (edit the title of your first post).
Offline
Please remember to mark your thread [SOLVED] (edit the title of your first post).
Whoops, thank you!
Offline
Thanks, I was trying to enable greenclip.service as a user, and archwiki mentioned enabling it with sudo privileges as,
# systemctl --user enable greenclip.servicewhich is not the case, it should be executed as a normal user.
Offline