> On Sat, Jun 28, 2008 at 06:08:14PM -0400, Norman Ramsey wrote:
 > > Package: iceweasel
 > > Version: 3.0~rc2-2
 > > Severity: normal
 > > 
 > > 
 > > I have a shell script which calls 
 > >   iceweasel -new-tab url
 > > or
 > >   iceweasel -remote "openURL(url)"
 > > 
 > > and in both cases the running iceweasel successfully opens the URL in
 > > the new tab, but the iceweasel running in the shell window fails with
 > > the following error message:
 > > 
 > >   /home/nr/bin/ns[60]: url: line 15: 17792: Memory fault
 > > 
 > > This one should be easy to reproduce...
 > 
 > What is /home/nr/bin/ns ?

My bookmark list, in executable form.

I've attached an expurgated  version; it won't run, becuase in the
process of deleting confidental paswords and pins, i've also deleted
some ;; delimiters.   If you want more, let me know.

#!/bin/ksh

# have existing netscape open files

NRNETSCAPE=${NRNETSCAPE-netscape}
PWIKI=http://www.eecs.harvard.edu/programming-wiki

function url {
#    case `hostname` in
#       flatcoat*) kfmclient openURL "$1" ;;
# see kfmclient --commands
#       *)
          case $NRNETSCAPE in
   # || true works around iceweasel bug
              *iceweasel) $NRNETSCAPE -new-tab "$1" || true || w3m -T text/html 
"$1" ;;
              *)  $NRNETSCAPE -remote "openURL($1)" || true || w3m -T text/html 
"$1" ;;
          esac 
#    ;;
#    esac
}

function file {
        if [ -r "$1" ]; then
          case $1 in
            /*) $NRNETSCAPE -remote "openFile($1)" ;;
            *)  $NRNETSCAPE -remote "openFile($PWD/$1)" ;;
          esac
        else
          echo "Cannot read file $1" 1>&2 ; exit 1
        fi
}

while [ $# -gt 0 ]
do
    case $1 in
    2.8|wg2.8)  url http://wg28.org ;;
    o252r|wiki) url http://liz.eecs.harvard.edu/cgi-bin/cs252r-wiki.pl ;;
    252r|252) url http://www.eecs.harvard.edu/~nr/cs252r/ ;;
    299|299r)  url  http://www.eecs.harvard.edu/~govereau/299r.html ;;
    amazon) url http://www.amazon.com/ ;;
    auction-stealer|auctionstealer|snipe|sniping)
       url http://auctioninsights.auctionstealer.com/home.cfm ;;
    bank) url https://www.huecuonline.org/onlineserv/HB/Signon.cgi ;;
    benchmark) url http://www.geocaching.com/mark/details.aspx?PID="$2"; ; shift 
;;
    bgextras|globe) url http://www.bgextras.com ;;
    bib|bibtex) url "http://liinwww.ira.uka.de/bibliography/#search"; ;;
        #### obsolete url 
"http://liinwww.ira.uka.de/bibliography/waisbib.html#search";
    bip)
        isbn=${2-0445207795}
        url "`bipurl $isbn`"
        shift ;;
    obip)
        isbn=${2-0445207795}
        url 
"http://lib2.harvard.edu:2862/merge_shared/Search/AdvSearch.asp?Criteria1=ISBN%2FUPC&Action=Search&collection=BIP&QueryMode=Simple&ResultTemplate=mbbookresult_fl.hts&ScoreThreshold=0&ResultCount=25&SrchFrm=Home&navPage=1&CriteriaText1=${isbn}&InPrint=InPrint&OutOfPrint=OutOfPrint&book=book&IMAGE1.x=33&IMAGE1.y=6&cxxhs=09677284";
        shift ;;
    book|textbook) xdvi $HOME/cs/152/textbook/copies/152-s`date +%y`.dvi ;;
    boston-caches) url 
http://forums.groundspeak.com/GC/lofiversion/index.php?t141606.html ;;
    bug) url "http://bugs.debian.org/$2"; ; shift ;;
    bugs) 
       case $# in 1) url http://www.cminusminus.org/qc--bugs/ ;;
                  *) url "http://bugs.debian.org/$2"; ; shift ;;
       esac ;;
    calendar) url 
http://www.registrar.fas.harvard.edu/fasro/common/calendar.jsp ;;
              # url http://www.registrar.fas.harvard.edu/Academic_Calendar.html
    camlman|ocamlman|caml|ocaml)
        xdvi /usr/share/doc/ocaml-doc/ocaml-3.*-refman.dvi.gz ;;
    caches-near) url $(cache-seek-url $2); shift ;;
    canon)    url http://140.247.54.89/ ;;
    canon3)   url http://140.247.54.90/ ;;
    canon-remote) url http://localhost:9999/ ;;
    cash)     url http://www.cash.harvard.edu ;;
    cbs)      url http://wbztv.com/programming ;;
    c--)      url http://www.cminusminus.org/ ;;
    c--list)  url https://cminusminus.org/mailman/listinfo/cminusminus/ ;;
    c--man) xdvi $HOME/c--/manual/man2.dvi ;;
    cooling) url http://www.heatsink-guide.com/ ;;
    cory|cory-livejournal)
             url http://www.livejournal.com/users/chienne_folle/ ;;
    courses|cs) 
         # url 
http://www.registrar.fas.harvard.edu/Courses/ComputerScience.html ;;
         url 
http://webdocs.registrar.fas.harvard.edu/courses/ComputerScience.html ;;
    craigslist) url 
"https://accounts.craigslist.org/login?ui=3510998&ip=tazhabzta6j"; ;;
    credit)  url http://www.annualcreditreport.com/ ;;
    cups)     url http://localhost:631/printers ;;
    cups-options) url 
http://wiki.eecs.harvard.edu/bin/view/Services/CommonCupsOptions ;;
    deas)     url http://www.deas.harvard.edu/ ;;
    dl|digital-library) url http://nrs.harvard.edu/urn-3:hul.eresource:acmdigli 
;;
              #    http://portal.acm.org.ezp1.harvard.edu/dl.cfm
    djvu)     url http://any2djvu.djvuzone.org/ ;;
    drop) url http://www.eecs.harvard.edu/~nr/drop/ ;;
    dslmodem|dsl|dsl-modem) url http://172.16.0.254 ;;
    ebert)
       case $# in
          1)  url http://www.suntimes.com/ebert/ ;;
          *)  google site:suntimes.com ebert review "$@"; set xxx; shift ;;
       esac ;;
    eepybest|eepy-best)
       url http://www.eepybird.com/exp214.html ;;
       # url http://video.google.com/videoplay?docid=-274981837129821058 ;;
    expedia)
       echo "Username is nrxx"
       url  https://www.expediacorporate.com/daily/brochure/default.htm ;;
    facebook) url http://harvard.facebook.com/profile.php?id=27592 ;;
    faculty) url https://www.eecs.harvard.edu/faculty/ ;;
    fells) acroread $HOME/archive/maps/fellsbik*pdf & ;;
    freedb)
       case $# in
          1)  url http://www.freedb.org/ ;;
          *)  shift
              echo "$#,$2" ; case $#,$2 in 
                2,[0-9a-f]??????[0-9a-f]) 
                     url "http://www.freedb.org/freedb/$1/$2"; 
                     exit 0 ;;
              esac
              words="`echo $* | tr ' ' +`"
              url 
"http://www.freedb.org/freedb_search.php?words=$words&allfields=NO&fields=artist&fields=title&allcats=YES&grouping=none&x=0&y=0";
 
              exit 0 ;;
       esac ;;
    games|pong) url http://cognitivelabs.com/vectorball.htm ;;
    geo|geocaching) url http://www.geocaching.com/my/ ;; 
    geocode|geocoder) url http://geocoder.us/ ;;
    geomap) url 
"http://www.geocaching.com/seek/gmnearest.aspx?lat=42.436806&lng=-71.075944"; ;;
    ghc-test|ghc-testsuite)
         url http://hackage.haskell.org/trac/ghc/wiki/Building/RunningTests ;;
    ghc)
         url http://hackage.haskell.org/trac/ghc/wiki ;;
    gpx) url http://www.gpsvisualizer.com 
           # url http://www.tom-carden.co.uk/googlegpx/ 
           ;;
    greg|greg-calendar) url http://tinyurl.com/36v5vl ;;
       # 
http://ical.mac.com/WebObjects/iCal.woa/wa/default?u=greg_morrisett&n=Greg.ics
    harkness) url http://i-cuisines.com/SodexhoCafe/Harkness/ ;;
    harvie) url  http://harvie.harvard.edu/ ;;
    hits|harvard-hits)
       url http://harvie.harvard.edu/working/resource/hitsarchives/index.shtml 
;;
    hollis) url http://hollisweb.harvard.edu/ ;;
    hoogle) url http://haskell.org/hoogle/ ;;

    icfp05) # url http://www.softconf.com/start/ICFP2005/login/
          url http://www.softconf.com/start/ICFP2005/PC/get-assigned.cgi
          ;;
    icfp) url https://eecs.harvard.edu/mailman/admin/icfp07-pc
          ;;
    cfp|icfp-cfp) url http://icfp07.eecs.harvard.edu/cfp.html
          ;;
    conflict) url http://icfp07.eecs.harvard.edu/conflict.html
          ;;
    ig) url http://www.google.com/ig ;;
    submit|submission|icfp-submit) url 
http://cyberchairpro.borbala.net/icfppapers/submit/ ;;
    chair|icfp-chair)
         url http://cyberchairpro.borbala.net/icfppapers/chair/ ;;
    
    icfp-wiki) 
        url http://wiki.acm.org/sigplan_icfp/index.php?title=ICFP 
        ;;
    jfp) url http://www.cambridge.org/journals/JFP/ ;;
    latex|tetex)    url "file:/usr/share/doc/texmf/index.html" ;;
    latexstyle)    url 
"http://liz.eecs.harvard.edu/cgi-bin/sigplan-wiki.pl?LatexClass"; ;;

    lexmark) url "http://192.168.1.44"; ;;
    luaman|lua25|lua25man) xdvi $HOME/noweb/3/src/lua-2.5+nw/doc/manual ;;
    lua40|lua40man)  url file:/usr/share/doc/lua40-doc/manual/index.html ;;
    lua50|lua50man)  url file:/usr/share/doc/lua50-doc/manual/contents.html ;;
    lua51|lua51man)  url file:/usr/share/doc/lua5.1-doc/doc/contents.html ;;
    minuteman|medford)
         # url http://library.minlib.net/search/ ;; # 
http://web2.mln.lib.ma.us/ ;;
              url http://library.minlib.net/patroninfo/
    livejournal|lj)
             url http://friendlydog.livejournal.com ;;
    malden|malden-library)
              url http://www.maldenpubliclibrary.org/ 
    malden-library-catalog|malden-catalog|mbln)
              url http://catalog.mbln.org/ 
    manycore) url https://cminusminus.org/mailman/listinfo/manycore/ ;;
    map|maps) 
        shift
        case $# in
          0) url http://maps.google.com ; exit 0 ;;
          *) pat=$(echo "$*" | sed 's/ /%20/g')
             url http://maps.google.com/maps?q="$pat";; exit 0 ;;
        esac ;;
    mbta-maps) url http://retrovirus.com/experiments/gmbta/ ;;
    myhealth|my-health) url https://mychart.harvardvanguard.org/ ;;
         # info: # url https://www.harvardvanguard.org/myhealth/ ;;
    library|melrose|melrose-library|noble|noblenet)
              # url http://www.noblenet.org
              url http://innopac.noblenet.org/patroninfo 
    noc) url https://www.noc.fas.harvard.edu/netconnect/system/create/ ;;
    nr|home) url http://www.eecs.harvard.edu/~nr ;;
    package) url "http://packages.debian.org/$2"; ; shift ;;
    pats) url "http://www.patriots.com/homepage/"; ;;
    pirate) url 
"http://loadingreadyrun.com/videos/view/49/How+to+Talk+like+a+Pirate";;;
    prepay) url "https://hrapps.cadm.harvard.edu:9446/psftprd/signon.html"; ;;
    pay|paystub|paycheck)
       echo "if not authorized, try" ; echo "  $0 prepay"
       url 
"https://hrapps.cadm.harvard.edu:9446/servlets/iclientservlet/psftprd/?ICType=Panel&Menu=ROLE_EMPLOYEE&Market=GBL&PanelGroupName=PY_IC_PAY_INQ&RL=&target=main0";
 || {
  echo "Follow Self Service -> Employee -> View -> View Paycheck"
  url http://harvie.harvard.edu 
} ;;
    programming|lunch) url ${PWIKI}?TalkSchedule ;;
    qt|qt4) file /usr/share/doc/qt4-doc/html/index.html ;;
    sched|schedule) gv --spartan $HOME/src/ps/schedule.ps ;;
    seclunch) url http://www.eecs.harvard.edu/cgi-bin/seclunchwiki.pl ;;
    simon)  url http://research.microsoft.com/Users/simonpj/ ;;
    spa)    djview $HOME/www/images/spa-menu.djvu ;;
    speed)  url http://www.toast.net/performance/ ;;
    tasks) url http://it.deas.harvard.edu/apps/tasks/ ;;
    hetchen) url ${PWIKI}?HetchensSchedule ;;
    tldi) url "https://www.softconf.com/starts/tldi07/login/"; 
          ;;
    toplas) url https://eslide.doc.wustl.edu/webapp/Toplas/login.aspx ;;
    tt|terrace*) url http://tinyurl.com/32tcxx ;;
    triforce) url http://www.eecs.harvard.edu/triforce ;;
    two) xdvi $HOME/papers/writing/two ;;
    unison)   url http://www.cis.upenn.edu/~bcpierce/unison/ ;;
    vanguard) url https://personal.vanguard.com/VGApp/hnw/home ;;
    weather)  url 
http://www.wunderground.com/cgi-bin/findweather/getForecast?query=${2-02148} ; 
if [[ $# -gt 1 ]]; then shift; fi ;;
    weather-uk)  url 
http://www.wunderground.com/cgi-bin/findweather/getForecast?query=${2-Cambridge,UK}
 ; if [[ $# -gt 1 ]]; then shift; fi ;;

    wellness) url http://huhs.harvard.edu/ ;;
             #### 
http://www.huhs.harvard.edu/CWHC/CWHCWellnessProgramsListingofprograms.htm ;;
    ms-wireless) url http://192.168.2.1 ;;  # wireless base station
    wireless) url http://192.168.1.1 ;;  # wireless base station

    margo)    url http://www.eecs.harvard.edu/~margo/schedule.html ;;
    152)      url http://www.eecs.harvard.edu/~nr/cs152/index.html#more ;;
    152-admin) url http://my.harvard.edu/k13554 ;;
    homework) url http://www.eecs.harvard.edu/~nr/cs152/homework.html ;;
    solutions) url http://www.eecs.harvard.edu/~nr/cs152/solutions/ ;;
    xerox)    url http://xerox.eecs.harvard.edu/ ;;
    writing)  url "${PWIKI}?WritingGroup";;
    z3950|z39.50) url http://targettest.indexdata.com/ ;;

    http*|ftp:*) url "$1" ;;
    www.*|*.com|*.gov|*.edu|*.org|*.net) url "http://$1"; ;;
    /*) file "$1" ;;
    *)  file "$1" ;;
    esac
    shift
done
             

Reply via email to