[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: netscape status?



In article <871zfgqjpq.fsf@x2-295.mtl.Generation.NET>,
Greg Stark  <gsstark@mit.edu> wrote:
>
>uwd38znr@umail.furryterror.org (Amy Fong) writes:
>
>> Greg Stark  <gsstark@mit.edu> wrote:
>> >
>> >So a while back there was a discussion of why netscape core dumps so
>> >frequently, and the suggestion was that there was some kind of egcs
>> >optimization bug in the X libraries. Has this been dealt with? Because I still
>> >see netscape crashing every few minutes and it's becoming increasingly
>> >maddening. 
>> >
>> >greg
>> 
>> I hate to bring Redhat into this but their netscape package actually
>> uses a wrap-around script to work around some of the libc6 2.1 bugs. I have
>> been using a modified version of it to work with my potato system and it's 
>> been behaving pretty well so far.
>> 
>...
>> locale_load=/lib/libBrokenLocale.so.1
>
>Debian's wrapper script does a lot more than just this. It also sets
>MALLOC_CHECK_ to ignore netsacpe's habit of double-freeing pointers for
>example. It also supports having default configurations in /etc/netscape4 and
>it starts a new window if there's an existing netscape running.
>
>But neither the libBrokenLocale nor the MALLOC_CHECK_ setting seems to be
>enough. Netscape crashes for me 9 times out of 10 the instant I hit a page
>with java, it also crashes or freezes randomly at other times. And it
>occasionally just starts chewing up all of memory until my machine crashes
>unless I kill it fast enough.
>
>So now I'm at a loss, if the xlib patches didn't solve the problem the only
>solution I can see is downloading the supported libc5 package. Geez, I
>remember doing actual java development using the libc5 netscape on an 8M
>machine, these days I can barely run netscape in 16M on the same machine,
>libc6 is just bigger I guess. Having both libc5 and libc6 binaries running on
>the same machine isn't going to be better though.
>
>If we can't work out the libc6 netscape problems it would be nice if we could
>get libc5 netscape packages. But I guess I shouldn't whine too much, my own
>packages are languishing until the next break in my work.
>
>greg

Actually I'm using netscape4 4.0-15 with netscape 4.6 and the 4.5
version with the strong encryption and point me out if I'm wrong, but the
wrapper script doesn't seem to fit your description.

Amy

--

#! /bin/bash -e
###############################################################################
#
# Netscape Wrapper -- written by H. Peter Anvin <hpa@transmeta.com>
#
# (97.06.28-98.11.12)  Modified for Debian by Brian White <bcwhite@pobox.com>
#
###############################################################################


#
# Defaults
#
netscape=/usr/lib/netscape/netscape
nsremote=/usr/bin/X11/netscape
prefskel=/usr/lib/netscape/.netscape
prefetc=/etc/skel/.netscape
prefdir=$HOME/.netscape
pref=$prefdir/preferences.js
oldpref=$prefdir/preferences
pwd=`pwd`


#
# Try calling existing netscape with URL, if fail then start new one.
#
showurl () {
    case "$1" in
        *:*)    url="$1" ;;
        /*)     url="file:$1" ;;
	*)	if [ -e "$1" ]
		   then url=`echo "file:$pwd/$1" | sed -e 's:///*:/:g'`
		   else url=$1
		fi ;;
    esac
            
    if echo $DISPLAY | egrep -q "^:"; then
	$nsremote -noraise -remote "openURL($url, new_window)" 2>/dev/null \
	    || exec $netscape "$url"
    else
	    exec $netscape "$url"
    fi
}


#
# Don't allow running netscape as root
#
if [ $UID -eq 0 -o $EUID -eq 0 ]; then
    echo "$0: Cannot be run an root (for security reasons)"
    exit 1
fi


#
# Set some env vars to make things work better
#
#LD_LIBRARY_PATH=/usr/lib/netscape:$LD_LIBRARY_PATH
MOZILLA_HOME=/usr/lib/netscape
NPX_PLUGIN_PATH=$HOME/.netscape/plugins:/usr/local/lib/netscape/plugins:/usr/lib/netscape/plugins
display=$DISPLAY
export MOZILLA_HOME NPX_PLUGIN_PATH display 


#
# Fix "locale" problems when printing to postscript
#
# If the locale uses a decimal separator other than a point printf 
# will return something other than 1.0
#

pnt=`printf "%1.1f" 1 2>/dev/null`

if [ "$pnt" != "1.0" ]; then
    # Perhaps we have a "dangerous" value for LANG or LC_NUMERIC. Let's
    # try a "safe" value for LC_NUMERIC.
    LC_NUMERIC=C
    export LC_NUMERIC
    pnt=`printf "%1.1f" 1 2> /dev/null`

    if [ "$pnt" != "1.0" ]; then
	# No, it is LC_ALL which is bad. Set LC_*=$LC_ALL for every category 
	# (as expected) except LC_NUMERIC, and then unset LC_ALL.
	LC_COLLATE=$LC_ALL
	LC_CTYPE=$LC_ALL
	LC_MESSAGES=$LC_ALL
	LC_MONETARY=$LC_ALL
	LC_TIME=$LC_ALL
	unset LC_ALL
	export LC_ALL LC_COLLATE LC_CTYPE LC_MESSAGES LC_MONETARY LC_CTIME
	pnt=`printf "%1.1f" 1 2> /dev/null`

	if [ "$pnt" != "1.0"]; then
	    # running out of ideas...
	    unset LANG
	    export LANG
	    pnt=`printf "%1.1f" 1 2> /dev/null`

	    if [ "$pnt" != "1.0"]; then
		echo "Warning: lang/locale settings will cause printing problems"
	    fi
	fi
    fi
fi


#
# Make user copy of default files unless they already exist
#
if [ -r $oldpref -a ! -r $pref ]; then
    useold=true
else
    useold=false
fi
if [ -d $prefskel ]; then
    if [ ! -d $prefdir ]; then
	mkdir -p $prefdir
    fi
    cd $prefskel
    for i in *; do
	if [ ! -e $prefdir/$i ]; then
	    cp $i $prefdir/$i;
	fi
    done
fi
if [ -d $prefetc ]; then
    if [ ! -d $prefdir ]; then
	mkdir -p $prefdir
    fi
    cd $prefetc
    for i in *; do
	if [ ! -e $prefdir/$i ]; then
	    cp $i $prefdir/$i;
	fi
    done
fi
if $useold; then
    rm -f $pref
    echo "Removing $pref so it can be generated from $oldpref"
fi
cd $pwd


#
# Decide what to do...
#
if [ $# -gt 1 ]; then
    exec $netscape "$@"
elif [ $# -eq 1 ]; then
    if [ `echo $1 | cut -c1` != '-' ]; then
	showurl "$1"
    else
	exec $netscape "$@"
    fi
elif [ -f $pref ]; then
    homepage=`egrep '^user_pref.*"browser.startup.homepage"' $pref | sed -e 's/^.*".*".*"\(.*\)".*$/\1/'`
    strtpage=`egrep '^user_pref.*"browser.startup.page"' $pref | sed -e 's/^.*".*", *\([0-9]*\).*$/\1/'`
    if [ -n "$strtpage" ]; then
	if [ "$strtpage" -ne 1 ]; then
	    homepage=""
	fi
    fi
    if [ -n "$homepage" ]; then
	showurl "$homepage"
    else
	exec $netscape
    fi
else
    exec $netscape
fi
-- 
"We Suzaku Seishi aren't smart enough to give up!!!"  Tasuki (Fushigi Yuugi)

I don't speak for anyone but myself.
              Amy Fong (afong@furryterror.org)


Reply to: