+ g_type_init();
+
+ /* We depend on GDK as well as XLib for device event processing */
+ gdk_init(&argc, &argv);
+
+ /*Parse command options*/
+ opt = g_option_context_new(NULL);
+ g_option_context_add_main_entries(opt, optentries, NULL);
+
+ if (!g_option_context_parse(opt, &argc, &argv, &err))
+ g_error("Option parsing failed: %s\n", err->message);
+
+ if (dbus_name == NULL)
+ dbus_name = SPI_DBUS_NAME_REGISTRY;
+
+ dbus_error_init (&error);
+ bus = dbus_bus_get(DBUS_BUS_SESSION, &error);
+ if (!bus)