The doc­u­ment­a­tion of CUPS is not very good (CUPS cli­ent setup)

Yes­ter­day even­ing I did setup a CUPS server at home. It was on my TODO list since years. Be­fore I just went down­stairs and con­nec­ted the print­er via USB to the laptop/​net­book for print­ing (to pickup the prin­tout I have to go there any­way). It is not the first time that I setup the server side of CUPS, but it was the first time that I wanted to use the CUPS com­mand line util­it­ies in­stead of the FreeBSD/​Sol­ar­is print­spool­er and the nat­ive lpr/​lp com­mands.

First I just had a look at some man-​pages of the CUPS util­it­ies, in the hope to find some com­mand to tell that any print­ing should be done via a re­mote CUPS server. As I did not find any­thing, I went to the doc­u­ment­a­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 ma­chine, so I had a look at the “Get­ting Star­ted” part. This was a total fail­ure. I found noth­ing re­lated to my prob­lem. Af­ter 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 in­form­a­tion when you search for “cli­ent” or “re­mote”. In the end I stumbled over the client.conf entry in the Ref­er­ences part. Af­ter I found this it was easy (and fast, I just ad­ded a line in client.conf with “Server­Name <server>” and everything worked as I wanted it to work).

The setup in Win­dows XP to use the CUPS server is easy, just add a net­work print­er via http://<server>:631/printers/<printer> and use the cor­rect print­er driver for your print­er mod­el. Do not for­get to make the application/​object-​stream in the mime* con­fig files and al­low re­mote print­ing in the server. No, I do not want to in­teg­rate it in­to Sam­ba, the num­ber of Win­dows sys­tems is very lim­ited (2 Win­dows again­st 2 Unix ma­chines with 14 light­weight vir­tu­al Unix ma­chines), so I do not need this.

8 thoughts on “The doc­u­ment­a­tion of CUPS is not very good (CUPS cli­ent setup)”

  1. Uh, you don”t need to ed­it client.conf. The cli­ent should auto­mat­ic­ally pick up print­ers ad­vert­ised by the server. All you need to do is add “Al­low @LOCAL” to the “<Loc­a­tion /​>” sec­tion in cupsd.conf on the server. The syn­tax is pretty much the same as for Apache; see the cupsd.conf ref­er­ence for de­tails.

  2. My CUPS server and the cli­ent are in a jail. I have the fol­low­ing in the cups.conf, but lp­stat –p –a does not give me a list of print­ers without us­ing the client.conf:
    Brows­ing On
    Browse­Order allow,deny
    Browse­Ad­dress @LOCAL


    And in the “Loc­a­tion /​” sec­tion:
    Al­low from
    Al­low from
    # Al­low shared print­ing and re­mote ad­min­is­tra­tion…
    Or­der allow,deny
    Al­low @LOCAL


    If it mat­ters, both jails have the broad­cast ad­dress set to .255 of the /​24 net­work they are in (if­con­fig IF ali­as 192.168.1.X/32 broad­cast

  3. 1) BrowseAl­low means “ac­cept print­er ad­vert­ise­ments from these IP ad­dresses”. They are not needed on the server. On the cli­ent, the de­fault (@LOCAL) is suf­fi­cient.

    2) The first two Al­low lines in your <Loc­a­tion /​> have no ef­fect. The last one (@LOCAL) is suf­fi­cient.

    3) Try to con­nect to http://192.168.1.X:631/ from the cli­ent. If it lets you in, your <Loc­a­tion /​> is fine, and the prob­lem is re­lated to print­er ad­vert­ise­ment.

    4) On the cli­ent (or on a ran­dom ma­chine on the same LAN), run „„tcp­dump –n udp port 631““; you should see print­er ad­vert­ise­ment pack­ets every 30 seconds. If you don”t see them, run tcp­dump on the server to make sure they”re ac­tu­ally go­ing 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 in­stall) the server on the cli­ent. I just want to print, and CUPS al­lows 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 be­ha­vi­or, but it works and is one dae­mon less to care about.

      2) CUPS is on 192.168.1.x (as is the FreeBSD cli­ent which triggered 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 print­server. Does @LOCAL still cov­er this (I would ex­pect it looks at the net­mask of the in­ter­face, which is /​32 in my case, if it is tak­ing the /​24, I can ima­gine situ­ations where I would be up­set about it)? If yes, what range is CUPS tak­ing in­to @LOCAL (a point­er to the ex­plan­a­tion is enough)?

      4) I see pack­ets go­ing to the broad­cast ad­dress.

  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

Your email address will not be published. Required fields are marked *