diff --git a/library/gkr-operation.c b/library/gkr-operation.c
index 37c5cb5..6f8748e 100644
--- a/library/gkr-operation.c
+++ b/library/gkr-operation.c
@@ -247,10 +247,18 @@ on_name_changed_filter (DBusConnection *connection, DBusMessage *message, void *
 static DBusConnection*
 connect_to_service (void)
 {
+	static volatile gsize inited_threads = 0;
 	DBusError derr = DBUS_ERROR_INIT;
 	DBusConnection *conn;
 	const gchar *rule;
 
+	/* Initialize first time around */
+	if (g_once_init_enter (&inited_threads)) {
+		if (g_thread_supported ())
+			dbus_threads_init_default ();
+		g_once_init_leave (&inited_threads, 1);
+	}
+
 	/*
 	 * TODO: We currently really have no way to close this connection or do
 	 * cleanup, and it's unclear how and whether we need to.
