Show
Ignore:
Timestamp:
01/10/08 09:00:22 (11 months ago)
Author:
kris
Message:

Updated Firefox to use a defaultemail client when clicking mailto: links,
and also to ask if the user wants to make FF the default browser

Location:
pbibuild/modules/firefox
Files:
1 added
3 modified

Legend:

Unmodified
Added
Removed
  • pbibuild/modules/firefox/build.sh

    r934 r1133  
    4141tar cvf - -C /usr/local/lib/xpi/ . | tar xvf - -C ${PBIDIR}/autolibs/firefox/extensions/ 
    4242 
     43# Now append our prefs file with the default email script 
     44echo "pref("network.protocol-handler.app.mailto", "/Programs/Firefox${PORTVER}/bin/defaultemail");" >> ${PBIDIR}/autolibs/firefox/greprefs/all.js 
    4345 
  • pbibuild/modules/firefox/overlay-dir/PBI.SetupScript.sh

    r993 r1133  
    1717ln -s /Programs/${PROGDIR}/.sbin/firefox /usr/local/bin/firefox 
    1818ln -s /Programs/${PROGDIR}/autolibs/firefox /usr/local/lib/firefox 
     19 
     20 
     21if [ ! -z "$DISPLAY" ] 
     22then 
     23 
     24USER="$USERNAME" 
     25if [ "$USER" != "root" ] 
     26then 
     27  HOMEDIR="/home/${USER}" 
     28else 
     29  HOMEDIR="/root" 
     30fi 
     31 
     32  # Ask if we should make this the default browser application for our user 
     33  kdialog --yesno "Do you want to make Firefox the default browser?" --title "Default browser?" 
     34  if [ "$?" = "0" ] 
     35  then 
     36      # Strip out the old BrowserApplication line to make way for the new 
     37      cat ${HOMEDIR}/.kde/share/config/kdeglobals | grep -v '^BrowserApplication' > ${HOMEDIR}/.kdeglobals.new 
     38 
     39      touch ${HOMEDIR}/.kdeglobals.new2 
     40      while read line 
     41      do 
     42 
     43         if [ "$line" = "[General]" ] 
     44         then 
     45           echo "$line" >> ${HOMEDIR}/.kdeglobals.new2 
     46           echo "BrowserApplication=/usr/local/bin/firefox" >> ${HOMEDIR}/.kdeglobals.new2 
     47         else 
     48           echo "$line" >> ${HOMEDIR}/.kdeglobals.new2 
     49         fi 
     50      done < ${HOMEDIR}/.kdeglobals.new 
     51 
     52      # all finished, now move it back over kdeglobals 
     53      rm ${HOMEDIR}/.kdeglobals.new 
     54      chown ${USERNAME}:${USERNAME} ${HOMEDIR}/.kdeglobals.new2 
     55      mv ${HOMEDIR}/.kdeglobals.new2 ${HOMEDIR}/.kde/share/config/kdeglobals 
     56  fi 
     57 
     58fi 
     59 
    1960echo "LAUNCHCLOSE: /usr/local/bin/firefox" 
  • pbibuild/modules/firefox/pbi.conf

    r948 r1133  
    3333# Build Key - Change this to anything else to trigger a rebuild  
    3434#           - The rebuild will take place even if port is still the same ver 
    35 BUILDKEY="20" 
     35BUILDKEY="10" 
    3636 
    3737export PBIPORT MAKEOPTS PROGNAME PROGWEB PROGAUTHOR OTHERPORT PROGICON PROGLIBS PBIUPDATE BUILDKEY