1. Login to X as user, I used slim with the default session that opens up only a terminal for me.
2. Run the following:
Code: Select all
~> qdbus org.freedesktop.DBus # This works, running as user.
/
~> su -
Password:
~> qdbus org.freedesktop.DBus # This is running as root and it works.
/
~> su <user> -c 'qdbus org.freedesktop.DBus' # Fails
Could not connect to D-Bus server: org.freedesktop.DBus.Error.Spawn.ExecFailed: /usr/bin/dbus-launch terminated abnormally with the following error: No protocol specified
Autolaunch error: X11 initialization failed.
~ [1] > su <user> -c 'DISPLAY=:0.0 qdbus org.freedesktop.DBus' # Fails
Could not connect to D-Bus server: org.freedesktop.DBus.Error.Spawn.ExecFailed: /usr/bin/dbus-launch terminated abnormally with the following error: No protocol specified
Autolaunch error: X11 initialization failed.4. A downgrade of dbus to 1.4.16 has not restored the earlier behavior.
So, now my question is this: what is the newfangled way to get commands like the above to work? These things used to "just work" for so many years.


