Index: src/cheese-window.c
===================================================================
--- src/cheese-window.c	(revision 462)
+++ src/cheese-window.c	(working copy)
@@ -117,18 +117,16 @@
 
 } CheeseWindow;
 
-static void 
-open_url(const char *url, GdkScreen *screen)
+
+/* Make url in about dialog clickable */
+static void
+cheese_about_dialog_handle_url (GtkAboutDialog *dialog, const char *url, gpointer data)
 {
   GError *error = NULL;
+  GtkWidget *error_dialog;
   gboolean ret;
-  char *cmdline;
-  GtkWidget *error_dialog;
 
-  cmdline = g_strconcat ("xdg-open ", url, NULL);
-  ret = gdk_spawn_command_line_on_screen (screen, cmdline, &error);
-  g_free (cmdline);
-
+  ret = g_app_info_launch_default_for_uri (url, NULL, &error);
   if (ret == FALSE) {
     error_dialog = gtk_message_dialog_new (NULL, GTK_DIALOG_MODAL, 
 		 	  		   GTK_MESSAGE_INFO, GTK_BUTTONS_OK, 
@@ -138,26 +136,25 @@
   }
 }
 
-/* Make url in about dialog clickable */
-static void
-cheese_about_dialog_handle_url (GtkAboutDialog *dialog, const char *url, gpointer data)
-{
-  GdkScreen *gscreen;
-  
-  gscreen = gtk_window_get_screen (GTK_WINDOW (dialog));
-  open_url (url, gscreen);
-}
-
 /* Make email in about dialog clickable */
 static void
 cheese_about_dialog_handle_email (GtkAboutDialog *dialog, const char *email, gpointer data)
 {
   char *url;
-  GdkScreen *gscreen;
+  GError *error = NULL;
+  GtkWidget *error_dialog;
+  gboolean ret;
 
-  gscreen = gtk_window_get_screen (GTK_WINDOW (dialog));
   url = g_strconcat ("mailto:", email, NULL);
-  open_url (url, gscreen);
+
+  ret = g_app_info_launch_default_for_uri (url, NULL, &error);
+  if (ret == FALSE) {
+    error_dialog = gtk_message_dialog_new (NULL, GTK_DIALOG_MODAL, 
+		 	  		   GTK_MESSAGE_INFO, GTK_BUTTONS_OK, 
+				           _("Failed to show url %s"), error->message); 
+		                           gtk_dialog_run (GTK_DIALOG (error_dialog));
+    g_error_free(error);
+  }
   g_free (url);
 }
 
@@ -230,16 +227,26 @@
 {
   char *uri;
   char *filename;
-  GdkScreen *gscreen;
+  gboolean ret;
+  GError *error = NULL;
+  GtkWidget *error_dialog;
 
-  gscreen = gtk_window_get_screen (GTK_WINDOW (cheese_window->window));
 
   filename = cheese_thumb_view_get_selected_image (CHEESE_THUMB_VIEW (cheese_window->thumb_view));
   g_return_if_fail (filename);
 
   uri = g_filename_to_uri (filename, NULL, NULL);
   g_free (filename);
-  open_url (uri, gscreen);
+
+  ret = g_app_info_launch_default_for_uri (uri, NULL, &error);
+  if (ret == FALSE) {
+    error_dialog = gtk_message_dialog_new (NULL, GTK_DIALOG_MODAL, 
+		 	  		   GTK_MESSAGE_INFO, GTK_BUTTONS_OK, 
+				           _("Failed to show url %s"), error->message); 
+		                           gtk_dialog_run (GTK_DIALOG (error_dialog));
+    g_error_free(error);
+  }
+
   g_free (uri);
 }
 
