#!/bin/bash if [ $(whoami) != "root" ] then echo "You must run this script as root." exit 1 fi apt-get install fakeroot apt-get build-dep gnome-panel apt-get build-dep libwnck apt-get install devscripts mkdir -pv /tmp/gnome-panel-2.2x.x-fix cd /tmp/gnome-panel-2.2x.x-fix apt-get source gnome-panel apt-get source libwnck wget -v -nc http://launchpadlibrarian.net/15679096/paskma-patch.tar tar xvf paskma-patch.tar GPV=`dpkg -s gnome-panel | grep "Version:*" | grep -oE "[[:digit:]]\.[[:digit:]]+\.[[:digit:]]+"` WNCKV=`dpkg -s libwnck22 | grep "Version:*" | grep -oE "[[:digit:]]\.[[:digit:]]+\.[[:digit:]]+"` echo "current gnome panel version: $GPV" echo "current libwnck version: $WNCKV" sed -i "s/2.22.2/$GPV/" gnome-panel-paskma.patch sed -i "s/2.22.1/$WNCKV/" libwnck-paskma.patch patch -p0 < gnome-panel-paskma.patch patch -p0 < libwnck-paskma.patch cd gnome-panel-$GPV debuild -us -uc cd .. cd libwnck-$WNCKV debuild -us -uc cd .. dpkg -i *.deb rm -rfv /tmp/gnome-panel-2.2x.x-fix echo; echo; while true; do read -p "Do you want the patched packages to be locked so Synaptic won't nag you to update them with new (possibly buggy) ones? If unsure, you should reject this now, as future updates could have a solution for this issue, and you can always lock them yourself by copying the commands used in this script. [y/n] " yn case $yn in [Yy]* ) echo "gnome-panel hold" | dpkg --set-selections; echo "libwnck22 hold" | dpkg --set-selections; break;; [Nn]* ) break;; * ) echo "Please answer yes or no.";; esac done echo; echo "The fix should work the next time the gnome-panel is started."; echo; while true; do read -p "Do you want to log out now so gnome-panel can be restarted? [y/n] " yn case $yn in [Yy]* ) /usr/bin/gnome-session-save --logout; break;; [Nn]* ) break;; * ) echo "Please answer yes or no.";; esac done