Re: [Evolution] Bringing up Mozilla from links embedded in email (1.2.3)
- From: Paul Hands <phands cadence com>
- To: evolution lists ximian com
- Subject: Re: [Evolution] Bringing up Mozilla from links embedded in email (1.2.3)
- Date: 21 Mar 2003 15:01:32 +0000
Peter,
It does seem to be an oft-raised discussion. It seems that every time a release of mozilla / evolution / gnome comes along this gets broken, at least on my SuSE system. I got fed up with it and wrote my own script to do it. It's by no means a good example of shell scripting, but it seems to work...........
First, in gnomecc, I set the default URL handler to be.........
/export/home/phands/bin/moz_launcher "%s"
Obviously, you would put the moz_launcher script wherever you feel is best.
The script moz_launcher is as follows...........
#!/bin/bash
#
#Try to launch a new window on an existing browser process.
#If it fails, return code will be non-zero, and we will need to start a new one.
/opt/mozilla/mozilla -remote "openurl($arg, new-window)"
#
#Now check the return code.
#If non zero, spawn a new mozilla process.
if [ $? -ne 0 ]; then
echo "No existing Mozilla - start a new one on site $arg"
/opt/mozilla/mozilla $arg > /dev/null 2>&1 &
fi
It's not pretty, but it works. It doesn't check that an argument got passed by evolution, but that hasn't been a problem so far. It relies on attempting to launch a new window on an existing mozilla process, passing it the the argument from the link in the email. If that fails, the return code (captured in the shell variable $?) will be non zero, and we can start a new process, passing it the the argument from the link in the email.
I put the absolute path to Mozilla in the script. I expect that if it's in your path, just a call to mozilla will suffice. All returned info, both stdout and stderr goes to the bit-bucket.
HTH,
Paul
On Fri, 2003-03-21 at 13:29, Peter N. Spotts wrote:
I may have missed the discussion on this, but I'm having trouble
triggering Mozilla from hotlinks embedded in emails on evolution 1.2.3.
I have set Moz as my default browser using gnome-control-center (Red Hat
8.0). Moz then activates when I click on links in Red Carpet's news
section. It also works with links embedded in email pulled in by an
unnamed alternate email program. I suspect I'm missing a silly setting
somewhere...
Canst help?
Best regards,
Pete
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]