Fixing the vertical panel window list on Ubuntu Hardy

For a long time now I’ve been bugged by GNOME Bug 86382.

Recent versions of GNOME have featured a window list applet which behaves badly when situated on a vertical panel (which is where I like to have mine). Older versions were ok except the buttons would expand and contract to make enough vertical space to hold the window title if written vertically, even though the window titles were written horizontally. Recent versions have much worse behaviour where once you get over about 7 windows open the window list will flicker rapidly between displaying in 1 or two columns making it almost impossible to click on the button you want.

There have been various patches attached to the bug, and today I managed to get the latest installed on my Ubuntu Hardy 8.04 machine by building custom .debs for the relevant components. I’m posting exactly what I did here in case it’s useful to anyone who wants to get this patch installed, and also as a general reference for what you need to do to apply a patch and install it using Ubuntu’s (or Debian’s) package management system as a well-behaved package.

The patches are to libwnck and gnome-panel, and they implement the behaviour I want, which is horizontal text, and buttons of fixed height in a window list which expands as needed to fill the available space. With this patch installed, I find a vertical panel is the best way to manage a large number of open windows.

I don’t recommend running this script – better to read and understand it yourself. Nevertheless (and with no guarantees whatsoever) if you do run it as is on a Hardy machine, it should install patched versions of libwnck and gnome-panel which work better with vertical panels.

# Get all the libraries and source code we need
sudo apt-get install build-essential fakeroot dpkg-dev
sudo apt-get build-dep libwnck gnome-panel

# Create a directory to do all our messing about in
mkdir build-libwnck
cd build-libwnck/

# Get the source code for the 2 components we are building
apt-get source libwnck
apt-get source gnome-panel

# Do libwnck first
cd libwnck-2.22.3

# Create a changelog entry
cat <<END > new-entry.txt
libwnck (2.22.3-0ubuntu2) hardy-proposed; urgency=low

  * applied libwnck vertical window list fix from Alexey Rusakov and Vincent Untz

 -- Anon <>  Wed, 10 Dec 2008 20:50:00 +0000


cat new-entry.txt debian/changelog > debian/changelog-new
rm debian/changelog
mv debian/changelog-new debian/changelog
rm new-entry.txt

# Get the libwnck patch and apply it
wget -O libwnck-fix-vertical.patch ""
patch -p2 < libwnck-fix-vertical.patch

# Build the package
dpkg-buildpackage -rfakeroot -b

# Install the libwnck packages
cd ..
sudo dpkg -i libwnck*.deb

# Now do gnome-panel
cd gnome-panel-2.22.2

# Create a changelog entry
cat <<END > new-entry.txt
gnome-panel (1:2.22.2-0ubuntu1.2) hardy-proposed; urgency=low

 * applied libwnck vertical window list fix from Alexey Rusakov and Vincent Untz

 -- Anon <> Wed, 10 Dec 2008 20:50:00 +0000


cat new-entry.txt debian/changelog > debian/changelog-new
rm debian/changelog
mv debian/changelog-new debian/changelog
rm new-entry.txt

# Get the gnome-panel patch and apply it
wget -O gnome-panel-fix-vertical.patch ""
patch -p2 < gnome-panel-fix-vertical.patch

# Build the package
dpkg-buildpackage -rfakeroot -b

# Install the gnome-panel packages
cd ..
sudo dpkg -i *panel*.deb

Update: fixed incorrect comment – thanks Stefan.

Update: changed -p0 to -p2 in the patch commands.

26 thoughts on “Fixing the vertical panel window list on Ubuntu Hardy”

  1. To use my version of the patch which makes the taskbar buttons taller (but in a very bad way for which I should be punished), replace the first wget command with this one:

    wget -O libwnck-fix-vertical.patch “”

  2. Thanks a bunch Andy. This will allow me to upgrade my laptop to 8.04.

    The bonus of learning how to apply patches to .deb is appreciated as well. :)

  3. BTW, you have an error above

    # Install the gnome-panel packages
    cd ..
    sudo dpkg -i libwnck*.deb

    obviously “gnome-panel” in the comment is wrong

  4. Also, I needed to install automake 1.9 for gnome-panel (default on system was 1.7.9, and latest 1.10.1)
    and then run

  5. Thanks for the info Stephan – I have made the correction. The biggest bonus for me too was learning how build custom debs. It lowers the barrier a lot to hacking on GNOME if I don’t have to build an entire new version from SVN, but can just apply little tweaks to the installed version.

    Of course, that comes with risks. I did break my panel completely at one point and had to do:


    and find the right versions of the packages I was replacing and install them over the top of the ones I had broken.

    Of course, the advantage of using debs is that I knew exactly which packages I needed to download and install to get back to a working system. If I’d been building from tarballs it would have been much harder to work out.

  6. It turned out I had to install automake, because I was getting a “command not found” error when I tried to run aclocal. This is on a Debian Testing system.

    Then I got to the step where I have to run aclocal the first time and I got these two errors: warning: macro `AM_PROG_LIBTOOL’ not found in library warning: macro `AM_GLIB_GNU_GETTEXT’ not found in library

    The first warning was solved by installing libtool. But I’m still getting the second one about gettext and can’t figure out how to solve that problem. There is a “gettext.m4” file in my /usr/share/aclocal. Any suggestions about how to fix this error and move on to the next step?

    (Thanks for the Howto, by the way, I really appreciate it.)

  7. > It lowers the barrier a lot to hacking on GNOME

    Indeed, used to have Gentoo myself and compiled everything from source, so was quite puzzled of how to do things in Ubuntu without breaking the entire desktop (including with future security updates). Only messing with the exact .debs lowers that risk by a lot.

    Now I just need to figure out how to hack the patch so it doesnt rotate the text already at <80px , <30px would fit me a lot better.

  8. I’ve been following that bug for a while now. But didn’t know where to start for applying the patch. Thanks for the help. Although I’m running 8.10 which uses V2.24.1 of the gnome packages. So my first attempt to apply the patch failed and broke things pretty good. Maybe there’s a better way, but I went through the changes in the patch and made the modifications manually. Now I finally have my window list working correctly in Ubuntu. About freakin’ time.

    Now if only some of the other applets played better in vertical panels. At least those are mostly cosmetic. And since your little article here pointed me in the right direction for installing modifications, maybe I’ll play around with editing some of them myself.

  9. – Main Menu button is pretty big.
    – Quick Lounge (Launchers List) seems to always want to be square. But at least it displays the icons horizontally first.
    – Notification icons sometimes are big. But it doesn’t seem like they always are. Also stacks them vertically instead of horizontal.
    – Many of them stretch the image to the full width of the panel. Similar to what the main menu seems to do. Trash and Volume come to mind. Although neither are particularly important. Especially since the sound doesn’t work correctly on my laptop. Also seems that these aren’t always a problem depending on your icon set. If it doesn’t have a big icon in the theme, then it stays small.

  10. @cb474: Sorry, I missed your comment in the spam moderation queue.

    I don’t know how to fix that, sorry. Is gettext itself a separate package that can be installed?

  11. I just upgraded my laptop to Jaunty, and your walkthrough sadly does not work on Jaunty. When I try to run the first dpkg-buildpackage, it compiles and then fails after installing a bunch of html files. The exact error message is:
    — Installing ./html/WnckTasklist.html
    — Installing ./html/WnckWindow.html
    — Installing ./html/WnckWorkspace.html
    /bin/bash: line 20: –relative: command not found
    make[3]: *** [install-data-local] Error 127
    make[3]: Leaving directory `/home/hufman/’
    make[2]: *** [install-am] Error 2
    make[2]: Leaving directory `/home/hufman/’
    make[1]: *** [install-recursive] Error 1
    make[1]: Leaving directory `/home/hufman/′
    make: *** [common-install-impl] Error 2
    dpkg-buildpackage: failure: fakeroot debian/rules binary gave error exit status 2

    Do you have any suggestions? Everything worked fine in Intrepid… I don’t know what’s wrong.

  12. @Walter, I’m sorry I don’t have any idea what’s causing this :( Is it just the docs that are going wrong? If so, there might be a ./configure flag that disables building the documentation?

  13. First, thank you so much for writing this, doing it this way was much easier than a manual build from the gnome git repositories (which I tried first).

    @Walter: I had exactly the same problem. The reason (well, immediate reason at least) is that the GTKDOC_REBASE variable isn’t being set up, and make is trying to run ‘$(GTKDOC_REBASE) –relative …’, which expands into just ‘–relative …’, which bash then complains about since there is no –relative command. I don’t know what the real underlying cause is though. My solution was: make sure the gtkdoc package is installed, check that /usr/bin/gtkdoc-rebase exists, and then run ‘export GTKDOC_REBASE=/usr/bin/gtkdoc-rebase’ before re-running dpkg-buildpackage. The build should now succeed. I didn’t have any other problems with Andy’s instructions, on a fresh Jaunty install.

  14. nb: Just for completeness (not that it really matters), all these ‘–relative’ things are *two* dashes, then ‘relative’ — wordpress is just turning double-dash into an em-dash (which is quite right, just not good for code :P)

  15. cb474:

    I also got the AM_GLIB_GNU_GETTEXT error. I just fixed it by installing the libglib2.0-dev package.

    Now let’s see if the rest of this works…

  16. No go for me. I got this error installing the patched gnome-panel:

    dpkg: dependency problems prevent configuration of gnome-panel:
    gnome-session (2.26.0svn20090408-0ubuntu2) breaks gnome-panel (<< 1:2.23) and is installed.

    Apparently I need to update gnome-session too? I can tell I’m in up to my neck already and don’t want to tinker too much for fear of trashing the whole thing.

  17. Ok, it *does* work. I just needed to ignore the scary errors and have faith. Upon reboot the panel bug is gone on my system. Thank you, Andy!

    The Synaptic Package Manager complains that I’ve got a broken dependency now but I’m pretty sure I’ll just have to live with that.

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.