root/trunk/licq/bin/viewurl-mozilla.sh

Revision 4596, 1.4 kB (checked in by erijo, 2 years ago)

Add viewurl-seamonkey.sh and viewurl-firefox.sh as suggest by Dmitry A. Koptev in #1390.

  • Property svn:eol-style set to native
  • Property svn:executable set to *
Line 
1#!/bin/sh
2#
3# by Nicos Gollan <gtdev@spearhead.de>, 2003-01-31
4#
5# Used to open URLs in Mozilla, using Mozillas 'remote' function
6# (see http://www.mozilla.org/unix/remote.html) to avoid opening
7# new browser windows all over the place. Default is to open the
8# requested site in a new tab. Configuration can be done via
9# environment variables.
10#
11# Recognized environment variables:
12#  - VURL_MOZILLA
13#    Your mozilla binary. Defaults to 'mozilla'
14#  - VURL_HOME
15#    Your homepage. Defaults to 'www.licq.org'. This page is
16#    opened if this script is called without parameters
17#  - VURL_OPENMODE
18#    Method of opening the URL.
19#      "new-tab" - opens URL in a new tab (default)
20#      "new-window" - opens URL in a new window
21#      "current" - opens URL in the current window
22#
23
24if [ -z "${VURL_MOZILLA}" ]; then
25  MOZILLA=mozilla
26else
27  MOZILLA=${VURL_MOZILLA}
28fi
29
30if [ -z "${VURL_HOME}" ]; then
31  URLHOME='http://www.licq.org'
32else
33  URLHOME="${VURL_HOME}" 
34fi
35
36if [ -z "${VURL_OPENMODE}" ]; then
37  OPENMODE=new-tab
38else
39  OPENMODE="${VURL_OPENMODE}"
40fi
41
42if [ "$1" = "" ] ; then
43  URL=$URLHOME
44else
45  URL=$1
46fi
47
48if [ "${OPENMODE}" = "current" ]; then
49  OPENSTRING="${URL}"
50else
51  OPENSTRING="${URL},${OPENMODE}"
52fi
53
54# If mozilla is already running, open the URL as new tab,
55# otherwise launch a fresh copy of mozilla.
56((${MOZILLA} -remote openurl\("${OPENSTRING}"\) ) ||  (${MOZILLA} "${URL}") & ) > /dev/null 2>&1
Note: See TracBrowser for help on using the browser.