System Administration Guide: Printing

Setting Up a .printers File

The .printers file is located in a user's home directory. This file includes information about a user's default printer and other frequently used printers. Having a .printers file enables users to establish their own printer aliases. For example, a _default alias can be used to specify a user's default printer. Also, a special _all alias can be used to define a list of printers that are affected when a print job is canceled or to check the status of printers.

The use of the .printers file by the LP print service is controlled by the naming service switch (/etc/nsswitch.conf). The default configuration specifies that the print service checks a user's home directory to locate printer configuration information before it checks the other naming services. So, you can tailor a user's printer configuration file to use custom printer information rather than the shared information in the naming service.

For more information about the .printers file, see the printers(4) man page. For more information about the naming service switch, see the nsswitch.conf(4) man page.

ProcedureHow to Set Up a .printers File

This procedure shows users how to set up .printers file in their own home directories.

  1. Log in to the system with your user name and password.

  2. If necessary, change directories to $HOME.


    $ cd $HOME
    
  3. Start the text editor that you want to use to create a .printers file.

  4. (Optional) Set up the _default alias to make a specific printer the default printer. Use an entry that is similar to this entry.


    _default printer-name
    
  5. (Optional) Set up the _all alias to define the printers affected when you cancel a print request or check the status of printers. Use an entry similar to this entry.


    _all printer1,printer2,printer3
    
  6. Save the file as .printers.