Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

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:

share|improve this question

7 Answers 7

I had this same problem. In my system the problem is caused for ~/.dbus being owned by root. Changing ownership me solved the problem for me. I suggest you to check this on your system too.

Changing the ownership can be done with the chown command. For a single file:

chown <user>:<group> file

For a directory and its children:

chown -R <user>:<group> folder

So, in this case,

chown -R <your user>:<your group> ~/.dbus 

should work.

share|improve this answer
2  
Can you explain how to change the ownership of files for others –  Mateo_ Oct 18 '12 at 16:02
    
Thank you for your answer scoopc. I already reinstalled my Ubuntu OS a few month back, so it is to late for me to give your suggestion a go. –  v2r Oct 28 '12 at 15:47

Could you try this?

sessionfile=`find "${HOME}/.dbus/session-bus/" -type f`
export `grep "DBUS_SESSION_BUS_ADDRESS" "${sessionfile}" | sed '/^#/d'`

And retry your command..

gnome-open /home/
share|improve this answer
    
Many thanks for your reply, but as i wrote before, the problem resolved itself, by making a fresh install of the OS! –  v2r Apr 28 '13 at 19:21

Try export ($dbus launch)
This worked for me on Opensuse 12.1 while running it as a VM.

share|improve this answer
1  
Thank. This worked for me (except the command is export ($debug-launch) (with a hyphen) –  FractalSpace Apr 7 at 16:04

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
share|improve this answer
    
Thank you very much for your answer user68606!! I'll give it another go with your suggestions later on and update my question. (May take 1-2 days/No INet at home right now.) –  v2r Jun 8 '12 at 18:54

Removed /var/lib/dbus/machine-id and all was better

The above fix also fixes:

(virt-manager:2810): GConf-WARNING **: Client failed to connect to the D-BUS daemon: 
Failed to connect to socket /tmp/dbus-vYNPgtHXG7: Connection refused (virt-manager:388): No D-BUS daemon running
share|improve this answer

I could run virt-manager with the command root@localhost# dbus-launch virt-manager using su

share|improve this answer

I also had a problem with dbus and vnc. So I added

eval `dbus-launch`

to ~/.vnx/xstartup. It starts gnome session for me!

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.