CUPS

From Void Linux Wiki
Jump to: navigation, search

CUPS (Common Unix Printing System) is printer server software for *nix.

Installing CUPS via XBPS

# xbps-install cups cups-filters

Client software

If you only need to access a CUPS server as a client then you only need to install libcups:

# xbps-install libcups

Installing hplip via XBPS

If you have an HP printer and need HP drivers you should install hplip:

# xbps-install hplip

With your HP printer connected and switched on, the following instruction will guide you to install any required drivers. The defaults offered, marked with an asterix(*) and chosen with the Return key, are typically satisfactory.

$ sudo hp-setup -i

Installing drivers

If you have a Brother printer, XBPS will ignore by default the cups and foomatic-db packages. You have to install the foomatic-db-nonfree package to start configuring it.

# xbps-install foomatic-db foomatic-db-nonfree

Starting the CUPS server

Be sure to enable and start the service before trying to use it:

# ln -s /etc/sv/cupsd /var/service/

For more documentation about using services, see for example runit.

Configure CUPS

There are many different applications which can be used to configure CUPS. If you prefer a GUI tool, perhaps your desktop manager has an application to do this, otherwise install system-config-printer:

$ sudo xbps-install system-config-printer

In order to add printers you will need to run system-config-printer as root:

$ sudo system-config-printer

In any case, the CUPS server comes with a web interface, which can be accessed by navigating to http://localhost:631 with your web browser.

Default settings can be configured, including locating network printers. Of course the command line can also be used to configure cupsd. For example, it is a good idea to set the system's default printer:

# lpoptions -d <printer name>

A list of <printer name>s can be shown using:

$ lpstat -p

Command line interaction with CUPS

The lp* commands can be used to set and get a lot of information from the CUPS server. For more information, read the manual entries for lpadmin(8), lpinfo(8), lpoptions(1), lpstat(1), lpq(1), lprm(1), etc.