You are not logged in.
Hi all,
this is related to systemctl --user stuff but only remotely. I had systemctl --user up and running for some time, but it stopped working at some point with a message "Failed to issue method call: Process /bin/false exited with status 1". After searching a bit I figured it had something to do with dbus, so I added the following unit files:
/etc/systemd/user/dbus.service
[Unit]
Description=D-Bus Message Bus
Requires=dbus.socket
[Service]
ExecStart=/usr/bin/dbus-daemon --session --address=systemd: --nofork --nopidfile --systemd-activation
ExecReload=/usr/bin/dbus-send --print-reply --session --type=method_call --dest=org.freedesktop.DBus / org.freedesktop.DBus.ReloadConfig
/etc/systemd/user/dbus.socket
[Unit]
Description=D-Bus Message Bus Socket
Before=sockets.target
[Socket]
ListenStream=/run/user/%U/dbus/user_bus_socket
[Install]
WantedBy=default.target
which basically gives me a user-session dbus socket in /run/user/1000/dbus/user_bus_socket. So far so good.
What's troubling me is that DBUS_SESSION_BUS_ADDRESS is set to a non-existing socket:
max@failenovo:~/ $ echo $DBUS_SESSION_BUS_ADDRESS
unix:abstract=/tmp/dbus-st1aYMhS1t,guid=bdc7f9102f85b8318ba74ffe52ebc3dd
max@failenovo:~/ $ file /tmp/dbus-st1aYMhS1t
/tmp/dbus-st1aYMhS1t: cannot open `/tmp/dbus-st1aYMhS1t' (No such file or directory)
So, invoking systemd --user gives me: "Failed to issue method call: Process org.freedesktop.systemd1 exited with status 1". If I manually export DBUS_SESSION_BUS_ADDRESS to the correct value from the dbus.socket unit, it works:
max@failenovo:~/ $ systemctl --user
Failed to issue method call: Process org.freedesktop.systemd1 exited with status 1
max@failenovo:~/ $ DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/1000/dbus/user_bus_socket systemctl --user
max@failenovo:~/ $ echo $?
0
My two questions:
How would I confiugure dbus-daemon (launched by gnome-session, I guess) to _actually write_ out the dbus socket in /tmp?
OR: Where's the best place to manually set the DBUS_SESSION_BUS_ADDRESS to a value, so that it doesn't get overwritten by garbage?
Cheers,
Max
Offline
have you tried this? https://bbs.archlinux.org/viewtopic.php?id=173501
Since version 207, systemd uses a different PAM module for user@.service, and includes an incorrect default PAM config. Fix it with: # sed -i s/system-auth/system-login/g /etc/pam.d/systemd-user (or replace all occurrences of system-auth in that file with system-login).
system-login needs to start pam_systemd: it should contain -session optional pam_systemd.so; check if a .pacnew file exists.
no place like /home
github
Offline
@demian, that little sed replacement is no longer relevant or necessary. It has since been changed in systemd 208.
Offline
I'm pretty sure that my /etc/pam.d/* files are doing the right thing (they're vanilla). Lauching the systemd user instance is not really the problem, it actually works. I just can't run "systemctl --user" to control it without prepending/overwriting DBUS_SESSION_BUS_ADDRESS.
Offline
https://bbs.archlinux.org/viewtopic.php … 6#p1348186 ← Namely step 5?
Offline
DBUS_SESSION_BUS_ADDRESS is set to a non-existing socket
That's OK because it's "abstract". Apparently.
Offline