Sane Keyboard Preferences for Linux

When I install a new linux distro, I find that sometimes the vendors just get things wrong. No, it's not really a matter of opinion. They did it wrong.

Keyboard issues

Most modern keyboards have a key labeled Backspace (usually with an arrow facing left) in the upper right corner. Backspace is supposed to delete backwards. Even if that key is labeled delete, it should still act as a Backspace because the vast majority have learned to touch type as if the key up in the corner did a backwards delete. If you are using an Xterm and your Backspace does not work right, the fix is easy. Edit /usr/lib/X11/app-defaults/XTerm, or your own .Xdefaults (make sure xrdb -merge $HOME/.Xdefaults happens somewhere in the session startup sequence) and set this.

	*VT100*backarrowKey:    true

A bit of history...
For those of us old enough to remember teletype machines, the key in the upper right corner used to be labeled DEL or Rubout. This made sense in the days of paper tape. You pressed the backspace button on the tape feed, then pressed DEL to effectively erase the character. That's why ASCII DEL is 12710, the only control character above 31. It punches through all the holes across a row of tape, to obliterate the previous character. The keyboard position may have been labeled DEL, but it effectively meant backwards delete.

Then some fool decided to get all historically purist about it and make the key in that position actually mean DEL, in spite of the fact that very few keyboards actually have a "delete" there. Since DEL is not really Backspace, they had to give it correspondingly incorrect behavior. Fortunately, this is only broken in Xterm, and not X in general. Most keyboard maps actually do the right thing and return a Backspace keysym for the key in the upper right of your keyboard.

Eliminate caps lock
The X11R6 way of doing this is to use an option in the server configuration file. On most linuxes it is /etc/X11/xorg.conf
	Section "InputDevice"
		Identifier  "Keyboard0"
		Driver      "kbd"
		Option      "XkbModel" "pc105"
		Option      "XkbLayout" "us"
		Option      "XkbOptions" "ctrl:nocaps"
the "ctrl:nocaps" bit is the magic that makes this happen. You could also us xmodmap
	clear lock
	clear control
	add control = Caps_Lock Control_R Control_L
	keycode  9 = grave asciitilde
	keycode 49 = Escape asciitilde
the last two lines put escape back on the keyboard, where it belongs. I should figure out how to do that with the XkbOptions things, but I've got other work to do.

For more information, visit
Correct for the glaring use of color in ls
Bright color ls is too garish for words on most xterms. The fix for that is
	sudo rm /etc/profile.d/colorls.*
Oh, did I change that for everyone on a shared machine? Sorry.
VI sanity
	syntax off
	set syntax=disable
	set undolevels=0
	set wrap
	set ts=8
	set noautoindent
	set indentkeys=''
	set indentexpr=
	set noshowmatch
	set filetype=""
	set matchpairs="
Getting your X server to listen to TCP requests
Somewhere along the the Gnomes decided that xdm had to be replaced by gdm. That would not be so bad IF the Fedoda distro's didn't put all the OLD X setup in /etc/X11, without giving you a clue that it is mostly ignored. Look in /etc/gdm/custom.conf and/or /usr/share/gdm/defaults.conf. You will want to add this line to the [security] section.
.rc files
Check out myrc.tar