I'm setting up Ubuntu 10.04 (server install) as a print client.

I already have a working Ubuntu print server set up using CUPS, also running 10.04.

What packages do I need to install to be able to print from the command line on my client to my print server?


There are a couple of different options for configuring print queues.

If you only ever want to use your print server to print from the print client (i.e. you don't want to be able to configure any other queues, or print to any other servers), then create /etc/cups/client.conf with a single line:

ServerName your.print.server.com

That change will kick in immediately.

If you want to be able to use other print queues or print servers from your print client, but still want your client configured with all of the print queues on the print server, you can use the BrowsePoll option. Edit /etc/cups/cupsd.conf on the print client, and at the end of the file add the following block:

Browsing on
BrowseRemoteProtocols cups
BrowsePoll your.print.server.com

Then run /etc/init.d/cups restart to pick up the configuration change.

Finally, if you only want to configure one queue at a time on your print server, you can use CUPS' web interface. Go to http://localhost:631 (again, from the print client) then click "Administration", then click "Add Printer". You'll be taken to a wizard which will walk you through configuring the queue.

In any case, running lpstat -a should give you a list of the print queues that are configured on your client, so you can verify that it worked.

| improve this answer | |
  • It seems like I need to install the cups package itself - not just cups-client and cups-bsd. I thought cups was the package to install on the print server? Is it required on both print servers and print clients? I'm confused! – stickmangumby Jul 8 '10 at 0:26
  • It turns out that in most common configurations (unless you go with my /etc/cups/client.conf fix above), you actually run a local CUPS server that forwards print jobs to any remote print queues you have configured. – Evan Broder Jul 8 '10 at 2:11
  • Hrm. I went with the first approach (had to create the directory as well as file), and now running lpstat -a returns Connection refused. However I can access the CUPS web interface on my print server without authenticating. Any idea what's happening here? Should I just install the cups package? – stickmangumby Jul 8 '10 at 3:09
  • Hmm...what if you put ServerName your.print.server.com:631 in /etc/cups/client.conf? I don't think that should make a difference, though. – Evan Broder Jul 8 '10 at 13:13
  • I had to install CUPS and add the printer to my local config through the web interface to explicitly specify which driver to use, as when I added the printer with lpadmin and tried to print they just failed silently. Not sure what was going on but thanks for the help! – stickmangumby Jul 9 '10 at 1:22

The cups-bsd package contains the lpr command which is frequently used to print from the command line.

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.