System Administration Guide: Advanced Administration

Setting Up a .printers File

There is no need to set up a .printers file in your users' home directories if they don't need customized printer information. However, the .printers file enables users to establish their own printer aliases. You can use the _default alias to make a printer the default. You can also set up a special _all alias to define a list of printers affected when you cancel a print request or check the status of printers.

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

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

How to Set Up a .printers File

  1. Log in to the user's system as superuser.

  2. Start the file editor you want to use to create a .printers file in the user's home directory.

  3. (Optional) Set up the _default alias to make a specific printer your default printer, using an entry similar to the one shown in the following example.


    _default printer_name
    
  4. (Optional) Set up the _all alias to define the printers affected when you cancel a print request or check the status of printers, using an entry similar to the one shown in the next example.


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