[...] g_dbus_connection_signal_subscribe (connection, "org.freedesktop.UDisks", NULL, "DeviceAdded", NULL, NULL, G_DBUS_SIGNAL_FLAGS_NONE, dbus_notification_callback, NULL, NULL); [...] GDBusConnection *connection = NULL; connection = g_bus_get_sync (G_BUS_TYPE_SYSTEM, NULL, &error); if (connection == NULL) { printf ("Can't connect to system bus: %s\n", error->message); g_error_free (error); } [...]