From owner-freebsd-questions@FreeBSD.ORG Sun Feb 2 12:42:10 2014 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 6833D5CB for ; Sun, 2 Feb 2014 12:42:10 +0000 (UTC) Received: from cdptpa-omtalb.mail.rr.com (cdptpa-omtalb.mail.rr.com [75.180.132.120]) by mx1.freebsd.org (Postfix) with ESMTP id 2C28F1976 for ; Sun, 2 Feb 2014 12:42:10 +0000 (UTC) X-Authority-Analysis: v=2.0 cv=GMaK45xK c=1 sm=0 a=s99JP9nkuyUZgdwK7wvnJA==:17 a=CPwA9CjszQEA:10 a=aavzRDw1-_wA:10 a=6lBslN5KadwA:10 a=LEup1id8KFYA:10 a=8nJEP1OIZ-IA:10 a=oX08kPI8AAAA:8 a=KGjhK52YXX0A:10 a=EhzRBQSjHpIA:10 a=ExCMXO8VY4zLqOy7n-EA:9 a=wPNLvfGTeEIA:10 a=4wfsiePOASQA:10 a=s99JP9nkuyUZgdwK7wvnJA==:117 X-Cloudmark-Score: 0 X-Authenticated-User: X-Originating-IP: 72.132.160.201 Received: from [72.132.160.201] ([72.132.160.201:40861] helo=bsdfull.Belkin) by cdptpa-oedge01.mail.rr.com (envelope-from ) (ecelerity 2.2.3.46 r()) with ESMTP id 37/07-00728-02D3EE25; Sun, 02 Feb 2014 12:42:08 +0000 Message-ID: <52EE3D1F.6060809@sdf.org> Date: Sun, 02 Feb 2014 04:42:07 -0800 From: Cary User-Agent: Mozilla/5.0 (X11; FreeBSD i386; rv:25.0) Gecko/20100101 Firefox/25.0 SeaMonkey/2.22 MIME-Version: 1.0 To: freebsd-questions@freebsd.org Subject: Re: Setting up CUPS with USB printer References: In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 02 Feb 2014 12:42:10 -0000 Jonathan Chen wrote: > Hi, > > I've installed cups-base and have followed the instructions on the pkg-message. > Currently the permissions appear correct: > > ~,6:50pm# ls -l /dev/unlpt0 > crw-rw---- 1 cups cups 0x74 2 Feb 18:16 /dev/unlpt0 > > I have verified that the "cups" user can print to the file by: > # su -m cups > % date > /dev/unlpt0 > > The contents of /usr/local/etc/cups/printer.conf are: > > # Printer configuration file for CUPS v1.5.4 > # Written by cupsd on 2014-02-02 18:47 > # DO NOT EDIT THIS FILE WHEN CUPSD IS RUNNING > > UUID urn:uuid:86ecde22-e8f2-383c-6a46-5442583f76de > Info Brother Laser Printer > Location Home > MakeModel Brother HL-5340D BR-Script3 > DeviceURI usb:/dev/unlpt0 > State Idle > StateTime 1391319777 > Type 8433748 > Accepting Yes > Shared No > JobSheets none none > QuotaPeriod 0 > PageLimit 0 > KLimit 0 > OpPolicy default > ErrorPolicy stop-printer > > > However, when I attempt to print a test-page, the Job stalls and the > printer reports: > Processing - "Waiting for printer to become available." > > The error logs are equally uninformative: > I [02/Feb/2014:18:53:07 +1300] [Job 364] Waiting for printer to > become available. > D [02/Feb/2014:18:53:12 +1300] [Job 364] libusb_get_device_list=1 > ... > > What have I missed? > > Cheers. > Hi, printer.conf looks all right. Cups installs four files with names that are the same as print utilities which are part of the FreeBSD base. cups gives you: /usr/local/bin/lp /usr/local/bin/lpq /usr/local/bin/lpr /usr/local/bin/lprm FreeBSD already has: /usr/bin/lp /usr/bin/lpq /usr/bin/lpr /usr/bin/lprm If you rename the four files in /usr/bin your test page may print. $ sudo sh # id -u 0 # cd /usr/bin # for a in lp*; do mv $a bsd-${a}; done # exit The man pages in /usr/share/man/man1/ could also be renamed. Cups has its man pages for those files in /usr/local/man/man1/. If the BSD files are not renamed the files installed by cups-base are not executed because of the order that directories are listed in the environment variable PATH. When you upgrade, the adjustments may have to be made all over again. However, binary upgrades do not seem to revert these changes (at least not in my experience.) ;-) See the output of "ls /usr/local/bin/lp*" and "ls /usr/local/sbin/lp*" for more files that the cups-base port has installed for you. HTH, Cary -- cary@sdf.org SDF Public Access UNIX System - http://sdf.org ------------------------------