Appendix A. Advanced: Customizing file associations with ~/.mailcap

Table of Contents
Helper scripts
Editing ~/.mailcap
Other resources

In computing environments, we have become accustomed to having various file types automatically associated to programs that can open them. In a Windows environment, that customization is called ``file associations'' and is typically determined by file extension. We know, for example, when we click on a .html file that it will open in a web browser. The same kind of associations exist for unix environments, and are based on MIME types. This is much like the way that helper applications are assigned in a web browser. The file that contains your personal association preferences is called ~/.mailcap


Here's my situation; yours may be similar or different. I generally access my computer at least once a day from home over a modem connection and in my office from X. I read my email in Mutt, the world's premier mail program. It sucks less than other mail programs.

Because the modem is so slow, I prefer my software to display attachments (say a Word document or PDF file) differently when reading my mail at home than when I am at my office working in a graphical environment. At my office, I want everything to work graphically (and automatically). At home I want ``just the text''. Anything more would be way too slow.

Using my ~/.mailcap file, I can have both. I need only a few custom rules. And a few helper scripts.