text
Chromium in Debian Unstable/Testing
blog comments powered by Disqus
If you’re unsatisfied with how fast your current browser eats up all your memory, you should probably be running Mr. Leaky himself, chromium-browser. Luckily, he’s fast enough to make us forget about all that wasted memory. But what about profiles and storing our cache in ram? Read on!
First off, let’s install this bad boy:
echo "" >> /etc/apt/sources.list
echo "#chromium" >> /etc/apt/sources.list
echo "deb http://ppa.launchpad.net/chromium-daily/ppa/ubuntu lucid main" >> /etc/apt/sources.list
echo "deb-src http://ppa.launchpad.net/chromium-daily/ppa/ubuntu lucid main" >> /etc/apt/sources.list
apt-key adv --recv-keys --keyserver keyserver.ubuntu.com 4E5E17B5
apt-get update && apt-get install chromium-browser
Sweet! The following is my launcher script that enables profiles and moves the cache dir to ram:
#!/bin/bash
PROFILE=$1
if [ ! $PROFILE ]
then
PROFILE="Main"
fi
DATA_DIR="/home/msch/.config/chromium/$PROFILE"
REG_CACHE="$DATA_DIR/Default/Cache"
MEM_CACHE="/tmp/chrome-$PROFILE-cache"
# maybe we're creating a new profile?!
if [ ! -d $DATA_DIR ]
then
mkdir -p $REG_CACHE
fi
# maybe we just rebooted, let's make sure we move our cache dir to ram!
# /tmp gets mounted tmpfs around here...
if [ ! -d $MEM_CACHE ]
then
if [ -h $REG_CACHE ]
then
rm -f $REG_CACHE
mkdir $MEM_CACHE
else
mv $REG_CACHE $MEM_CACHE
fi
ln -s $MEM_CACHE $REG_CACHE
fi
# now can we finally start?
/usr/lib/chromium-browser/chromium-browser --restore-last-session --user-data-dir=$DATA_DIR
Double sweet! Name it something cool (chrome), make it executable (chmod +x chrome), and drop it in your path (mv chrome /usr/local/bin). Now we can create new profiles and launch existing profiles with reckless abandon.
chrome reader
chrome dev
chrome anydangthingiwant
Triple sweet.
Comments