Xsession and .bash_profile
Once upon a time I fought the good battle trying to get one of [gkwx]dm to run
a login shell, because you know, we're logging in. I wanted it to run a
login shell so I could run keychain
or something.
Well today I wanted to figure out how to keep startx from running keychain.
It shouldn't have been running keychain because keychain runs from
.bash_profile which shouldn't be sourced for two good reasons: A) it's not a
login shell (this is a boot script to start freevo), and B) it's not bash,
it's /bin/sh (yes, I know that's really bash but when invoked as sh it doesn't
source .bash_profile).
It turns out some bright kid created /etc/X11/Xsession.d/91source_profile (I
think that's what it was called), that sourced every profile file it could
think of whenever Xsession was run. This is both bad and stupid. It's bad
because sometimes an X session is not a login. It's stupid because they could
have achieved the same thing in a more elegant way by adding --login to the
shebang line of /etc/X11/Xsession. The place to do login shell stuff is where
you actually log in, i.e. [xgkw]dm, not Xsession.
Please, my friends, if you go out into the world and work on something that
involves login and environment, read the manpages and understand what a login
shell, an interactive shell, and a noninteractive nonlogin shell are and when
you want each. Thanks. End of rant.
wmii
I've been giving wmii a try. wmii is a window manager from
the "I can do it better than you" school, aka the people that believe people
shouldn't be bothered with managing windows. Managing windows is a waste of
time, let the computer do it dynamically. I like this philosophy, to an extent.
But most of my gripes probably boil down to not drinking enough of their
koolaid. Without further ado, I bring you the pros and cons.
Pros:
- Like ion, I can be more productive in a coding situation. Other workflows,
like making music, where you want to see a lot of stuff from a lot of
different apps at once, wouldn't work very well unless you had a huge screen.
In those workflows, it's either overlap or die, this tiling stuff just
doesn't cut it. - The concept of a nice filesystem-like interface to the wm is really neat.
- Float support (for apps that don't handle resizing well) is much better than in ion.
- Tagging
Cons:
- I want my terminals and gvim windows 80 columns wide. No less, no more. I
like them stretching up and down, but I will not tolerate 60 characters just
because that's a nice halfway split of the screen. I don't much like
having it bigger than 80 either, but that's not as big of a deal. - mod1 (alt) is a stupid default for the mod key, and changing it to mod4 was
not a walk in the park.
Hint for Debian users:
cp -r /etc/X11/wmii-3 ~/.wmii-3 # /etc/X11 wtf?!?! Watch out for the decoy /etc/wmii
sed -i s/mod1/mod4/ ~/.wmii-3/wmiirc
- You have to hold down mod to move windows in floating mode, and even worse
you have to hold down mod and right click to resize. This is a problem on my
iBook where right-click drag is nigh unto impossible. Would it kill them to
support basic title bar moving and drag-the-corner resizing? - mod-shift-c is terribly unprecedented for closing windows. mod-w would be a
much more consistent choice (yes, ctrl-w does sometimes work even in Windows) - Stack mode is ok, but tabs would be better because of the conservation of
vertical space. I'm sure this is simply easier to code, but it's not the
same as tabs. - Keeping the wm under a certain number of LoC is a stupid metric. Keep it
simple, keep it modular, keep it elegant, keep it whatever, but an arbitrary
LoC restriction is silly. I wonder if this isn't already affecting usability
per the previous point (stacking vs. tabs)
In general, it's a great tiling window manager. I'm afraid that I can't swallow
the tiling window manager paradigm, at least not until I get one of those nice
huge theater-aspect screens. I do have some ideas for a compromise, though. The
first thing is to acknowledge that overlap can be good, and that fixed sizes
(or at least restrictions on sizing) can be good. I picture something involving
layers, sizing respect, and perhaps automatic scaling, to an extent. (can't
that newfangled eyecandy technology do that, theoretically?)