Patches
Sometimes I am not satisfied with the original behaviour of a
program. If the behaviour is not configurable I often end up
writing a patch for it. I generally try to get the patch
included upstream, but that is not always possible or desirable.
I will place patches that nevertheless can be useful for other
people here.
These patches can be regarded as having the same license as the
original program.
Linux on IBM Thinkpad R31
I once owned an IBM Thinkpad R31, a fairly good computer with
a quite buggy BIOS, especially when it comes to APM. In
particular, when reading /proc/apm while moving the TrackPoint
or using the keyboard one byte got lost from the TrackPoint or
keyboard. Removing a byte from a multi-byte mouse protocol
with bad redundance is not a pretty sight. Usually the mouse
pointer will jump around the screen and press all the wrong
buttons until finally the driver manages to get into sync
again. With programs frequently polling /proc/apm to get
battery status, this gets very annoying.
Making sure no program ever reads /proc/apm is a possible
solution, but eventually something you hadn't anticipated will
read it and mess up your mouse pointer. Moving from APM to
ACPI is another solution, but that brings its own set of
problems. Instead I wrote a very simple patch that makes
reading /proc/apm harmless by avoiding the APM calls. The
first time /proc/apm is read, and every time user 1005 (just
change the number to whatever user you want) reads it, the
real APM call is performed. The result is saved and returned
for later readings. All battery monitor applets will still
work, but they will only be updated if you read /proc/apm as
user 1005 (or whatever you change it to).
Note that this is a problem occurring on IBM Thinkpad R31 only
(as far as I know), so there is no need to use this patch on
any other computer.
Bittornado
BitTornado is a nice
BitTorrent client,
but a couple of bugs are very annoying. The first problem is
that if you temporarily postpone further downloading of a
file, that file will be deleted when BitTornado exits. The
first patch simply removes the code performing the deletion.
Another problem is that BitTornado backtraces if some files
are missing when it is starting, so e.g. torrents partially
downloaded with postponed file downloads without the first
patch or with files missing for some other reason are
impossible to resume. The second patch makes BitTornado simple
create new files if they are missing.
Metacity
In my search for a decent window manager I once tried Metacity
which together with Brightside
is almost usable. But just almost, windows are forbidden to be
moved so that any point is above the top of the screen, which
is very annoying. This small patch just removes that
limitation.
DownloadMagicpoint
MagicPoint is the
program I use when holding presentations. Unfortunately, a bug
in the font caching code creates a delay of around ten seconds
each time you switch page, at least for some font
configurations, which makes it unusable as a presentation
tool. This small patch corrects the bug and makes page
switching fast.
Download |
|
Jörgen Cederlöf <jc@lysator.liu.se> |