Date: Sat, 15 May 2004 15:01:48 +0200 From: "Simon L. Nielsen" <simon@FreeBSD.org> To: Robert Storey <y2kbug@ms25.hinet.net> Cc: freebsd-doc@freebsd.org Subject: Re: CUPS Message-ID: <20040515130147.GA959@arthur.nitro.dk> In-Reply-To: <20040515203347.525c8b78.y2kbug@ms25.hinet.net> References: <20040515203347.525c8b78.y2kbug@ms25.hinet.net>
next in thread | previous in thread | raw e-mail | index | archive | help
--9amGYk9869ThD9tj Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On 2004.05.15 20:33:47 +0800, Robert Storey wrote: > I've written up a little HOW-TO for getting CUPS and up and running, and = I'd > happy if it got appended to the current CUPS introduction in the Manual. = So > without further ado, below is what I've written. I'd appreciate any feedb= ack. I haven't used CUPS, so my comments might reflect that. > STEP 1: For those who rebuild world every now and then, it might be best = to add > this to /etc/make.conf before building world and installing CUPS: >=20 > CUPS_OVERWRITE_BASE=3Dyes > NO_LPR=3Dyes >=20 > However, the above is not mandatory. You should note what each option actually does, and why it's a good idea to have use them. > STEP 2: Installing CUPS from PORTS >=20 > You've got to install four packages from ports. You can find them here: > =20 > /usr/ports/print/cups > /usr/ports/print/cups-base > /usr/ports/print/cups-lpr > /usr/ports/print/cups-pstoraster >=20 > The first port - /usr/ports/print/cups - is a meta-port, so installing it= should > install the others. If it's enough to install the first port I don't think the others should be mentioned, or at least it should be explained why one might want to install the non-metaports and not the metaport. > STEP 4: FreeBSD-specific Issue >=20 > On FreeBSD, CUPS stores its executable files in /usr/local/bin/ whereas t= he > traditional lp executables are in /usr/bin/. Because /usr/bin/ is in the = command Won't CUPS_OVERWRITE_BASE replace the standard lp* utitilies i /usr/bin ? (Just a guess since the what other make variabels with similar names do). > path before /usr/local/bin/, your CUPS files will not be able to execute.= For > example: > =20 > # which lpr > /usr/bin/lpr > =20 > This problem is handily solved by making file /usr/bin/lp* non-executable= , like > this: > =20 > chmod -x /usr/bin/lp* > =20 > Now, try the previous command again: > =20 > # which lpr > /usr/local/bin/lpr > =20 > Success! This is what we want. It should be noted that a new installworld will set the execuateable bit again if people don't have NO_LPR in make.conf. > STEP 6: Configuring the Printer >=20 > This part is just like Linux. Open up a browser (Mozilla or Konqueror wil= l do) > and type this url: > =20 > http://localhost:631 > =20 > This will bring you to the CUPS configuration menu. You'll be asked to lo= gin > (login as root and use the root password), then it's simple point-and-cli= ck > operation that you should be able to figure out yourself. > =20 >=20 > STEP 7: Configuring a CUPS Server and Client >=20 > If you want to enable network printing on your LAN, you've got a little m= ore > work to do. Assuming that the FreeBSD box is the print server, edit file > /usr/local/etc/cups/cupsd.conf and make two changes. The two changes vary > according to how your network is configured, but for a typical Class C ne= twork, > this should work: >=20 >=20 > # broadcast address > BrowseAddress @LOCAL >=20 > <Location /> > Allow From 192.168.0.0/24 >=20 >=20 > Instead of @LOCAL, we could have specified a broadcast address, such as > 192.168.0.255 (again, that's for a Class C network). And rather than Since Class networks are depricated I would just say a "/24" or something like that. If people know of Class A/B/C they probably also know CIDR. > 192.168.0.0/24 (the whole network), we could have specified just a single= client > machine (such as 192.168.0.3). >=20 > Once you have made the above changes, restart the CUPS daemon: >=20 > /usr/local/etc/rc.d/cups.sh restart >=20 > Now go to the client machine, open your browser, type http://localhost:63= 1, and > click the button "Print test page" - it should work. Hmm, don't the cliean need to install something? E.g. entire CUPS or some part of CUPS? And 'm certain the client need to set up something to point at the print server. It will be much faster to get your submission added if you write it in DocBook SGML and send a diff as noted in the FreeBSD Documentation Project Primer. Since CUPS is getting more popular I think it's good to have something like this in the Handbook. --=20 Simon L. Nielsen FreeBSD Documentation Team --9amGYk9869ThD9tj Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.4 (FreeBSD) iD8DBQFAphS7h9pcDSc1mlERAsr3AJsEGlSFag/FfjpEKuikOFLBFxPRFACdHuYq sS+TJKY1ZU0E9ie9m4XPx28= =QUKj -----END PGP SIGNATURE----- --9amGYk9869ThD9tj--
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20040515130147.GA959>