Created
June 24, 2013 14:01
-
-
Save kikairoya/5850256 to your computer and use it in GitHub Desktop.
Enables 'systemctl --user' without X11, dbus-launch, systemd-user-session
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
if [ ! -S /run/user/$(id -u)/dbus/user_bus_socket ]; then | |
mkdir -p /run/user/$(id -u)/dbus | |
dbus-daemon --session --fork --address=unix:path=/run/user/$(id -u)/dbus/user_bus_socket --systemd-activation | |
fi | |
if ! systemctl --user > /dev/null 2> /dev/null; then | |
DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/$(id -u)/dbus/user_bus_socket /usr/lib/systemd/systemd --user & > /dev/null 2> /dev/null | |
fi |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment