Index: gvfsbackendobexftp.c
===================================================================
--- gvfsbackendobexftp.c	(revision 2188)
+++ gvfsbackendobexftp.c	(working copy)
@@ -36,6 +36,8 @@
 #include <gio/gio.h>
 #include <libhal.h>
 #include <dbus/dbus-glib.h>
+#include <dbus/dbus-glib-bindings.h>
+#include <dbus/dbus-glib-lowlevel.h>
 #include <bluetooth/bluetooth.h>
 
 #include "gvfsbackendobexftp.h"
@@ -207,6 +209,7 @@
 _get_bluetooth_device_properties (const char *bdaddr, char **icon_name)
 {
   DBusGConnection *connection;
+  DBusConnection *conn;
   DBusGProxy *manager;
   GPtrArray *adapters;
   gchar *name;
@@ -214,14 +217,17 @@
 
   name = NULL;
 
-  connection = dbus_g_bus_get (DBUS_BUS_SYSTEM, NULL);
-  if (connection == NULL)
+  conn = dbus_bus_get_private (DBUS_BUS_SYSTEM, NULL);
+  if (conn == NULL)
         return name;
+  dbus_connection_setup_with_g_main (conn, NULL);
+  connection = dbus_connection_get_g_connection (conn);
 
   manager = dbus_g_proxy_new_for_name (connection, "org.bluez",
                                        "/", "org.bluez.Manager");
   if (manager == NULL)
     {
+      dbus_connection_close (conn);
       dbus_g_connection_unref (connection);
       return name;
     }
@@ -229,6 +235,7 @@
   if (dbus_g_proxy_call (manager, "ListAdapters", NULL, G_TYPE_INVALID, dbus_g_type_get_collection ("GPtrArray", DBUS_TYPE_G_OBJECT_PATH), &adapters, G_TYPE_INVALID) == FALSE)
     {
       g_object_unref (manager);
+      dbus_connection_close (conn);
       dbus_g_connection_unref (connection);
       return name;
     }
@@ -254,6 +261,7 @@
 
   g_ptr_array_free (adapters, TRUE);
   g_object_unref (manager);
+  dbus_connection_close (conn);
   dbus_g_connection_unref (connection);
 
   return name;
