Linux config files
It occurred to me that I've put a
lot of time into things like config files, customizing Linux to my
liking. Most of that time was spent running around the internet
trying to figure out what the config files should look like, rather
than writing them, so I thought I would post some of my config files
here so that people could look at them. Feel free to copy them, modify
them, whatever.
I use bash as my shell, and FVWM as my window manager. If you don't
use these, then most of these files aren't likely to be of a whole lot
of use to you.
Also, I use vi (or ViM). There are several things that relate to this,
most importantly the line `set -o vi` in my .bashrc. If you just use
my .bashrc as it is, your shell will start behaving like vi, which may
or may not be what you want. You have been warned.
Lastly, many things must always be configured on a per-machine basis.
These files probably won't work without at least a little bit of
customization. Look particularly at the PATH in the .bashrc, and the
ModulePath in the .fvwm2rc.
I highly recommend not just blowing away your old config files with
these, since the old ones more than likely contain useful stuff, like
the correct paths for your system. Make backups of your old configs
before you download these, or don't download them directly to your
home directory. You have been warned.
Always remember: Linux does not have an 'un-delete' command. Backups
are your friend.
If you do try to run stuff with my files and find you can't log in at
all, it's probably due to a problem with the .xsession. Check the path
to the window manager, and make sure it's correct (you'll probably
have to do this from the console, or another window manager, or
something).
For those who are interested, a copy of this paper is translated to Serbo-Croatian language at WebHostingGeeks.com.
.bashrc
The .bashrc file controls the operation of your shell, if you use bash.
If you don't use bash, it doesn't do much of anything at all.
This gets evaluated every time you open a terminal, ssh, etc.
Or it should. Some systems don't actually execute it, for reasons
I have never understood. At any rate, you can do `source ~/.bashrc` to
force it to be evaluated.
.fvwm2rc
The .fwvm2rc controls the look and feel of FVWM, the [your favorite
thing starting with the letter 'F'] Virtual Window Manager. Again, if
you don't use FVWM, it's not going to do anything. Make sure you set
the ModulePath to the correct location on your system.
.xsession
The .xsession controls what happens when you log in to an X server.
Mine does a bunch of stuff, including loading a pretty background, and
starting FVWM. Your paths may vary.
If you'd rather use KDE or GNOME, you probably don't need one of these
at all.
Note that this file uses my keyswitch file; see below.
.Xdefaults
The .Xdefaults file contains default settings for all sorts of things.
You can control what your x-terms look like, for example. This one's
pretty safe; no paths, though you might have font issues if you use it
without modification.
.vimrc
Ahh, the .vimrc. This file controls the default behavior of ViM, which
is, of course, your favorite text editor. If, by some horrid chance,
you were never introduced to ViM, then this file will do you no good,
as it is far too easy to understand to be in e-lisp.
.gvimrc
Like the above, but gets evaluated if you're running the GUI.
.mydircolors
This file gets evaluated from my .bashrc; it controls the colors of
things when you're using a terminal that can display colors (like xterm
or aterm). It's basically like the default, except that I find the
blue directory color difficult to read on my dark terminal backgrounds,
so I made directories yellow instead.
mycolors.vim
A colorscheme I made for ViM (or GVIM). It's a lot like Desert, but it
has my favored minty-green text.
keyswitch
This switches control with caps-lock, and escape with tilde (~), in
addition to switching grave (`) and tilde (~), so you don't need to
press shift to get the tilde, which I found to be the much more common
character (eg. ~/). It also makes the right alt key work as a
backspace, and the windows key next to it work as enter. '!' comments
out lines, if you don't want these things; I like them, as they allow
me to transfer strain from my pinkies, which are weak, to my thumbs,
which are much stronger.
To use it, just do `xmodmap keyswitch`.
qwerty.kbd
`xmodmap qwerty.kbd` will get your keyboard from whatever mode it's in
to the default qwerty mapping.
If you can type it.
If you're going to
play around with xmodmap, I would suggest making a shortcut to this
one. If you're using my .fvwm2rc, CTRL-ALT-2 is already set up to
execute this command.
dvorak.kbd
Another xmodmap file; this one creates a standard dvorak mapping from
a standard qwerty one. Note that if you evaluate it again, it will
happily re-map your dvorak keyboard to dvorak as if it were qwerty, and
it will be really hard to type. This is where the shortcut
above comes in handy.
my.kbd
The layout that I use, personally; it's basically a combination of the
dvorak mapping and the keyswitch mapping. If you're using my .fvwm2rc,
hitting CTRL-ALT-1 will switch you to this mapping. Note that this file
now contains keymaps to generate proper behavior with XFree86 4.3.0 and
later (there are some new keysyms that are used for Ctrl-Alt-Bkspace,
terminal switching, etc.)
.Xmodmap
This is just a copy of the my.kbd file, but with this name, it should get
automatically read in when you log into X.
logitechEVDEV.map
This file re-maps the buttons on my trackball to a more useful ordering (eg. the wheel behaves properly, the buttons do what I want them to, etc.). You'll probably want something different if you use a different model pointer device.