Warning: THE VOID WIKI IS DEPRECATED. It is no longer being maintained, contains outdated and incorrect information, and will eventually be shut down. Please refer to the Void Handbook, https://docs.voidlinux.org/, for the official documentation. If you can't find the information you're seeking, please raise an issue at https://github.com/void-linux/void-docs/issues


From Void Linux Wiki
Revision as of 14:47, 12 September 2017 by Tactica (talk | contribs) (Style guide, converted explicit man page refs to man template, linked some packages too.)
Jump to navigation Jump to 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:

# lpotions -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.