DSL Tips and Tricks :: A defacto "Netscape"



Unfortunately there are still programs out there that want to open netscape to access help urls etc. If their settings can't be easily pointed at firefox (probably usually can), they can instead be satisfied by doing the following.

As root:

1. cd /usr/local/bin; cp firefox netscape

2. Open /usr/local/bin/netscape with an editor.

3. Change line 81 from progname=$0 to progname="/usr/local/bin/firefox" and save.

There's now a defacto "netscape" on the system which opens as firefox.

Old programs looking for netscape (try old scite.dsl menu help->SCiTE help) will (hopefully) now be
happy and open firefox instead.

Obvious solutions failed: Doing alias netscape=firefox works for launching "netscape" from the
current shell but scite.dsl launched from that shell didn't see the alias (perhaps there's a way
around that (?)). A symlink to the firefox launch script won't work properly because of the way that the firefox launch scripts probe their paths and environment.  A wrapper for run-mozilla.sh with firefox-bin as an argument will launch firefox but we miss out on half of the probing.

Quote
Doing alias netscape=firefox works for launching "netscape" from the
current shell but scite.dsl launched from that shell didn't see the alias (perhaps there's a way
around that (?)).
The easiest way for that is to put it in one of the startup scripts that set those vars.. i.e. profile so that the parent login shell would have it set.

Guess for the others would need their scripts to be changed/updated.

Why don't you try a wrapper for the wrapper? :P
That's what I usually do.

I thought there should be a way round it -  I'll try setting the alias in a parent shell - I have a vague suspicion it might not work though.

Re wrapper on wrapper -  when we get to layered wrapper-of-wrappers the counterfeit netscape perhaps seems easier ... it's only changing one line.

I remember now I tried this before - I set the alias in ~/.bashrc and it doesn't work for scite.dsl - the alias is there ok in user dsl's shells, but launching scite from a shell -> scite help ->error command netscape not found.

I think scite.dsl doesn't care what alias is set in the shell - I think its idea of where netscape is is set otherwise.

hm, perhaps only shell scripts will see the aliases.

Anyways, here's something I would try for the wrapper... something along the lines of
Code Sample
#! /bin/sh
firefox "$@"

Of course make sure you chmod +x it

Next Page...
original here.