From owner-FreeBSD-users-jp@jp.freebsd.org  Sun Jun 27 23:10:51 1999
Received: (from daemon@localhost)
	by castle.jp.freebsd.org (8.9.3+3.2W/8.7.3) id XAA43112;
	Sun, 27 Jun 1999 23:10:51 +0900 (JST)
	(envelope-from owner-FreeBSD-users-jp@jp.FreeBSD.org)
Received: from tortoise.jp.freebsd.org (root@tortoise.jp.FreeBSD.ORG [210.157.158.41])
	by castle.jp.freebsd.org (8.9.3+3.2W/8.7.3) with ESMTP id XAA43106
	for <FreeBSD-users-jp@jp.freebsd.org>; Sun, 27 Jun 1999 23:10:51 +0900 (JST)
	(envelope-from mistral@imasy.or.jp)
Received: from light.imasy.or.jp (root@light.imasy.or.jp [3ffe:505:0:1:2a0:c9ff:fe61:6521])
	by tortoise.jp.freebsd.org (8.9.3+3.2W/8.7.3) with ESMTP/IPv6 id XAA23191
	for <FreeBSD-users-jp@jp.freebsd.org>; Sun, 27 Jun 1999 23:10:45 +0900 (JST)
	(envelope-from mistral@imasy.or.jp)
Received: from tasogare.imasy.or.jp (mistral@tasogare.imasy.or.jp [202.227.24.5])
	by light.imasy.or.jp (8.9.3+3.2W/3.7W-light) with ESMTP/IPv4 id XAA07395
	for <FreeBSD-users-jp@jp.freebsd.org>; Sun, 27 Jun 1999 23:10:45 +0900 (JST)
	(envelope-from mistral@imasy.or.jp)
Received: from mistral.wind.prv (isdn53.imasy.or.jp [202.227.24.245])
	by tasogare.imasy.or.jp (8.9.3+3.2W/3.7W-tasogare/smtpfeed 1.01) with ESMTP id XAA08574
	for <FreeBSD-users-jp@jp.freebsd.org>; Sun, 27 Jun 1999 23:10:44 +0900 (JST)
	(envelope-from mistral@imasy.or.jp)
Message-Id: <199906271410.XAA08574@tasogare.imasy.or.jp>
Received: (from yohta@localhost)
	by mistral.wind.prv (8.9.3/3.7Wpl2-990626) id WAA03908;
	Sun, 27 Jun 1999 22:43:32 +0900 (JST)
Date: Sun, 27 Jun 1999 22:43:32 +0900 (JST)
From: mistral@imasy.or.jp (Yoshihiko -OHTA- SARUMARU)
To: FreeBSD-users-jp@jp.freebsd.org
In-Reply-To: Your message of "Sun, 27 Jun 1999 05:26:44 JST".
	<19990627052644R.j5306050@educ.cs.gunma-u.ac.jp>
X-Mailer: mnews [version 1.21] 1997-12/23(Tue)
Reply-To: FreeBSD-users-jp@jp.freebsd.org
Precedence: list
X-Distribute: distribute version 2.1 (Alpha) patchlevel 24e+990625
X-Sequence: FreeBSD-users-jp 43641
Subject: [FreeBSD-users-jp 43641] Re: Mail/News reader and Netscape -remote
Errors-To: owner-FreeBSD-users-jp@jp.freebsd.org
Sender: owner-FreeBSD-users-jp@jp.freebsd.org
X-Originator: mistral@imasy.or.jp

$B!!1n4]$G$9!#(B

1999-06-27($BF|(B) 05:26:44.$B:"!"(Bj5306050@educ.cs.gunma-u.ac.jp$B$5$s$O=q$-$^$7$?!#(B

>   netscape-remote: warning: both version 4.6 (0x34004e9) and version
>           1.1 (0x34003b9) are running.  Using version 1.1.
>   netscape-remote: window 0x34003b9 is locked by pid4084@X68000; waiting...
> $B$H$J$C$F$7$^$$!"$^$@F0$+$;$F$$$^$;$s!#(B

  $B$I$&$d$iIT@5$J%*%W%7%g%s$rEO$9$H4JC1$K%m%C%/$7$?$^$^(B 
Segmentation fault $B$r5/$3$7$F$7$^$&$h$&$G$9!#(B-DEBUG_PROPS $B$r$D$1(B
$B$F%3%s%Q%$%k$7$?$H$3$m!"0J2<$N$h$&$K$J$j$^$7$?!#(B

mistral% netscape-remote ($B$?$H$($P0z?t$J$7$G5/F0$7$F$_$k(B)
netscape-remote: warning: expected version 1.1 but found version
        4.6 (0x3c0043e) instead.
netscape-remote: (writing _MOZILLA_LOCK "pid3896@mistral.wind.prv" to 0x3c0043e)
$B%;%0%a%s%H%(%i!<(B
pid 3896 (netscape-remote), uid 101: exited on signal 11 $B"+(B syslog
($B%m%C%/$7$?$^$^Mn$A$k(B)

mistral% netscape-remote
netscape-remote: warning: expected version 1.1 but found version
        4.6 (0x3c0043e) instead.
netscape-remote: window 0x3c0043e is locked by pid3896@mistral.wind.prv; waiting...
$B",$5$C$-$N%W%m%;%9$K$h$k%m%C%/$,;D$C$F$$$k(B


  $B$H$3$m$G!"(Bsh $B$r;H$&$3$H$b$J$+$m$&$7!"%3%^%s%I$,J#?t$K$J$k$N$,(B
$B$A$g$C$H7y$+$b!"$H;W$C$F(B C $B$G=q$-B-$7$F$_$^$7$?!#(B
# $B$7$+$7E,Ev$J%3!<%I$@(B :-)

  $B$"$H(B global $B$N(B gozilla $B$O(B about: $B$H$+(B mailto: $B$H$+$r<u$1IU$1$F(B
$B$/$l$J$$$N$G!"$A$g$C$H$D$^$i$J$$$+$b!"$H;W$$$^$7$?!#(B


#include <strings.h>
#include <X11/Xlib.h>
#include <X11/Xutil.h>

#define INDICATOR "URL:"

main(){
    Display *d;
    char *text;
    int n_ret;
    char *protocol[] = {"http://", "https://", "ftp://", "news:", "nntp:", 
			"mailto:", "file:/", "about:", NULL};
    int i;

    d = XOpenDisplay(NULL);
    text = XFetchBytes(d,&n_ret);
    XCloseDisplay(d);

    if (strncmp(text, INDICATOR, strlen(INDICATOR)) == 0) {
        text = text + strlen(INDICATOR);
    }

    for (i=0; protocol[i] != NULL; i++) {
        if (strncmp(text, protocol[i], strlen(protocol[i])) == 0) {
	    char arg[256];
   	    sprintf(arg, "openURL(%s)", text);
	    execlp("netscape-remote", "netscape-remote", "-remote", arg, NULL);
        }
    }
}
--
$B1n4](B($B5l@+(B: $BB@ED(B)$BK'I'(B (Yoshihiko SARUMARU)
E-mail: mistral@imasy.or.jp
URL: http://www.imasy.or.jp/~mistral/
$B!VBN$N(B 8 $B3d$OBUBF$G9=@.$5$l$F$$$k!W!!!!9pGrJ*8l!?C+@n;K;R(B
