Using XBuffy and GBuffy

No, XBuffy has nothing to do with the Vampire Slayer--it's simply a version of xbiff that is good for handling multiple mailboxes. For those with an interest in Buffy the Slayer, you can check out my Buffy quote generator.

Although it may be obvious from the name, XBuffy only runs when X is running. It's one of those little programs that I didn't think I needed, but once I discovered it, wondered how I managed without it.

1). Do you have xbuffy

You can check this by typing
which xbuffy

The chances are that you don't have xbuffy, though xbiff (her boyfriend?) seems to be included with an installation of fluxbox. If you do have it, then go to step 3, otherwise, go to step 2.

2.) Getting and Installing XBuffy

In FreeBSD, it's quite easy. As root or with root privileges
cd /usr/ports/mail/xbuffy
make install

In Gentoo Linux, it isn't yet in portage at time of writing. However, you can get it here.. The link given is correct at time of writing, if you have no luck, then just do a search on google for XBuffy. To install in Gentoo, you will, at least for the make install portion, need to be root or have root privileges. The version given is correct as of September 2002 but may, of course, change.

tar -zxvf xbuffy*
cd xbuffy-3.3.b1.3
make install
To update this a bit (my goodness, it's been 7 years since I first wrote this, and I still haven't found anything that does a better job), xbuffy seems to have been more or less abandoned. The author went on to do gbuffy, which added some eye candy (but seems to have removed the ability to select color schemes), but seems to have abandoned that as well.

Apparently, it's so old that it wouldn't compile in Fedora 12. (I'm not a programmer though, so this might be easy for a programmer to fix.)

Recently, I've found that on Fedora and CentOS, the two systems I use most these days, neither xbuffy nor gbuffy are in the repos. On a recent install of Fedora 12, I found that the easiest way to do it was simply install it in Ubuntu (which does still have it), then use alien to make an rpm.

With the changes in Linux and the prevalence of bloated GUI email clients, I suppose the need for it, at least in the desktop type, Windows wannabe distributions, has greatly lessened. However, for those of us who still use mutt, it's still an extremely useful little application.

3.) Configuring XBuffy

This is a very rudimentary configuration. All we want it to do is notifiy us if we have mail and to tell us how many emails are in each mailbox. We will assume you have three mailboxes: IN-FreeBSD, IN-Personal and IN-Gentoo. First we will create a ~/.xbuffy file. Open up your favorite text editor and type
box ~/Mail/IN-Personal
title Personal
box ~/Mail/IN-FreeBSD
title FreeBSD
box ~/Mail/IN-Gentoo
title Gentoo

(I am using the typical "Mail" for the mail directory--if you're using the Maildir format, it might be .maildir or Maildir instead. )

On occasion, I've had this not work properly. If, upon opening XBuffy, you get a small square with a 0 in it, rather than something listing your mailboxes, then change the ~ to the full path to the mailbox. For instance, if your user name is john, then instead of


Change it to read


The other possible fix (and once I needed to do both) is to specify the boxfile on the command line. So, on the installation where it wasn't working properly, I had this in my .xinitrc

xbuffy -boxfile .xbuffy &
Usually, however, we can simply configure .Xdefaults so that it knows that .xbuffy is the file it should look to for its configuration. The man page suggests .Xresources, but I've found that this doesn't always work. So, open up .Xdefaults (or create the file if you don't have it) and add
XBuffy.boxfile: .xbuffy

Again, if you still only get a little box with a 0 in it, then shrug and use the -boxfile option when calling Xbuffy, either from command line or in your .xinitrc

If that doesn't work, then you might need the shortnames option. Call xbuffy (again, either from .xinitrc or command line) with

xbuffy -shortnames

4.) Testing XBuffy

I use mutt for my email client and usually run getmail as a cronjob, polling my server every 5 minutes or so. Your situation may be different, but at any rate, let's test Xbuffy. So, assuming that email addressed to you personally goes in your IN-Personal mailbox, open up your email client and send an email to yourself. Then, get your mail with getmail or whatever it is that you use. Let's assume that the email you send yourself has arrived. Now, open XBuffy

It should within a minute or so, give a beep and show that there is 1 message in your Personal mailbox. If you click on the title box marked personal, it should also show you who it's from (yourself in this case.)

One thing that I found to sometimes happen in FreeBSD, though not in Linux is that when mail arrived separate boxes would pop up listing the headers. If one gets a lot of mail, this can be a nuisance. If it does happen, it can be turned off. I call xbuffy from my .xinitrc so it starts when X starts. I added the option -header 0 (which refers to the length of time the header would show to it so it looks like

xbuffy -header 0 &

Congratulations, you're done. You now have XBuffy up and running properly. How you use it depends upon your situation. You can put it in your .xinitrc to start when you start X, or simply call it from a command line when you want it.

I put it in my .xinitrc with some of the options that I've covered. One can change its colors as well--for example, to have it with a black background and blue foreground you could call it with

xbuffy -fg blue -bg black

The man page lists various options that you can use with it. For example if I add the line to my .xbuffy file

command rxvt -e mutt -f ~/Mail/IN-Personal &

under the

box ~/Mail/IN-Personal title personal

I can then click the middle mouse button on the listing for that mailbox. It will then open mutt to that mailbox.

There are a variety of other settings that can be configured. See the man page for details. There's also a good explanation of some of the options at Brandon Long's page.

I haven't checked this very deeply--Mr. Long's version is what's in FreeBSD ports and the tarball that I link to above is from his page. I didn't get sound working doing it the way the man page seems to indicate (which could easily be my error--it seemed as if one should use an option of -acmd blah blah). I get sound working by adding the following line to any mailbox in my .xbuffy file.

audio cat ~/Trumpet1.wav > /dev/dsp


GBuffy was the successor to XBuffy. Also apparently abandoned, some might prefer its interface and configuration. Configuration can be done through a GUI. Open it with the command gbuffy and it will show a box for spool. At this point, right click on that, and you're able to configure additional mailboxes of various formats. It will create a $HOME/.gbuffyrc file, which can also be edited manually. I find this easier. It seems that one must keep the spool mailbox. To add a mailbox, click Insert. The words New Box will appear in the title. Change the title to what you desire, then type the complete path to it, e.g. /home/john/Mail/IN-personal. Using the arrows you can move it up or down. In the left hand window, it will still say New Box and be highlighted. Click on the highlighted "New Box" and it will change to the name you gave it. Now click save, then click close, and it will appear in your mailbox list.

If one now looks at the $HOME/.gbuffyrc, you can see the format for creating a new mailbox, and manually add them if desired.

Like XBuffy, apparently the program is too old to compile on most modern systems. FreeBSD still has it in ports. In RedHat based systems, (CentOS and Fedora) one can grab the binary at Brandon Long's site. It's a gzipped file. Gunzip it with gunzip gbuffy-0.2.6.gz and move it to /usr/bin (or /usr/local/bin if you prefer). As root or with root privilege
mv gbuffy-0.2.6 /usr/local/bin/gbuffy
chmod 755 /usr/local/bin/gbuffy

The next step is to get the necessary libraries in place. In CentOS 5 and Scientific Linux 6, on 64 bit systems, I found that I had to install gtk+-devel.i686. One can see what is needed with
ldd /usr/local/bin/gbuffy|grep found

You will get a list, especially if on a 64 bit system, of several missing library shared objects. Install gtk+-devel.i686 and try the ldd command again. (On a 32 bit system, depending upon what you've already installed, you might not get the libgtk missing errors.)

One problem that I've found is that the recent RH based distributions will not have a repo file pointing to i686 packages. So, when I tried to install, for example, gtk+-devel.i686 on ScientificLinux, I got a message that there was no such package. The workaround was to create an i686 repo. To do that, I took the first entry in my sl.repo. The repo file begins with

I changed that to

I also changed the name in brackets from [sl] to [sli386]. I then changed the enabled=1 enabled=0 and removed all the other urls listed. I don't want it enabled by default. I then added gtk+-devel.i686 with
yum --enablerepo=sli386 install gtk+-devel.i686

After that, you'll get missing some libssl and libcrypto shared objects. Install openssl-devel.i686. You should be able to get that without using the sli386 repo. At this point, you'll find that it still says it needs and Go into /usr/lib and make symlinks--as of ScientificLinux 6 (the equivalent of RHEL 6), I had to link /usr/lib/ to and to

If you run ldd again, you'll see that you still need This can be gotten from atrpms site. Go to the distribution. For example, with Scientific Linux 6 I went to RHEL 6. Get the LibPropList0 i386 package. It should install with rpm -ivh LibPropList-<version>.rpm. Now the ldd should show that all required libraries are available. At this point, the command can be run with gbuffy and configured as described above. The CentOS 6 package is the latest that I've found, but as worked on Fedora 19.

As atrpms can sometimes be problematic, one can also sometimes get it at I've also put them up here.

With CentOS 6.x, when I tried doing something similar, I got error messages about conflicts with gtk-devel.x86_64. In the end, I gave up and just copied the libgtk and libgdk shared object libraries from a working 5.x installation.

As mentioned in the rant above, most people these days, prefer the GUI emailers, which perhaps explains the neglect of these two programs. For those of us who still prefer mutt, and do find it handy to have a GUI email notifier, XBuffy and GBuffy are still extremely handy programs.