> Printing

Printing in Tribblix is handled, like on most unix-like system, by CUPS.

If you want to set up printing, then the starting point is to install the printing overlay:

    zap install-overlay printing

which will install both the client and server components. The client commands such as lp, lpr, and lpq, can be used immediately with no further configuration.

Enabling the print server

If you wish to have your system run as a print server to itself or to other machines on the network, then the cups services need to be enabled. To check, run:

    svcs -p cups/scheduler cups/in-lpd

and, if they aren't enabled, enable them with:

    svcadm enable cups/scheduler cups/in-lpd

Connecting to the print server

Once it's running, to manage the print server you need to connect to its web interface. This is only available for the local machine, and to connect just open the following address in a web browser:

    http://localhost:631

Initially, you'll need to log in with the root username and root password.

Sharing printers to a network

If you want to allow other machines on your network to print to printers attached to or managed by your system, then in the Administration tab of the CUPS web interface, tick the Share printers connected to this system box and press the Change Settings button.

Alternatively, this can be managed from the command line. As the root user:

    cupsctl --share-printers

Printing to a wireless printer

Now to a concrete example, the common case of printing to a wireless printer.

You can see what printers are currently connected to the local network using the following command:

    ippfind

which might come back with something like

ipp://HP1234AB7890B0.local:631/ipp/print

Then log in to the CUPS web interface, go to the Administration tab, and press the Add Printer button. It will browse and hopefully find the same printer(s) that ippfind did.

Select the printer you want.

The next important step is to set the name to something sensible and short, because that's what you're going to use when printing to it.

It'll ask you for make and model. Make ought to be straightforward, for model you want IPP everywhere.

That should do it. Then you should be able to see the local queue(s) with

    lpc status

and to print a PDF file to the printer that you named, for example, HP5100:

    lpr -P HP5100 my_file.pdf

Index | |