Summary: | dev-util/meld-1.6.1 fails to start: Failed to connect to socket /tmp/dbus-dzxnczzq6d: Connection refused | ||
---|---|---|---|
Product: | Gentoo Linux | Reporter: | Juergen Rose <rose> |
Component: | [OLD] GNOME | Assignee: | Gentoo Linux Gnome Desktop Team <gnome> |
Status: | RESOLVED INVALID | ||
Severity: | normal | ||
Priority: | Normal | ||
Version: | unspecified | ||
Hardware: | All | ||
OS: | Linux | ||
See Also: | https://bugs.gentoo.org/show_bug.cgi?id=452930 | ||
Whiteboard: | |||
Package list: | Runtime testing required: | --- |
Description
Juergen Rose
2012-10-30 09:58:52 UTC
The error happens, if I try to start meld via an ssh session. If I try run meld directly at caiman, it works. I do not have any problems to start other X11 programms in this ssh session. A little bit later after starting the X11 application I could also start meld through the ssh session: root@caiman:/root(3)# meld (meld:20611): GConf-WARNING **: Client failed to connect to the D-BUS daemon: Failed to connect to socket /tmp/dbus-dzxnczzq6d: Connection refused Traceback (most recent call last): File "/usr/bin/meld", line 138, in <module> main() File "/usr/bin/meld", line 129, in main from meld.meldapp import app File "/usr/lib64/meld/meld/meldapp.py", line 199, in <module> app = MeldApp() File "/usr/lib64/meld/meld/meldapp.py", line 113, in __init__ self.prefs = preferences.MeldPreferences() File "/usr/lib64/meld/meld/preferences.py", line 265, in __init__ super(MeldPreferences, self).__init__("/apps/meld", self.defaults) File "/usr/lib64/meld/meld/util/prefs.py", line 93, in __init__ self._gconf.add_dir(rootkey, gconf.CLIENT_PRELOAD_NONE) glib.GError: No D-BUS daemon running [1]+ Done compare_conf_files root@caiman:/root(4)# emacs root@caiman:/root(5)# meld root@caiman:/root(6)# Have you tried to run: dbus-launch meld ? I hit the error again: root@lynx2:/root(3)# /etc/init.d/dbus status * status: started root@lynx2:/root(4)# emacs root@lynx2:/root(5)# meld /etc/profile.d/net_functions /home_caiman/rose/Txt/Configurations/etc/profile.d/net_functions (meld:9673): GConf-WARNING **: Client failed to connect to the D-BUS daemon: Failed to connect to socket /tmp/dbus-Ra0adDy8OG: Connection refused Traceback (most recent call last): File "/usr/bin/meld", line 154, in <module> main() File "/usr/bin/meld", line 136, in main import meld.meldapp File "/usr/lib64/meld/meld/meldapp.py", line 216, in <module> app = MeldApp() File "/usr/lib64/meld/meld/meldapp.py", line 113, in __init__ self.prefs = preferences.MeldPreferences() File "/usr/lib64/meld/meld/preferences.py", line 259, in __init__ super(MeldPreferences, self).__init__("/apps/meld", self.defaults) File "/usr/lib64/meld/meld/util/prefs.py", line 93, in __init__ self._gconf.add_dir(rootkey, gconf.CLIENT_PRELOAD_NONE) glib.GError: No D-BUS daemon running root@lynx2:/root(6)# dbus-launch meld /etc/profile.d/net_functions /home_caiman/rose/Txt/Configurations/etc/profile.d/net_functions The program 'meld' received an X Window System error. This probably reflects a bug in the program. The error was 'BadAccess (attempt to access private resource denied)'. (Details: serial 4196 error_code 10 request_code 130 minor_code 1) (Note to programmers: normally, X errors are reported asynchronously; that is, you will receive the error a while after causing it. To debug your program, run it with the --sync command line option to change this behavior. You can then get a meaningful backtrace from your debugger if you break on the gdk_x_error() function.) [1]+ Done compare_conf_files root@lynx2:/root(7)# /etc/init.d/dbus status * status: started root@lynx2:/root(8)# emacs root@lynx2:/root(9)# echo $? 0 root@lynx2:/root(10)# meld /etc/profile.d/net_functions /home_caiman/rose/Txt/Configurations/etc/profile.d/net_functions (meld:9786): GConf-WARNING **: Client failed to connect to the D-BUS daemon: Failed to connect to socket /tmp/dbus-Ra0adDy8OG: Connection refused Traceback (most recent call last): File "/usr/bin/meld", line 154, in <module> main() File "/usr/bin/meld", line 136, in main import meld.meldapp File "/usr/lib64/meld/meld/meldapp.py", line 216, in <module> app = MeldApp() File "/usr/lib64/meld/meld/meldapp.py", line 113, in __init__ self.prefs = preferences.MeldPreferences() File "/usr/lib64/meld/meld/preferences.py", line 259, in __init__ super(MeldPreferences, self).__init__("/apps/meld", self.defaults) File "/usr/lib64/meld/meld/util/prefs.py", line 93, in __init__ self._gconf.add_dir(rootkey, gconf.CLIENT_PRELOAD_NONE) glib.GError: No D-BUS daemon running root@lynx2:/root(11)# dbus-launch meld /etc/profile.d/net_functions /home_caiman/rose/Txt/Configurations/etc/profile.d/net_functions Only the second 'dbus-launch meld ...' worked. Instead of comparing with emacs (that doesn't use dbus if I don't misremember), would be better to compare with other app using it (probably gedit) eva@kanae (0) $ sudo -s kanae eva # meld kanae eva # exit eva@kanae (0) $ su - kanae ~ # meld kanae ~ # exit eva@kanae (0) $ su kanae eva # LC_ALL=C meld (meld:17117): GConf-WARNING **: Client failed to connect to the D-BUS daemon: Did not receive a reply. Possible causes include: the remote application did not send a reply, the message bus security policy blocked the reply, the reply timeout expired, or the network connection was broken. Traceback (most recent call last): File "/usr/bin/meld", line 154, in <module> main() File "/usr/bin/meld", line 136, in main import meld.meldapp File "/usr/lib64/meld/meld/meldapp.py", line 216, in <module> app = MeldApp() File "/usr/lib64/meld/meld/meldapp.py", line 113, in __init__ self.prefs = preferences.MeldPreferences() File "/usr/lib64/meld/meld/preferences.py", line 259, in __init__ super(MeldPreferences, self).__init__("/apps/meld", self.defaults) File "/usr/lib64/meld/meld/util/prefs.py", line 93, in __init__ self._gconf.add_dir(rootkey, gconf.CLIENT_PRELOAD_NONE) glib.GError: No D-BUS daemon running My theory is as follows: su does not clean up environment variables so dbus code tries to get access to user owned bus and fails because it cannot access it, most likely because the resolution method for such cases does not find the files where they are expected to be. On the other hand, su - resets environment so meld can correctly detect that there is no dbus running for that user and through dbus-autolaunch support magicaly spaws a dbus-session for this user hence the working meld. This is easily checked with ps, with su -, after starting meld, you should see: root 848 0.0 0.0 15916 468 pts/8 S+ 19:57 0:00 dbus-launch --autolaunch 1bb9acde3f00759deb2ded690001f14c --binary-syntax --close-stderr This is also confirmed by unsetting DBUS_SESSION_BUS_ADDRESS when using su alone. The correct way to use dbus apps with root is to not confuse dbus and make sure the environment corresponds to current user. Thus I am closing this bug invalid. Please try to apply your newly gained knowledge on bug #452930, I'm sure the issue is similar. |