Dotfiles

What Are Dotfiles?

Dotfiles are files where programs can store user's personal configurations and customizations. Their name derives from the fact that they start with the '.' character which makes them invisible to a typical "ls", keeping them out of sight when you aren't interested. Every program can have its own dotfile(s) and there is no standard for how a program author has to structure their program's dotfile- in fact programs are so different that a common style wouldn't make sense. Unfortunately, this means that you have to learn how to configure each program separately; luckily editing dotfiles is usually easy and infrequently necessary. It is a useful skill to be able to modify several common dotfiles which control the look-and-feel of your account.

What this guide focuses on is how to control the aesthetics (so to speak) of your account. The main files that you will be playing (and "playing" is the perfect word) are .fvwmrc, .Xdefaults, and .xinitrc. Three more useful dotfiles you will learn about in this guide are .anyone, .alias, and .plan.

Dotfiles are commented to help you figure out what things mean. Read the comments.

.plan

The information in your .plan is listed when somebody fingers you. Many people put information about themselves in their .plan, such as phone numbers where they can be reached, their address, their url, etc. Some people even put their favorite quotation in their .plan. Or even what they are planning to do! See Andrea's .plan

.alias

The .alias file allows you to alias frequently used commands to shorter commands. For example, if I want to alias zwrite to 'z' I would add to my .alias file:
alias z 'zwrite'

.anyone

Your .anyone file consists of a list of people that you often look to see if they are logged in. Your friends, for example, or the professor you work for. The program jtrack, or xjtrack if you want it to start up its own window, will list the people in this file who are logged in and have been idle less than an hour.

.Xdefaults

The .Xdefaults file contains information about default colors, geometries and fonts for different programs. Many programs, such as emacs, have sample .Xdefaults so you can learn about some more of the defaults you can set. For the colors available to you, use xcolorsel. You can either use the name of the color, or the 8-bit representation of the color. For fonts, use xfontsel. To reload your .Xdefaults after you have changed them without logging out, type in a shell:
xrdb -merge .Xdefaults

.xinitrc

The .xinitrc starts up a lot of programs and applications on start up, for example, xterms, emacs, a clock, a mail manager, etc. A good place to look is in /cs/bin/ for other programs you can use. One thing you may want to add to .xinitrc, for example may be xjtrack. The syntax for this is:
xjtrack -- -bg <background color> -fg <foreground
color> -geometry <geometry&rt; & 
Make sure you do not forget your '&anp;'. This is important to run the program in the background so you can start up the next program. A geometry is the pixel location of the program. When you move things around on your desktop, the geometry it is at appears in a tiny rectange. An example, +2+2, would put something pretty much in the top left hand corner.

.fvwmrc

(link is to the man page - localhost only)

The .fvwmrc file is a window manager. There are a number of options to use as window managers. This is the default for accounts at Brown. Some of things it does is set the title bar colors, and the colors of various other windows. It allows you map your mouse buttons to things, such as what Popup menus come up when you click your mouse in the root window, and what window operations are done with various buttons. You can also map keys on your keyboard. Your .xinitrc starts up your window manager, so if you use a different one, you must change this in your .xinitrc. In your right mouse button menu is an option to restart your .fvwmrc when you make changes.

Experiment!

Experimenting is the best way to learn how dotfiles work and what you can do with them. It can be addictive, trying different things and colors. But be careful. If you are not sure what something does, don't change it! Ask first. Colors and fonts and geometries are safe to change. You can also try different programs by typing them in a shell. Remember to use & so you can run more than one program. Have fun!


HOME