使用tmpfs优化firefox

http://forums.gentoo.org/viewtopic-t-717117-highlight-firefox+tmpfs.html

根据上面这篇文章的想法,对firefox作下面的优化

在firefox地址栏执行abount:config,然后

set browser.cache.disk.capacity to 20000 or thereabouts
set browser.safebrowsing.enabled to false
set browser.safebrowsing.malware.enabled to false

再vim /etc/init.d/firefoxfs


# !/sbin/runscript
FIREFOX = " /home/yashen/.mozilla/firefox "
PROFILE
= " ${FIREFOX}/w8jod2v0.default "
PACKFILE
= " ${FIREFOX}/profile.tar.gz "
TMPFILE
= " /tmp/profile.tar.gz "

start() {
if  test  !   -f   " $PACKFILE "
then
    einfo 
" pack ${PROFILE} to ${PACKFILE} "
        tar 
- zcpf  " $PACKFILE "   " $PROFILE "
fi

if  test  - " $(mount | grep -F  " ${PROFILE} "  ) "
then
    einfo 
" mount ${PROFILE} "
    mount 
- t tmpfs  - o size = 128M,user,exec,uid = 1000 ,gid = 100  firefox  " ${PROFILE} "
fi

if  test  -f   " $PACKFILE "
then
    einfo 
" extract ${PACKFILE} to ${PROFILE} "
        cp 
" $PACKFILE "   " $TMPFILE "
    tar 
- zxpf  " $TMPFILE "
fi
}

stop() {
einfo 
" pack ${PROFILE} to ${PACKFILE} "
tar 
- zcpf " $TMPFILE " "$PROFILE"
mv 
" $TMPFILE "   " $PACKFILE "
}

 

chmod +x /etc/init.d/firefoxfs

rc-update add firefoxfs default

 


 


 

你可能感兴趣的:(firefox)