Skip to content

Instantly share code, notes, and snippets.

@ashwinvis
Created March 17, 2016 18:42
Show Gist options
  • Save ashwinvis/a5a4340538eceaecd6c1 to your computer and use it in GitHub Desktop.
Save ashwinvis/a5a4340538eceaecd6c1 to your computer and use it in GitHub Desktop.
Guake local installation without root
#!/bin/bash
# Locally install guake without root privileges
# Tested on a Debian 7 Wheezy machine with Guake v0.4.3-3
#
# (c) 2016 Ashwin Vishnu
LOCALUSR=$HOME/.local
mkdir -p $LOCALUSR
# Download and extract guake
cd /tmp
apt-get download guake
dpkg -x guake*.deb guake
cd $PWD/guake
# Modify some files
GLOBALS_PY=$PWD/usr/lib/python2.7/dist-packages/guake/globals.py
sed -i "s%IMAGE_DIR = '/usr%IMAGE_DIR = '${LOCALUSR}%g" $GLOBALS_PY
sed -i "s%GLADE_DIR = '/usr%GLADE_DIR = '${LOCALUSR}%g" $GLOBALS_PY
AUTOSTART=$PWD/etc/xdg/autostart/guake.desktop
sed -i "s%Icon=/usr%Icon=${LOCALUSR}%g" $AUTOSTART
sed -i "s%Exec=guake%Exec=${LOCALUSR}/bin/guake%g" $AUTOSTART
# Copy all Guake files to LOCALUSR
cp -r $PWD/usr/* $LOCALUSR
cp $AUTOSTART $HOME/.config/autostart/
# Install Gconf-schema
gconftool-2 --install-schema-file=$LOCALUSR/share/gconf/schemas/guake.schemas
# Modifications to some environment variables
# (required, but you can comment out & do this manually later)
echo 'export PATH=$PATH:$HOME/.local/bin
export XDG_DATA_DIRS=$XDG_DATA_DIRS:$HOME/.local/share
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$HOME/.local/lib' >> $HOME/.bashrc
# Remove source files
rm -r /tmp/guake*
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment