r472 - trunk

DONOTREPLY at icculus.org DONOTREPLY at icculus.org
Fri Jan 25 06:01:42 EST 2008


Author: icculus
Date: 2008-01-25 06:01:41 -0500 (Fri, 25 Jan 2008)
New Revision: 472

Modified:
   trunk/platform_unix.c
Log:
Some Unix browser launching code fixes.


Modified: trunk/platform_unix.c
===================================================================
--- trunk/platform_unix.c	2008-01-25 10:51:39 UTC (rev 471)
+++ trunk/platform_unix.c	2008-01-25 11:01:41 UTC (rev 472)
@@ -1008,7 +1008,7 @@
                               (strcmp(GGui->name(), "stdio") == 0) ||
                               (strcmp(GGui->name(), "ncurses") == 0) );
 
-    return ((ttyonly) ? "links:lynx" : "firefox:mozilla:netscape");
+    return ((ttyonly) ? "links:lynx" : "firefox -raise:mozilla:netscape");
 } // defaultBrowsers
 
 
@@ -1069,7 +1069,7 @@
 {
     boolean retval = false;
     char *escapedurl = shellEscape(url);
-    char *cmd = format("xdg-utils %0", escapedurl);
+    char *cmd = format("xdg-open %0 >/dev/null 2>&1", escapedurl);
     int rc = system(cmd);
     free(cmd);
 
@@ -1078,11 +1078,11 @@
         // no xdg-open in the $PATH, or it failed. Try to do it ourselves...
         const UnixDesktopType desktop = getDesktopType();
         if (desktop == DESKTOP_KDE)
-            cmd = format("kfmclient exec %0", escapedurl);
+            cmd = format("kfmclient exec %0 >/dev/null 2>&1", escapedurl);
         else if (desktop == DESKTOP_GNOME)
-            cmd = format("gnome-open %0", escapedurl);
+            cmd = format("gnome-open %0 >/dev/null 2>&1", escapedurl);
         else if (desktop == DESKTOP_XFCE4)
-            cmd = format("exo-open %0", escapedurl);
+            cmd = format("exo-open %0 >/dev/null 2>&1", escapedurl);
         else // (desktop == DESKTOP_UNKNOWN) or we missed something here.
         {
             cmd = NULL;




More information about the mojosetup-commits mailing list