You are not logged in.

#1 2016-11-02 02:56:31

farenhite451
Member
Registered: 2016-11-02
Posts: 2

[SOLVED] Systemd User Services: Failed to connect to bus

I've read several threads about starting systemd user services, including the wiki, and still haven't gotten through it so I'm posting here.

I'm attempting to start redshift using the following command:

sudo systemctl --user start redshift.service

I get the ouput:

 Failed to connect to bus: No such file or directory

My system is up to date and redshift.service is present in /usr/lib/systemd/user. Here is the output of

systemctl status

http://pastebin.com/MtvVa1mH

It appears that the dbus service for my user is running, and my environment variables appear to be set correctly:

echo $XDG_RUNTIME_DIR
/run/usr/1000
echo $DBUS_SESSION_BUS_ADDRESS
unix:path=/run/user/1000/bus

as well as

echo $DISPLAY
:0
echo $XAUTHORITY
/home/alex/.Xauthority

my xinitrc file should run "/etc/X11/xinit/xinitrc.d/50-systemd-user.sh" (which is supposed to import DISPLAY and XAUTHORITY for systemd user) since it was based on the default provided in /etc/X11/xinitrc

First I attempted setting environment variables as described in the wiki using DefaultEnvironment in ~/.config/systemd/user.conf

[Manager]
DefaultEnvironment="XDG_RUNTIME_DIR=/run/user/1000" "XAUTHORITY=/home/alex/.Xauthority" "DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/1000/bus"

Then I tried running

 dbus-update-activation-environment --systemd --all 

as well as

 sudo systemctl --user import-environment

(with various environment variables)  which also gives the "Failed to connect to bus" error

I'm unsure how to proceed from here. Appreciate any input

Last edited by farenhite451 (2016-11-02 03:33:02)

Offline

#2 2016-11-02 02:57:24

jasonwryan
Anarchist
From: .nz
Registered: 2009-05-09
Posts: 30,426
Website

Re: [SOLVED] Systemd User Services: Failed to connect to bus

You don't use elevated privileges for user services.


Arch + dwm   •   Mercurial repos  •   Surfraw

Registered Linux User #482438

Offline

#3 2016-11-02 03:32:16

farenhite451
Member
Registered: 2016-11-02
Posts: 2

Re: [SOLVED] Systemd User Services: Failed to connect to bus

Thank you!

Offline

#4 2018-12-26 23:10:24

fabioamd87
Member
Registered: 2008-11-22
Posts: 128

Re: [SOLVED] Systemd User Services: Failed to connect to bus

Thanks.

Offline

#5 2018-12-26 23:19:14

WorMzy
Administrator
From: Scotland
Registered: 2010-06-16
Posts: 12,746
Website

Re: [SOLVED] Systemd User Services: Failed to connect to bus


Sakura:-
Mobo: MSI MAG X570S TORPEDO MAX // Processor: AMD Ryzen 9 5950X @4.9GHz // GFX: AMD Radeon RX 5700 XT // RAM: 32GB (4x 8GB) Corsair DDR4 (@ 3000MHz) // Storage: 1x 3TB HDD, 6x 1TB SSD, 2x 120GB SSD, 1x 275GB M2 SSD

Making lemonade from lemons since 2015.

Offline

Board footer

Powered by FluxBB