Project Stick In The Mud
If I knew for a certainty that a man was coming to my
house with the conscious design to do me good, I should run for
my life...
— Henry David Thoreau |
I feel the same way about “helpful” software,
thus was born Project Stick In The Mud. A collection of links, tips,
tricks, and even software designed to make linux computers less
“helpful” and more useful. Note: Most of
this customization was done on Fedora systems, so there are many
Fedora references scattered about.
My favorite window manager is
FVWM. On fedora, you can get it via
yum install fvwm .
For the longest time, the window manager standards on the freedesktop.org
site contained text which explicitly forbid window managers from
paying any attention to the context (root window, client window,
titlebar, etc) when responding to keystrokes. I can't seem to find
that text anymore (perhaps they finally realized how utterly stupid
it was). In any case, FVWM always
proudly refused to kow-tow to foolish standards, and thus became the
only useful window manager I could find, allowing me to do things
like have the cursor keys switch workspaces in root context, yet
still be able to use the cursor keys inside text editors. Come to
think of it, the things that annoy me the most about linux can almost
always be traced back to freedesktop.org .
Perhaps someday someone will produce a new linux distro that uses
freedesktop.org
as a guide for what not to do (maybe Potksedeerf linux?) It
might turn out to be the single most useful linux distro ever
produced :-).
I use FVWM in a plain X session
started from my own ~/.xsession file, no GNOME or KDE
need apply. As a result, I get the entire screen to use for my own
windows, no massive eye candy clutter of panels and icons and
distracting pop-ups annoying the heck out of me.
Naturally, the most
“helpful” Fedora release ever made (Fedora 9) had
to save a staggering 8K on the release DVD by leaving out the
xorg-x11-xinit-session rpm. So in order to use the
standard ~/.xsession technique (which had worked since
the beginning of the X-age) you have to manually yum install xorg-x11-xinit-session
(sheesh!).
There are plenty of both
GNOME and KDE apps I still want to use even though I am not using the
full environments. With KDE apps, this is not much of a problem, you
just run the program, and it works. With GNOME, the situation is more
complex. It takes some serious de-gnoming efforts to run GNOME apps
without a GNOME desktop. For example, fonts will typically look
absolutely terrible without a gnome-settings-daemon
running in your X session to provide font settings for GTK apps.
Unfortunately, if you start gnome-settings-daemon , it
insists on dragging in lots of extraneous crap, starting screen
savers, loading X resources which will do things like give your emacs
window a giant fuzzy neon I-beam cursor and change the default colors
and behaviors of old Motif apps, etc. No one asked GNOME to do this,
it is just being “helpful”.
So, my ~/.xsession file gets a little complicated to
to do all my de-gnoming:
#!/bin/bash
exec >> $HOME/.xsession-errors 2>&1
echo ''
echo Starting X session `date`
#
# Recent versions of GNOME or GDM or something
# somewhere start this unwanted gnome-keyring-daemon
# process. I have no idea where it gets started, so it
# seems simpler to just kill it off than try and track
# it down.
#
killall -9 gnome-keyring-daemon
#
# Unlike gnome-keyring-daemon, ssh-agent has a man page
# and a documented useful function. Get it running
# during the rest of the session if it isn't already
# running.
#
SSH_ASKPASS=/usr/libexec/openssh/gnome-ssh-askpass
export SSH_ASKPASS
kill_agent="no"
if [ -z "$SSH_AUTH_SOCK" ]
then
echo .xsession starting ssh-agent
eval `ssh-agent -s`
kill_agent="yes"
else
echo ssh-agent already started
fi
#
# Neither GNOME nor KDE apps seem to be able to survive
# without a dbus session daemon running, might as well
# give in and start one if there isn't one running
# already.
#
if [ -z "$DBUS_SESSION_BUS_ADDRESS" ]
then
echo .xsession starting dbus
eval `dbus-launch --sh-syntax --exit-with-session`
else
echo dbus already started
fi
#
# Tricky bit - the /usr/libexec/gnome-settings-daemon
# program is good to run to revive the font settings,
# but it also revives all sorts of useless crap I don't
# want, so start it, wait a bit and then remove all the
# crap it adds to the xrdb database.
#
# Breaking news! Every damn time I connect from work
# via VNC, the next time I login to the console X
# session, I get a $#@! popup about "The X system
# keyboard settings differ from your current GNOME
# keyboard settings." After near infinite amounts of
# poking sticks in random holes, I finally discovered
# that the $@#! gconf keys under
# /desktop/gnome/peripherals/keyboard/kbd.sysbackup
# need to be reset to make this go away, so just always
# reset that key before starting gnome-settings-daemon.
#
/usr/bin/gconftool-2 --recursive-unset \
/desktop/gnome/peripherals/keyboard/kbd.sysbackup
/usr/libexec/gnome-settings-daemon &
sleep 5
#
# Hopefully, the gnome-settings-daemon has had enough
# time with the 5 second delay to have finished
# polluting my X resources with all the crap it
# adds. Remove all the resources it just added, and
# then stick just the ones I actually want back into
# the database.
#
xrdb -all -remove
xrdb -load $HOME/.Xdefaults
#
# Not shown, but this is where my custom startup goes,
# now that I have the environment setup correctly.
#
#
# Once I exit the X session, kill off the ssh-agent if
# I was the one who started it (above).
#
if [ "$kill_agent" = "yes" ]
then
ssh-agent -k
fi
|
Apart from being careful in the ~./xsession file,
other tools can help in the de-gnoming process. The
gconf-editor program (not usually installed by default
on fedora, but obtainable via yum install
gconf-editor ) can be used to edit that monstrous gconf
database clone of the Windows registry which many programs seem to
use for config information (why anyone would deliberately set out to
copy the single most irritating and error prone feature of Windows is
not a fit subject to discuss on a family oriented web page :-). In
here you can search for various keys that can do things like disable
drawing of the root window background image so you actually get a
chance to draw your own background instead of getting the one
gnome-settings-daemon decides to draw. Or maybe disable
the screen saver, etc.
Unfortunately, many of the things you really want to change are
stored as "schema" value attributes, and if you try to edit one of
those, gconf-editor tells you that it can't do that.
So if you want to totally disable annoying apps like the
screensaver or power manager, you have to edit xml files and load
them in the gconf database manually.
The directory /etc/gconf/schemas/ contains the
original xml files used to build the hidden and mysterious gconf
database, so you can copy files from that directory (such as
apps_gnome_settings_daemon_screensaver.schemas ) and
change the start_screensaver bool attribute value from
true or false then feed that modified file
to the gconftool-2 program with the
--install-schema-file= filename option, and as
simple as that, gnome won't start the stupid screensaver anymore.
Yes, you can config the screensaver to not do any screensaving,
but if you look, you'll find it still running out there eating up
resources in order to not do anything :-).
So, de-gnoming can occur at many levels of complexity, but once
you get sufficiently irritated by a “helpful”
feature, almost no amount of work seems like too much to go through
:-).
By the way, speaking of de-gnoming, and
just so freedesktop.org
won't think I'm picking on them exclusively, this is probably a good
place to point to a bugzilla which documents a two year war against
the single most ill concieved standard dialog ever invented in the
history of computing. I speak, of course, of the GTK file
chooser. The level of mulish incompetence on the part of the
GTK designers on display in this one bugzilla demonstrates the
single biggest problem with open source software: Morons can gain
control of critical components and won't let go or admit error. Then
the question becomes, “Is it worth the effort to branch the
project and try to get everyone to use the new branch?” The
answer is usually “No. They aren't quite moronic enough to
bother.”, so everyone is stuck with moronic decisions.
Back to de-gnoming: Not
running GNOME or KDE, also means I'm not running nautilus, so
nothing is out there automounting CDs and USB drives at strange
mountpoints and nothing is autorunning any autorun scripts on them.
These are all good things, not bad things, but sometimes you really
do want to mount something where you can get to it. The traditional
manly way to do this is to tail /var/log/messages, see what device
just appeared, and manually mount it. Even I will admit that process
is a bit cumbersome, thus was born
mountie.tar.bz2, a source tarball for a Qt4 program named
mountie you can run when you want it to run, which will offer
you lists of mountable devices and already mounted devices and let
you mount or unmount things when you want to, at the mountpoints you
want to use. Unlike nautilus, with mountie, you are in
control.
I love emacs, but the rate at which
they keep “improving” it sometimes makes me think
of just archiving the source for emacs version 18 and rebuilding it
all my systems. In particular, emacs version 22 has many modes which
look like an explosion in a paint factory. I can't see a damn thing
with all the “helpful” colors burning my eyes out,
not to mention the hallucinogenic effects with the context sensitive
cursors blinking and flashing and changing shapes just because I
moved the mouse a little. So far, though, I haven't resorted to emacs
18, I've just treated all the irritating new stuff in each version as
a game I win when I finally figure out how to turn it off. I have
such a large collection of these now that I have them on a separate
Stick In The Mud Emacs page.
For a mailer, I like Claws Mail (also available in the
fedora repositories - search for claws and you can find it as well as
a bunch of plugins you may want). The single most endearing feature
of claws-mail is that it won't display HTML in any way shape
or form unless I configure a plugin to make it do that (a plugin I'll
never configure :-). It is also much smaller, faster, and less crash
prone than that bloated beast named evolution.
Having dumped
evolution, I still wanted a way to popup reminders. I tried
several things, and eventually decided I liked remind as a
flexible engine to drive my own collection of scripts and software,
including the actual message popup tool, qtmess.
In fedora 9, I soon
discovered that my mouse definition, containing a
DragLockButtons option no longer did drag lock. Since I
use a trackball, not having drag lock is a lot like needing three
hands to use the mouse. Looking at the X log file showed that it was
recognizing the DragLockButtons buttons option, but it
had no effect. Turns out I need to add Option "AutoAddDevices" "false" to the
"ServerFlags" section of the xorg.conf file
to disable the fancy new evdev based input system (which knows
nothing of DragLockButtons - what an improvement :-).
[Actually, I've seen a lot of activity in the xorg
bugzilla about this, so perhaps the upstream fixes will make it
into fedora some day].
If you
aren't using a laptop with Fedora 9 and flitting about from one
Starbucks to another, all the new default NetworkManager
system will get you is grief. If your computer only ever has one IP
address and you want your network functioning right away at boot
time, then the old crummy network system is for you.
Fortunately it is relatively simple to swap them (for now, who knows
how difficult they may decide to make this in the future). As root,
do this:
chkconfig --level 2345 NetworkManager off
chkconfig --level 2345 network on
reboot
Now all your networking will function the same way it has for
years and years.
The pestilential
pulseaudio nonsense can be removed on fedora 8 simply by doing
a:
yum erase alsa-plugins-pulseaudio
On fedora 9, pulseaudio seems to have roots grown more
deeply into the system, for fedora 9 I had to:
yum erase pulseaudio
That takes a lot of junk with it (including
alsa-plugins-pulseaudio ) and once again I have alsa back
the way it was before.
However none of the above works on
any version of fedora unless I arrange to make sure my USB microphone
(in my webcam) is not the first audio device on the system. On
fedora 8 I do this by adding these lines to
/etc/modprobe.conf :
alias snd-card-1 snd-usb-audio
options snd-usb-audio index=1
On fedora 9, there is no modeprobe.conf file, instead I create the
file /etc/modprobe.d/usbmic and put those same two lines
in it.
A similar annoyance to the usb
device conflicts crops up when you need to replace a broken DVD
drive. You take the old one out, put the new one in, and the dadgum
thing shows up as /dev/sr1 instead of
/dev/sr0 which every multimedia program on your system
has stashed in some random settings file.
Turns out the udev system created a file with a name something
like: /etc/udev/rules.d/70-persistent-cd.rules that
records the identifier of the old broken drive and says it should be
drive 0 come hell or high water (or even being removed from system).
You can edit this file (as long as you keep the syntax the same) to
remove the old drive 0 and make the new drive be zero then reboot and
you are finally back to having /dev/sr0 again.
Starting in fedora 9, the fonts used
by the GDM login screen are apparently computed strictly to render in
a specific point size based on the EDID information from the monitor.
That's all fine in some theoretical universe, but with my 42 inch HD
monitor, strict adherence to the 52DPI of the monitor leads to fonts
which are rendered about 4 pixels high to achieve the requested point
size. You mostly have to guess what everything says. Fortunately,
Arlinton Bourne provided a good work around for this in my
bugzilla about this problem. Apparently the gnome font properties
are stashed in the
~/.gconf/desktop/gnome/font_rendering/ directory in an
xml file, so I created that directory for the gdm user and copied my
own xml file in to tell user gdm to render fonts the same way I do,
and it actually worked. I can now see the text in the gdm login
screen.
Speaking of using EDID info for
everything, this is probably a good place to point to my Linux Is Easy! web
page documenting my fascinating experiences trying to get X to do
what I ask it.
There are still some things
that have (so far) defeated me. The new version of gdm on
Fedora 9 apparently has no way to control the options it starts the X
server with, so If I want to remove -nolisten tcp to
allow network connections to my X server, I can't do it.
In fact, other than firefox 3 (which seems to have caved and now
renders pages according to the Microsoft Internet Explorer defacto
standard rather than the letter of the W3 standards :-), I don't see
a single thing which is improved in Fedora 9 (which is why I'm still
using Fedora 8 as my primary system, but having finally figured out
how to disable pulseaudio, I'm considering finally switching
to fedora 9).
|