perl NET::Printer to cups-lpd on OS X gives not ready/ready
Johan Henselmans
johan at netsense.nl
Tue Jun 2 10:30:00 PDT 2009
Johan Henselmans schreef:
> Setup: Mac OS X Server 10.5.7.latest updates
Some extra info: I just tested the same printer on a Mac OS X Client
setup, where I also configured the printer interface via localhost:631,
there the interface via lpd works fine. I also tested the script calling
the interface from another machine, also works fine.
?????
>
> I have a raw printer interface to a USB connected printer (it has to be a raw interface because all kinds of reasons).
>
> I connect to the printer via perl with the Net::Printer module.
>
> A sample script:
>
> ===============
> use Net::Printer;
>
> $lineprinter = new Net::Printer(filename => "/tmp/ticket.txt",
> printer => "ticketprinter",server => "localhost",port => 515,
> lineconvert => "YES");
>
> $result = $lineprinter->printfile();
>
> # Did I get an error?
> $errstr = $lineprinter->printerror();
> if ($errstr){
> print $errstr;
> }
> # Get Queue Status
> @result = $lineprinter->queuestatus();
>
> print @result;
> =====================
>
> This worked flawlessly under 10.4.x.
>
> I am now testing the same setup under 10.5.x and I am getting errors:
>
> This is what I am getting back from the script:
>
> ERROR:Net::Printer[157]: Printer ticketprinter on localhost not ready!ticketprinter at localhost: ticketprinter is ready
> ticketprinter at localhost: no entries
>
> In the system log I see these errors:
>
> org.cups.cups-lpd[2609]: launchproxy[2609]: /usr/libexec/cups/daemon/cups-lpd: Connection from: 127.0.0.1 on port: 51469
>
> I have tried another interface, via IPP, which works, but I am curious why this
> will not work.
>
> I had a look at /System/Library/LaunchDaemons/org.cups.cups-lpd.plist to have a look if that might be the problem, but I could not really understand why this would interfere:
>
> <key>Label</key>
> <string>org.cups.cups-lpd</string>
> <key>ProgramArguments</key>
> <array>
> <string>/usr/libexec/cups/daemon/cups-lpd</string>
> <string>-o</string>
> <string>document-format=application/octet-stream</string>
> </array>
> <key>SHAuthorizationRight</key>
> <string>system.preferences</string>
> <key>Sockets</key>
> <dict>
> <key>Listeners</key>
> <dict>
> <key>SockServiceName</key>
> <string>printer</string>
> <key>SockType</key>
> <string>stream</string>
> </dict>
> </dict>
> <key>UserName</key>
> <string>_lp</string>
> <key>inetdCompatibility</key>
> <dict>
> <key>Wait</key>
> <false/>
> </dict>
>
>
> Anybody any explanation why the lpd interface on a raw printerqueue is not working?
>
>
>
More information about the cups
mailing list