0

This question already has an answer here:

I am using Ubuntu/gnome (10.04) to remotely connect to two (slightly different) embedded systems running Ubuntu (12.04). I use the following command for connection:

ssh -X -l username 192.168.1.blah

Then, in the terminal I can use a command that run a GUI based program, say gedit:

gedit filename.txt

Now, on the first system, a nice gedit window is opened on my PC desktop, allowing me to edit the remote file. However, on the second system, I get the following error message:

** (gedit:3637): WARNING **: Could not connect to session bus

Why is it so, and how can I make the 2nd connection to work like the 1st one?

UPDATE 1: The 1st machine reports linaro 12.03, not 12.04

UPDATE 2: Here's the output for dbus search (dpkg -l *dbus* | grep ^i) on the 1st machine:

ii  dbus                                   1.4.14-1ubuntu1                                            simple interprocess messaging system (daemon and utilities)
ii  dbus-x11                               1.4.14-1ubuntu1                                            simple interprocess messaging system (X11 deps)
ii  gir1.2-dbusmenu-glib-0.4               0.5.0-0ubuntu4~linaro2                                     typelib file for libdbusmenu-glib4
ii  gir1.2-dbusmenu-gtk-0.4                0.5.0-0ubuntu4~linaro2                                     typelib file for libdbusmenu-gtk4
ii  libdbus-1-3                            1.4.14-1ubuntu1.3                                          simple interprocess messaging system (library)
ii  libdbus-1-dev                          1.4.14-1ubuntu1.3                                          simple interprocess messaging system (development headers)
ii  libdbus-glib-1-2                       0.94-4                                                     simple interprocess messaging system (GLib-based shared library)
ii  libdbus-glib1.0-cil                    0.5.0-3build1                                              CLI implementation of D-Bus (GLib mainloop integration)
ii  libdbus1.0-cil                         0.7.0-4                                                    CLI implementation of D-Bus
ii  libdbusmenu-glib4                      0.5.0-0ubuntu4~linaro2                                     library for passing menus over DBus
ii  libdbusmenu-gtk3-4                     0.5.0-0ubuntu4~linaro2                                     library for passing menus over DBus - GTK+ version
ii  libdbusmenu-gtk4                       0.5.0-0ubuntu4~linaro2                                     library for passing menus over DBus - GTK+ version
ii  libdbusmenu-qt2                        0.9.0-0ubuntu2                                             a Qt library that implements the DBusMenu spec
ii  libdconf-dbus-1-0                      0.10.0-0ubuntu1                                            simple configuration storage system - D-Bus library
ii  libnih-dbus1                           1.0.3-4ubuntu2                                             NIH D-Bus Bindings Library
ii  libqt4-dbus                            4:4.7.4-0ubuntu8.1linaro1                                  Qt 4 D-Bus module
ii  python-dbus                            0.84.0-2                                                   simple interprocess messaging system (Python interface)
ii  qdbus                                  4:4.7.4-0ubuntu8.1linaro1                                  Qt 4 Dbus Tool

And here it is for the 2nd machine:

ii  dbus                                   1.4.18-1ubuntu1                            simple interprocess messaging system (daemon and utilities)
ii  dbus-x11                               1.4.18-1ubuntu1                            simple interprocess messaging system (X11 deps)
ii  gir1.2-dbusmenu-glib-0.4               0.6.1-0ubuntu3                             typelib file for libdbusmenu-glib4
ii  gir1.2-dbusmenu-gtk-0.4                0.6.1-0ubuntu3                             typelib file for libdbusmenu-gtk4
ii  gir1.2-gjsdbus-1.0                     1.32.0-1ubuntu1                            GObject introspection data for GJS
ii  gstreamer-dbus-media-service           0.1.17-upstream-0ubuntu3                   Media service for Ubuntu Mobile
ii  libdbus-1-3                            1.4.18-1ubuntu1                            simple interprocess messaging system (library)
ii  libdbus-glib-1-2                       0.98-1ubuntu1                              simple interprocess messaging system (GLib-based shared library)
ii  libdbusmenu-glib4                      0.6.1-0ubuntu3                             library for passing menus over DBus
ii  libdbusmenu-gtk3-4                     0.6.1-0ubuntu3                             library for passing menus over DBus - GTK+ version
ii  libdbusmenu-gtk4                       0.6.1-0ubuntu3                             library for passing menus over DBus - GTK+ version
ii  libdbusmenu-qt2                        0.9.2-0ubuntu1                             Qt implementation of the DBusMenu protocol
ii  libnih-dbus1                           1.0.3-4ubuntu9                             NIH D-Bus Bindings Library
ii  libqt4-dbus                            4:4.8.1-0ubuntu4                           Qt 4 D-Bus module
ii  python-dbus                            1.0.0-1ubuntu1                             simple interprocess messaging system (Python interface)
ii  python-dbus-dev                        1.0.0-1ubuntu1                             main loop integration development files for python-dbus
ii  qdbus                                  4:4.8.1-0ubuntu4                           Qt 4 D-Bus tool

marked as duplicate by Eric Carvalho, Radu Rădeanu, stephenmyall, Eliah Kagan, Caesium Aug 27 '13 at 14:58

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

  • My best educated guess says you haven't installed dbus on the remote end (2nd machine). Could you include the output of dpkg -l *dbus* | grep ^i in your question of both machines? – gertvdijk Aug 26 '13 at 19:10
-3

you may want to check your openssh settings stored at /etc/ssh/ssh_config. make sure the line with X11Forwarding is set to "yes".

  • The -X flag enables forwarding separate from the ssh_config file. And if they are able to use that flag and get it to work as they said they can, then X11Forwarding is permitted on the SSHd on the remote system. So this doesn't provide the asker with an answer at all. – Thomas Ward Aug 26 '13 at 20:05
  • 1
    The error would be totally different if this was the cause. – gertvdijk Aug 26 '13 at 20:05

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