Simply add this snippet...
export XDG_RUNTIME_DIR="/run/user/$UID"
export DBUS_SESSION_BUS_ADDRESS="unix:path=${XDG_RUNTIME_DIR}/bus"
...to .bashrc
or .zshrc
or any file ran on login.
Simply add this snippet...
export XDG_RUNTIME_DIR="/run/user/$UID"
export DBUS_SESSION_BUS_ADDRESS="unix:path=${XDG_RUNTIME_DIR}/bus"
...to .bashrc
or .zshrc
or any file ran on login.
It doesn't work for me.
When I try
systemctl --user
, I getFailed to connect to bus: No such file or directory
.Does XDG have something to do with Gnome and KDE? Because I have KDE.
EDIT:
Wow it works!
Sorry. Previously I was logged in as root.