From owner-freebsd-questions@FreeBSD.ORG Wed Apr 23 05:46:47 2008 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id E7159106566B for ; Wed, 23 Apr 2008 05:46:47 +0000 (UTC) (envelope-from chrizach@gmail.com) Received: from rv-out-0506.google.com (rv-out-0506.google.com [209.85.198.236]) by mx1.freebsd.org (Postfix) with ESMTP id CC9428FC17 for ; Wed, 23 Apr 2008 05:46:47 +0000 (UTC) (envelope-from chrizach@gmail.com) Received: by rv-out-0506.google.com with SMTP id b25so1581559rvf.43 for ; Tue, 22 Apr 2008 22:46:47 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from:to:subject:in-reply-to:mime-version:content-type:references; bh=K41eSfynxpF11bGqpYRsGzzAi/jffFFE3D2PTbLefl4=; b=hurR1Td3eKhuZijVY2Om7XsyZVUtHqfey+FDOnaR8sQS08WT3ldVhXK6fODwT9e0HESyLM10B5Zm5bxLzcqvZRDJMES8750akMAaBeIzL4OriUTpoX29BaOZQ0DA8io1KYmbtOZAW2cShWelOg0AOiIxcxffJz6dVKtHPB5jCJE= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:to:subject:in-reply-to:mime-version:content-type:references; b=H/2RipPF4tenthyD3KC7KiwKzlWPL1hwYfXcm4KKbpQGirSZColx+j5pBco39GhUQk0EKbHd4eBzU9fyu+nzobo15AgD22O3e0Dtex4E8GwAeZT25i4h0PTUZtS9uuMZ3fTw6diC06TT4kVR59Djv/mhVBEsOYBi534G8/rmYBM= Received: by 10.140.251.1 with SMTP id y1mr337325rvh.11.1208929607489; Tue, 22 Apr 2008 22:46:47 -0700 (PDT) Received: by 10.141.97.10 with HTTP; Tue, 22 Apr 2008 22:46:47 -0700 (PDT) Message-ID: <4a89d1190804222246r10bde921r7f7d318bae2a53a0@mail.gmail.com> Date: Wed, 23 Apr 2008 07:46:47 +0200 From: "Christian Zachariasen" To: "FreeBSD Mailing Lists" , "David Reedy Jr" In-Reply-To: <200804222153.01743.davidrjr@comcast.net> MIME-Version: 1.0 References: <200804211305.56895.davidrjr@comcast.net> <200804221008.37489.davidrjr@comcast.net> <20080422154025.GC36675@slackbox.xs4all.nl> <200804222153.01743.davidrjr@comcast.net> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline X-Content-Filtered-By: Mailman/MimeDel 2.1.5 Cc: Subject: Re: Unable to open device file "/dev/lpt0": Permission denied X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 23 Apr 2008 05:46:48 -0000 On Wed, Apr 23, 2008 at 4:53 AM, David Reedy Jr wrote: > On Tuesday 22 April 2008 10:40:25 am Roland Smith wrote: > > On Tue, Apr 22, 2008 at 10:08:37AM -0500, David Reedy Jr wrote: > > > > IICR, the print device should belong to the cups group. At least, > > > > that's my working setup. > > > > > > > > I have the following in /etc/devfs.conf: > > > > > > > > # Give cups printer access > > > > own lpt0 root:cups > > > > perm lpt0 0660 > > > > > > Thanks for the info. This didn't actually fix the problem, but I > > > know it was needed since I read somewhere that everything that > > > cupsd spawns runs as cups. > > > > > > What I ended up doing was resetting my cupsd.conf to default and > > > redid my settings. I must have had a typo in there somewhere before > > > because as soon as I restarted cupsd after making the changes, the > > > parallel and usb ports suddenly became available as devices for the > > > printer. > > > > It happens. :-) > > > > > I had previously selected lpd and then manually specified the uri > > > as parallel:/dev/lpt0. > > > > > > The laser on the parallel port is now working fine. > > > > Good. > > > > > I also went ahead > > > and setup my deskjet on usb:/dev/ulpt0. Print test pages get marked > > > as completed but nothing actually comes out of the printer. Still > > > trying to figure that one out. > > > > Have a look at the cups logfiles in /var/log/cups. They should give > > you some pointers. You'll probably need to set the device permissions > > for ulpt in devfs.rules, not devfs.conf! > > > I got the rules setup in devfs.rules, no problem. When I turn on the > printer it's detected... > > ulpt0: on uhub0 > ulpt0: using bi-directional mode > > and things get set right permission-wise... > > crw-rw---- 1 root cups 0, 88 Apr 22 21:20 /dev/ulpt0 > > according to /var/log/cups/error_log it prints... > > I [22/Apr/2008:21:20:03 -0500] > Started "/usr/local/libexec/cups/cgi-bin/printers.cgi" (pid=756) > I [22/Apr/2008:21:20:03 -0500] [Job 47] Adding start banner page "none". > I [22/Apr/2008:21:20:03 -0500] [Job 47] Adding job file of type > application/postscript. > I [22/Apr/2008:21:20:03 -0500] [Job 47] Adding end banner page "none". > I [22/Apr/2008:21:20:03 -0500] [Job 47] Queued on "inkjet" by "root". > I [22/Apr/2008:21:20:03 -0500] [Job 47] Started > filter /usr/local/libexec/cups/filter/pstops (PID 757) > I [22/Apr/2008:21:20:03 -0500] [Job 47] Started > filter /usr/local/libexec/cups/filter/pstoraster (PID 758) > I [22/Apr/2008:21:20:03 -0500] [Job 47] Started > filter /usr/local/libexec/cups/filter/rastertohp (PID 759) > I [22/Apr/2008:21:20:03 -0500] [Job 47] Started > backend /usr/local/libexec/cups/backend/usb (PID 760) > I [22/Apr/2008:21:20:06 -0500] > Started "/usr/local/libexec/cups/cgi-bin/printers.cgi" (pid=761) > I [22/Apr/2008:21:20:06 -0500] [Job 47] Completed successfully. > I [22/Apr/2008:21:20:17 -0500] > Started "/usr/local/libexec/cups/cgi-bin/printers.cgi" (pid=762) > > but the job disappears into some sort of black hole. Nothing prints. > Printer just sits there peacefully doing nothing. > > From printers.conf for this printer... > > > Info HP DeskJet 3845 > Location Bottom > DeviceURI usb:/dev/ulpt0 > State Idle > StateTime 1208917161 > Accepting Yes > Shared Yes > JobSheets none none > QuotaPeriod 0 > PageLimit 0 > KLimit 0 > AllowUser root > AllowUser davidrjr > OpPolicy default > ErrorPolicy stop-printer > > > If anybody has additional insight, I'd sure appreciate it. > > Dave > > > Roland > > > _______________________________________________ > freebsd-questions@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-questions > To unsubscribe, send any mail to " > freebsd-questions-unsubscribe@freebsd.org" > IIRC, you should be able to actually write echo "something" >> /dev/ulpt0 and it should print? Might be useful for testing and stuff. Anyway, after a quick bit of googling around for your problem (I've had CUPS problems many times in the past myself and I know how hard it can be) I found this: Here is a workaround: In printers.conf () you will probably find a line like this: DeviceURI usb:/dev/ulpt0 change usb: to file:, so that it looks something like this: DeviceURI file:/dev/ulpt0 Then restart cups. Cups will not read any status information from the printer, but at least it can print. Be warned about unknown side effects. :) Jan-Espen Pettersen ( http://lists.freebsd.org/pipermail/freebsd-questions/2006-June/125703.html) Christian Zachariasen