Saturday, January 7, 2017

system - GConf Error: No D-BUS daemon running?! How to reinstall or fix?


After installing Konquerer and restarting my laptop i got the following error while trying to open, edit or access files as root from within Terminal (which is existencial for me).



root@linuxBox:/home/v2r# gnome-open /home/


(gnome-open:2686): GConf-WARNING **: Client failed to connect to the D-BUS daemon:
//bin/dbus-launch terminated abnormally with the following error: No protocol specified
Autolaunch error: X11 initialization failed.


GConf Error: No D-BUS daemon running


root@linuxBox:/home/v2r# No protocol specified
Could not parse arguments: Cannot open display:



Also it seems, that dbus is not installed properly anymore in /bin/ and /usr/bin/
See screenshot:
enter image description here


How would i go about fixing this problem and thank you in advance?!!!




Thank you for your answer SirCharlo! It does not resolve the problem at all. Please note, that it only happens while beeing root!



root@linuxBox:/home/v2r# gnome-open /home/


(gnome-open:5170): GConf-WARNING **: Client failed to connect to the D-BUS daemon:
Failed to connect to socket /tmp/dbus-2RdCUjrZ9k: Connection refused
GConf Error: No D-BUS daemon running


root@linuxBox:/home/v2r# No protocol specified
Could not parse arguments: Cannot open display:




SirCharlo's answer worked for me. Same problem on ubuntu 12.04 (precise pangolin). Yeah, I use su (root) also. Shame, shame. Same problem starting emacs too.


The problem seems to be that DBUS_SESSION_BUS_ADDRESS retains its value when you su
instead of picking up the value in /root/.dbus/session-bus/


from man dbus-launch:


   ...
The second common reason for autolaunch is an su to another user, and
display of X applications running as the second user on the display
belonging to the first user. Perhaps the ideal fix in this case would
be to allow the second user to connect to the session bus of the first
user, just as they can connect to the first user's display. However, a
mechanism for that has not been coded.
...

Use sudo, suedit, gksu.


Or if you MUST use su, then try adding this to your /root/.bashrc:


sessionfile=`find "${HOME}/.dbus/session-bus/" -maxdepth 1 -type f`
if [ -f "$sessionfile" ] ; then
if grep -q "^DBUS_SESSION_BUS_ADDRESS=" "${sessionfile}" ; then
export `grep "^DBUS_SESSION_BUS_ADDRESS=" "${sessionfile}"`
else
echo "DBUS_SESSION_BUS_ADDRESS not found in ${sessionfile}"
fi
else
echo "no session address file found in ${HOME}/.dbus/session-bus"
fi

No comments:

Post a Comment

11.10 - Can't boot from USB after installing Ubuntu

I bought a Samsung series 5 notebook and a very strange thing happened: I installed Ubuntu 11.10 from a usb pen drive but when I restarted (...