> I really like your script, I really prefer Mozilla to open up a new tab
> instead of a window. But one problem I run into, when testing the
> script, if no Mozilla windows are present the script fails, it only runs
> fine if one Moz window already exists. Here is the error I get:

That error message is normal. The script tries to open a new tab in
mozilla first (which fails if none already running) and if this did
*not* succeed, opens a new mozilla.


> [EMAIL PROTECTED] bin]$ ./mozilla-remote.sh
>  
> Gnome-CRITICAL **: file gnome-moz-remote.c: line 645
> (mozilla_remote_commands):
> assertion `window != 0' failed.

An additional issue: The called apps don't really like being called
without an argument. For testing I recommend always providing an URL:

$ mozilla-remote.sh http://gnome.org


> What can I do to fix this?

The error message is written to stderr and therefore can be ignored. You
will not see the error as long as you are not running the script by hand
in a terminal.

However, Mozilla knows the ping() command (unlike the original Netscape
remote specification) to test if Mozilla is running. If no Mozilla is
running, the ping() command complains on stderr -- and the situation
really is the same, except we are *trying* to be nice. ;)

You can dump this error message to /dev/null if you really don't like
it:


[ mozilla-remote.sh script, using Gnome tools, dumping the error ]

#!/bin/sh
gnome-moz-remote --remote='openURL('$1', new-tab)' 2>> /dev/null || gnome-moz-r\emote 
$1


[ full armored mozilla-remote.sh script, using mozilla, playing nice ]

#!/bin/sh
mozilla -remote 'ping()' 2>> /dev/null && mozilla -remote 'openURL('$1', new-\tab)' || 
mozilla $1 &


...guenther


-- 
char *t="[EMAIL PROTECTED]";
main(){ char h,m=h=*t++,*x=t+2*h,c,i,l=*x,s=0; for (i=0;i<l;i++){ i%8? c<<=1:
(c=*++x); c&128 && (s+=h); if (!(h>>=1)||!t[s+h]){ putchar(t[s]);h=m;s=0; }}}

_______________________________________________
evolution maillist  -  [EMAIL PROTECTED]
http://lists.ximian.com/mailman/listinfo/evolution

Reply via email to