Setting a default browser

David Corbin kde.org at machturtle.com
Thu Jan 27 01:20:51 GMT 2005


I won't claim perfection, but here is what I use.  It works well enough for 
me.

--cut--
#!/bin/sh
export NPX_PLUGIN_PATH=/usr/local/jdk/jre/plugin/i386/ns610
EXE=/usr/bin/firefox
if [ $(ps ax | grep firefox-bin | grep -v grep | wc -l) -gt 0 ]
then
        URL=$1
        if [ "$URL" = "-remote" ]
        then
                $EXE $@
                exit 0
        fi
        if [ "$URL" = "" ]
        then
                CMD="xfeDoCommand(openBrowser)"
        else
                if [ -f "$URL" -o -d "$URL" ]
                then
                        if [ -n "${URL%%/*}" ]
                        then
                                URL="file:${PWD}/$URL"
                        fi
                fi

                CMD="openURL($URL,new-window)"
        fi

        $EXE -remote $CMD &
else
        $EXE $@ & >>/dev/null 2>&1
fi
---end---
On Wednesday 26 January 2005 11:18 pm, JR wrote:
> > Here you go:
> >
> > http://www.mosehansen.dk/firefox
> >
> > I'm afraid it is somewhat involved.
>
> Thanks - and wow! That is involved. Like all the other scripts, it doesnt
> work on mdk10.1 / KDE.
>
> Thanks anyway && regards,
>
> Jarlath
> ___________________________________________________
> This message is from the kde mailing list.
> Account management:  https://mail.kde.org/mailman/listinfo/kde.
> Archives: http://lists.kde.org/.
> More info: http://www.kde.org/faq.html.
___________________________________________________
This message is from the kde mailing list.
Account management:  https://mail.kde.org/mailman/listinfo/kde.
Archives: http://lists.kde.org/.
More info: http://www.kde.org/faq.html.




More information about the kde mailing list