Installation

Muttprint -- User's guide
Prev |  | Next

# 2. Installation

## 2.1. System requirements

Muttprint was realized in the programming language Perl which requires a functioning Perl interpreter in version 5. This should be true on every Linux systems by default.

Make sure that a LaTeX distribution (I recommend teTeX higher than version 2.0) plus the programs psselect and psnup from the PS-Utils are available on your system. The last are only necessary if you want to use paper save mode and/or duplex printing; and they are not necessary if you use CUPS and if you configured Muttprint to use it, see Section 3.1.2.

If you use a Perl 5.6 then it must be a small C program compiled. It is required to get information about the current locale environment. That means that there must be a C compiler installed. If you use Linux this is not necessary.

All required LaTeX packages are included in teTeX. If you use another LaTeX distribution, read the file `README.latex`, which contains information about all required packages. You have to install all packages, that are not present on your system.

For parsing the date, Muttprint uses the Perl module Date::Parse[1] [2]. If the module is not installed, Muttprint works without problems except the function to convert the time zone and print the date in the local language, see Section 3.1.7.

Since Muttprint 0.72 the Perl module Text::Iconv [3] [4] has to be installed. It is used to convert between different encodings. At first you should check if the module is distributed with your operating system (on Linux: distribution). Search for a file called `Iconv.pm`. If not, install it. If you cannot install Perl modules on your system, Muttprint can use the external applications iconv (or even recode). This is slower and error-prone. If you want to do this, just set the variable `ICONV_EXTERNAL` to `on` in your configuration file, see Section 3.1. But keep in mind that this is only a compromise solution!

To have support for the charset UTF-8 the LaTeX command for changing the charset must support UTF-8. This is naturally not the case! You'll find a suitable extension in the CTAN. Just download the file ftp://ftp.dante.de/tex-archive/macros/latex/contrib/supported/unicode.tar.gz and install it as described in the file `INSTALL` which is included. You only need UTF-8 support if you work in a UTF-8 environment. You find out the current encoding under Linux with the command locale charmap, on other operating systems use `muttprint --print-locale` after Muttprint is installed.

## 2.2. Installation of the files on your computer

### 2.2.1. Manual installation

At first, you have to unpack the archive. This could be done by the command

`$` `tar xvfz muttprint-`Version`.tar.gz`

Change in the directory which was created:

`$` `cd muttprint-`Version``

There is distributed a suitable `Makefile` with Muttprint. To adjust the locations on your system, edit the Makefile with your favourite editor.

As mentioned above, there must be a small C program compiled. If you use Perl 5.8 and/or Linux, you could skip this step. For this, just execute

`$` `make`

You need Root permissions to install the program. After you have changed with the su command to the superuser, perform the installation with

`#` `make install`

The script should work now.

If you would like to uninstall Muttprint later and all files are still on the same location, execute simply

`#` `make uninstall`

as root.

### 2.2.2. Installation of the packages

If your distribution uses a package management system such as RPM or DPKG, it is a good idea to use the correlatively packages. The greatest advantage is the simple uninstallation.

Most Linux distributions use the RPM package management system. The easiest way to install the package is the command

`#` `rpm -Uvh muttprint-`Version`-`Release`.noarch.rpm`

All RPM packages are signed with my GnuPG-Key (ID DDAF6454). You get more detailed information about RPM and verification of signatures in Maximum RPM.

The Debian packages are created by René Engelhard `<rene@debian.org>` and are normally available a few days after a new release of Muttprint. The could be installed by

`#` `dpkg -i muttprint_[version]-[release]_all.deb`

Take a look at the Debian "Developer's Corner" for more information about Debian packages.

Another possibility to install Debian packages is apt-get.

## 2.3. Integration of Muttprint in mail and news clients

Muttprint was originally developed for the use together with Mutt only. However, it could be integrated in following mail programs without problems. I got some description of users. Muttprint would be work independently of Mutt in future, too.

### 2.3.1. Mutt

You have to add or change following line in the file `$HOME/.muttrc` or system wide in `/etc/Muttrc`:

    set print_command="muttprint"

Moreover you must make sure that all necessary headers are dumped when the mail is printed out. The easiest way is to write a small macro (in your `~/.muttrc`) which makes sure that all headers are dumped. Only the most important headers are really printed (see Section 3.1.20).

Here's the macro:

    # Dump all headers
    macro index p "<display-toggle-weed> <print-message> <display-toggle-weed> <exit>"
    macro pager p "<display-toggle-weed> <print-message> <display-toggle-weed>"

At first, the macro switches to the mode where all headers are shown, then the mail is printed and finally it switches back. It is necessary to turn the confirmation of printing off so that the macro works right:

    # No confirmation before printing
    set print="yes"

To print more than one mail sensible in one step, you should add following entry:

    # Print every mail extra
    set print_split

You'll find more information in the documentation of Mutt (`/usr/share/doc/packages/mutt/manual.txt(.gz)`).

### 2.3.2. Slrn

Simply add following lines in your configuration file `~/.slrnrc`:

    % Use Muttprint for printing
    set printer_name "muttprint"

If Muttprint should print more headers than this which are displayed on the screen, you have to use instead of the normal printing command y the combination ESC, 1, y (one after another). This is important for printing the X-Face header, see Section 3.1.4.

### 2.3.3. XFMail

In the dialogue Misc, Config Misc you have to do an entry in Print Command: `/usr/bin/muttprint -f $f`.

| With some versions of XFMail, problems are reported because XFMail does not add the headers in the printing. This is not a problem of Muttprint. To solve the problem you could look for a new version of XFMail which doesn't have this bug. See also the XFMail developer mailing list archive for a solution.

### 2.3.4. Pine

Enter the print command `muttprint` in Setup, Printer, Personally select print command. Save the changes.

### 2.3.5. Sylpheed

To use Muttprint permanently as printing program, call Configuration, Common preferences, Other, Printing and entry `muttprint -f %s`.

### 2.3.6. Gnus

Muttprint could be integrated in Gnus, too. I got a Lisp code from a user that realizes the integration. Please ask me no questions about this because I don't know Lisp and don't use (X)Emacs myself.

You find the code in `README.Gnus` and I would like to refer to this file in this manual. If you use packages for the installation you should find this file in the `/usr/share/doc/packages/muttprint/` directory.

### 2.3.7. Exmh

Choose at first Preferences, then Text Print Command and set Text Print Command to `muttprint -f $file`.

### 2.3.8. Other mail clients

Muttprint works with all mail programs theoretically if they comply with following conditions:

- The output must be plain ASCII text without any formattings.

- You must be able to choose the printing command freely.

Newsreader are also supported because the `To` header is optional and the `Newsgroups` header is also evaluated.

If you use Muttprint with other programs than mentioned above, please send me a short message in which you describe how you've configured the program. I could add the description here.

### Notes

[1] | http://search.cpan.org/CPAN/authors/id/G/GB/GBARR/TimeDate-1.16.tar.gz
[2] | You find details about the installation in this file. Normally, using the following procedure should work: `$` `tar xvfz Time-Date-1.16.tar.gz` `$` `perl Makefile.PL` `$` `make` `$` `make test` `#` `make install`
[3] | http://search.cpan.org/CPAN/authors/id/M/MP/MPIOTR/Text-Iconv-1.2.tar.gz
[4] | You find details about the installation in this file. Normally, using the following procedure should work: `$` `tar xvfz Text-Iconv-1.2.tar.gz` `$` `perl Makefile.PL` `$` `make` `$` `make test` `#` `make install`

Prev | Home | Next
Muttprint -- User's guide |  | Configuration