ch0wned – A Linux distro in your home directory

Written by max on 2009-03-04

I’m coining a new term here : ch0wned (or ch0wn3d depending on how l33t you are).   

ch0wned. adj. This is the state when you are a linux user and don't have root access. 

This is the case for a lot of people working Corporate jobs as engineers, including me.   I realized chr00ted is a more appropriate term, but then I couldn’t work 0wned into it.

So this post is the first in a serious of HOWTOs about maintaining a Linux distro out of your home directory.  This allows you to download, compile, and use the latest software while being restricted to god-awful old version of Linux.   When I say old, I’m talking about my company just “upgraded” me from Red Hat Enterprise 3 (RHEL 3), circa 2003 to Red Hat Enterprise 4 (RHEL 4) circa 2006.   If I want to use a browser or e-mail client that has the latest security patches, forget it!


About 90% of the open source apps out there use autoconf to setup compilation using gmake.   The first thing we need to do is tell it that we are going to install this directory into our home directory.

./configure --prefix=/home/me

However, if you happen to have a lot of dependency libraries installed in your home directory we will need to setup a few environment variables too. So instead I setup a shell script that sets-up the environment and calls configure. I call this script “config_gapp”

# install apps using local versions of glib
# into home directory
# This version setup for x86_64 full 64-bit
# Remove "64" anywhere below for a 32-bit build.
# I try not to maintain my own gcc, but sometimes you gotta :
# export CC="$LOCAL_HOME/bin/gcc"
# export GCC=$CC
export CPPFLAGS="-I$LOCAL_HOME/include -I/usr/X11R6/include $CPPFLAGS"
export CFLAGS="-I$LOCAL_HOME/include -I/usr/X11R6/include $CFLAGS"
export CXXFLAGS="-I$LOCAL_HOME/include -I/usr/X11R6/include  $CXXFLAGS"
export LDFLAGS="-L$LOCAL_HOME/lib -L/usr/lib64 -L/usr/X11R6/lib64 $LDFLAGS"
export PKG_CONFIG=$LOCAL_HOME/bin/pkg-config
export PKG_CONFIG_PATH="$LOCAL_HOME/lib/pkgconfig:/usr/lib64/pkgconfig:$PKG_CONFIG_PATH"
export LD_LIBRARY_PATH="$LOCAL_HOME/lib:/usr/X11R6/lib64:/usr/lib64"
#export ACLOCAL_FLAGS="-I /home/maxb/share/aclocal"
./configure --prefix=$LOCAL_HOME \
  --x-includes=/usr/X11R6/include \
  --x-libraries=/usr/X11R6/lib "$@"

The astute reader will notice that I have already compiled and installed my own copy of pkg-config because the one on EL4 is too old for most things to use. I’ll cover that in the next post where I go over getting a somewhat modern version of the GTK+ and Glib libraries installed. These are required for most anything modern like firefox, thunderbird, acrobat, and flash.