The doc­u­men­ta­tion of CUPS is not very good (CUPS client set­up)

Yes­ter­day evening I did set­up a CUPS serv­er at home. It was on my TODO list since years. Before I just went down­stairs and con­nect­ed the print­er via USB to the laptop/net­book for print­ing (to pick­up the print­out I have to go there any­way). It is not the first time that I set­up the serv­er side of CUPS, but it was the first time that I want­ed to use the CUPS com­mand line util­i­ties instead of the FreeB­SD/Solaris printspool­er and the native lpr/lp com­mands.

First I just had a look at some man-pages of the CUPS util­i­ties, in the hope to find some com­mand to tell that any print­ing should be done via a remote CUPS serv­er. As I did not find any­thing, I went to the doc­u­men­ta­tion page of CUPS to search there. To me this is some sim­ple con­fig part if you want to print from more than one machine, so I had a look at the “Get­ting Start­ed” part. This was a total fail­ure. I found noth­ing relat­ed to my prob­lem. After that I went to the “Man Pages” part to search for a com­mand which I may have over­looked. Again, a total fail­ure. The FAQ also does not con­tain any use­ful infor­ma­tion when you search for “client” or “remote”. In the end I stum­bled over the client.conf entry in the Ref­er­ences part. After I found this it was easy (and fast, I just added a line in client.conf with “Server­Name <serv­er>” and every­thing worked as I want­ed it to work).

The set­up in Win­dows XP to use the CUPS serv­er is easy, just add a net­work print­er via http://<server>:631/printers/<printer> and use the cor­rect print­er dri­ver for your print­er mod­el. Do not for­get to make the application/object-stream in the mime* con­fig files and allow remote print­ing in the serv­er. No, I do not want to inte­grate it into Sam­ba, the num­ber of Win­dows sys­tems is very lim­it­ed (2 Win­dows against 2 Unix machines with 14 light­weight vir­tu­al Unix machines), so I do not need this.

Send to Kin­dle

8 thoughts on “The doc­u­men­ta­tion of CUPS is not very good (CUPS client set­up)”

  1. Uh, you don”t need to edit client.conf. The client should auto­mat­i­cal­ly pick up print­ers adver­tised by the serv­er. All you need to do is add “Allow @LOCAL” to the “<Loca­tion />” sec­tion in cupsd.conf on the serv­er. The syn­tax is pret­ty much the same as for Apache; see the cupsd.conf ref­er­ence for details.

  2. My CUPS serv­er and the client are in a jail. I have the fol­low­ing in the cups.conf, but lpstat ‑p ‑a does not give me a list of print­ers with­out using the client.conf:
    —snip—
    Browsing On
    BrowseOrder allow,deny
    BrowseAllow 192.168.1.0/24
    BrowseAllow 192.168.2.0/24
    BrowseAddress @LOCAL

    —snip—

    And in the “Loca­tion /” sec­tion:
    —snip—
    Allow from 192.168.1.0/24
    Allow from 192.168.2.0/24
    # Allow shared printing and remote administration...
    Order allow,deny
    Allow @LOCAL

    —snip—

    If it mat­ters, both jails have the broad­cast address set to .255 of the /24 net­work they are in (ifcon­fig IF alias 192.168.1.X/32 broad­cast 192.168.1.255).

  3. 1) BrowseAl­low means “accept print­er adver­tise­ments from these IP address­es”. They are not need­ed on the serv­er. On the client, the default (@LOCAL) is suf­fi­cient.

    2) The first two Allow lines in your <Loca­tion /> have no effect. The last one (@LOCAL) is suf­fi­cient.

    3) Try to con­nect to http://192.168.1.X:631/ from the client. If it lets you in, your <Loca­tion /> is fine, and the prob­lem is relat­ed to print­er adver­tise­ment.

    4) On the client (or on a ran­dom machine on the same LAN), run ‘’tcp­dump ‑n udp port 631’’; you should see print­er adver­tise­ment pack­ets every 30 sec­onds. If you don”t see them, run tcp­dump on the serv­er to make sure they”re actu­al­ly going out. Check your fire­wall set­tings.

    5) Take a look at http://192.168.1.X:631/help/.

    1. 0) The point is, I do not want to start (or to install) the serv­er on the client. I just want to print, and CUPS allows me to do it with the client.conf set­ting. I know, this is dif­fer­ent from the tra­di­tion­al BSD lpd behav­ior, but it works and is one dae­mon less to care about.

      2) CUPS is on 192.168.1.x (as is the FreeB­SD client which trig­gered this post­ing), the 192.168.2.x is my WLAN via a WLAN router (for the net­book when used in the liv­ing room), I do not have an IP of this range on the printserv­er. Does @LOCAL still cov­er this (I would expect it looks at the net­mask of the inter­face, which is /32 in my case, if it is tak­ing the /24, I can imag­ine sit­u­a­tions where I would be upset about it)? If yes, what range is CUPS tak­ing into @LOCAL (a point­er to the expla­na­tion is enough)?

      4) I see pack­ets going to the broad­cast address.

  4. Pingback: Alexander Leidinger: More problems with CUPS (passing env variables) « The Daily BSD
  5. Pingback: More problems with CUPS (passing env variables) « The Daily BSD
  6. Pingback: SUN OpenStorage presentation « The Daily BSD

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.