diff -ur mtink-1.0.16.orig/mainSrc/mtink.c mtink-1.0.16/mainSrc/mtink.c --- mtink-1.0.16.orig/mainSrc/mtink.c 2007-08-28 13:45:01.000000000 +0400 +++ mtink-1.0.16/mainSrc/mtink.c 2014-11-21 00:20:14.000000000 +0400 @@ -2855,86 +2855,12 @@ static void callBrowser(char *file) { char command[4096]; - int isNetscape = False; - int isMozilla = False; - int isGaleon = False; char *s; #ifdef MACOS /* use default application */ snprintf(command,sizeof(command),"/usr/bin/open %s",file); #else - if ( browser && *browser ) - { - s = strrchr(browser, '/'); - if ( s ) - { - s++; - if ( strcmp(s, "netscape") == 0 || - strcmp(s, "Netscape") == 0 ) - { - isNetscape = True; - } - else if ( strcmp(s, "mozilla") == 0 || - strcmp(s, "Mozilla") == 0 ) - { - isMozilla = True; - } - else if ( strcmp(s, "galeon") == 0 ) - { - isGaleon = True; - } - } - else - { - if ( strcmp(browser, "netscape") == 0 || - strcmp(browser, "Netscape") == 0 ) - { - isNetscape = True; - } - if ( strcmp(browser, "mozilla") == 0 || - strcmp(browser, "Mozilla") == 0 ) - { - isMozilla = True; - } - else if ( strcmp(browser, "galeon") == 0 ) - { - isGaleon = True; - } - } - } - else - { - browser = strdup("netscape"); - isNetscape = True; - } - - /* remark about starting of netscape / mozilla */ - /* Solaris don't like "if ! netscape ...;then netscape ...;fi */ - /* we use instead an if netscape ... then :;else netscape...;fi */ - /* : is a no op instruction for the shell */ - if ( isNetscape ) - { - /* call netscape */ - sprintf(command, - "if %s -remote \"openURL(file://%s)\";then :;else %s file://%s;fi &", - browser, file, browser, file); - } - else if ( isGaleon ) - { - snprintf(command,sizeof(command),"%s -x %s &",browser, file); - } - else if ( isMozilla ) - { - /* previous version of mozilla require file:///path/file */ - snprintf(command,sizeof(command), - "if %s -remote \"openURL(file://%s)\";then :;else %s file://%s; fi &", - browser, file, browser, file); - } - else - { - /* most browser don't need an extra option */ - sprintf(command,"%s %s &",browser, file); - } + snprintf(command,sizeof(command),"www-browser %s",file); #endif /* if we have root or lp rights, we have to get the uid instead */ /* of the euid. start the browser as "daemon" */ @@ -2949,8 +2875,6 @@ exit(0); /* exit first subprocess */ } - /* wait for the first sub process and avoid a zomby */ - wait(&isGaleon); } /*******************************************************************/