Friday, April 19, 2024
 Popular · Latest · Hot · Upcoming
2
rated 0 times [  2] [ 0]  / answers: 1 / hits: 130199  / 1 Year ago, sat, february 18, 2023, 7:10:51

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:



More From » system

 Answers
6

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

[#38521] Sunday, February 19, 2023, 1 Year  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
ongdiligenc

Total Points: 452
Total Questions: 111
Total Answers: 107

Location: Ukraine
Member since Sun, Dec 13, 2020
3 Years ago
;