summary refs log tree commit diff stats
path: root/src/fe-gtk/fe-gtk.c
diff options
context:
space:
mode:
authorTingPing <tingping@tingping.se>2012-12-25 04:46:54 -0500
committerTingPing <tingping@tingping.se>2012-12-25 04:46:54 -0500
commit446d90d8358ee15d69f769973e87d6d97af6e14a (patch)
tree2a0b2571702bf0f4506f1bf6af40365001cc5aad /src/fe-gtk/fe-gtk.c
parent6354721391d128a2b9923696b1f71d7f32a51dec (diff)
update url opening on linux
Diffstat (limited to 'src/fe-gtk/fe-gtk.c')
-rw-r--r--src/fe-gtk/fe-gtk.c15
1 files changed, 10 insertions, 5 deletions
diff --git a/src/fe-gtk/fe-gtk.c b/src/fe-gtk/fe-gtk.c
index c6a953b7..d0cfd657 100644
--- a/src/fe-gtk/fe-gtk.c
+++ b/src/fe-gtk/fe-gtk.c
@@ -1021,21 +1021,26 @@ fe_open_url_inner (const char *url)
 #elif defined __APPLE__
 	try_browser ("open", NULL, url);				/* on Mac you can just 'open http://foo.bar/' */
 #else
+
+	/* lets try what gtk has built in first. */
+	if (gtk_show_uri (NULL, url, GDK_CURRENT_TIME, NULL))
+		return;
+		
 	/* universal desktop URL opener (from xdg-utils). Supports gnome,kde,xfce4. */
 	if (try_browser ("xdg-open", NULL, url))
 		return;
 
-	/* try to detect GNOME */
+	/* try to detect GNOME (this env variable is depreciated) */
 	if (g_getenv ("GNOME_DESKTOP_SESSION_ID"))
 	{
-		if (try_browser ("gnome-open", NULL, url)) /* Gnome 2.4+ has this */
+		if (try_browser ("gvfs-open", NULL, url))
 			return;
 	}
 
 	/* try to detect KDE */
 	if (g_getenv ("KDE_FULL_SESSION"))
 	{
-		if (try_browser ("kfmclient", "exec", url))
+		if (try_browser ("kde-open", NULL, url))
 			return;
 	}
 
@@ -1043,8 +1048,8 @@ fe_open_url_inner (const char *url)
 	if (try_browser ("firefox", NULL, url))
 		return;
 
-	/* fresh out of ideas... */
-	try_browser ("mozilla", NULL, url);
+	/* fresh out of ideas... i hear chromium is popular */
+	try_browser ("chromium", NULL, url);
 #endif
 }