Tiny Core Linux

Tiny Core Extensions => TCE Bugs => Topic started by: jpeters on October 06, 2009, 12:12:03 PM

Title: cups, samba printing
Post by: jpeters on October 06, 2009, 12:12:03 PM
All was working until some recent updates. Now:

errors  noted at the cups admin site:

Code: [Select]
Bad device-uri scheme "smb"!
 
Paused - "Backend /usr/local/lib/cups/backend/smb does not exist!"
After issuing smbd command from samba, I got a broke pipe error

I think I had recall having to place the smb file when configuring with puppy.                                                                    
Title: Re: cups, samba printing
Post by: perthie on October 06, 2009, 12:20:47 PM
The CUPS backend file /usr/local/lib/cups/backend/smb should be a symlink, typically to
/usr/local/bin/smbspool.
Title: Re: cups, samba printing
Post by: jpeters on October 06, 2009, 12:54:34 PM
The CUPS backend file /usr/local/lib/cups/backend/smb should be a symlink, typically to
/usr/local/bin/smbspool.

Thanks..That was the link I needed for puppy config.  The printer now installs, but still having some issues:
Code: [Select]
Driver: HP Deskjet 940c Foomatic/hpijs, hpijs 2.8.12.26 (color, 2-sided printing
Connection:     smb://DESK/HP940c


printer HP940c is idle.  enabled since Tue Oct  6 12:42:24 2009
no system default destination

so nothing happens when I try to print, although it sees the printer ok:  
Code: [Select]
tc@box:~$ lpstat -p -d  
printer HP46082B is idle.  enabled since Tue Oct  6 11:55:32 2009

Cups admin no longer has a print test (that I could find, anyway).  




Title: Re: cups, samba printing
Post by: jpeters on October 06, 2009, 01:04:08 PM
The CUPS backend file /usr/local/lib/cups/backend/smb should be a symlink, typically to
/usr/local/bin/smbspool.

Thanks..That was the link I needed for puppy config.  The printer now installs, but still having some issues:
Code: [Select]
Driver: HP Deskjet 940c Foomatic/hpijs, hpijs 2.8.12.26 (color, 2-sided printing
Connection:     smb://DESK/HP940c




printer HP940c is idle.  enabled since Tue Oct  6 12:42:24 2009
no system default destination

so nothing happens when I try to print, although it sees the printer ok:  
Code: [Select]
tc@box:~$ lpstat -p -d  
printer HP46082B is idle.  enabled since Tue Oct  6 11:55:32 2009


I get a "broken pipe" error when printing from geany.  
Title: Re: cups, samba printing
Post by: perthie on October 06, 2009, 01:07:15 PM
Which version of CUPS are you using?
Title: Re: cups, samba printing
Post by: jpeters on October 06, 2009, 01:12:52 PM
Which version of CUPS are you using?

Updated to 1.4.1, the previous version worked fine. (I've updated other things since using the printer, like dbus, etc.)
Title: Re: cups, samba printing
Post by: perthie on October 06, 2009, 01:25:46 PM
The CUPS 1.4 package is broken several ways. You are best to stay with 1.3.8. If you are now using TC 2.4, you can bring over the CUPS 1.3.8 tce package and get it to work fine. I converted mine to a tcz, just to be consistent.



Title: Re: cups, samba printing
Post by: jpeters on October 06, 2009, 02:30:49 PM
I see that /usr/local/lib/cups/backend/smb is listed as a cups file, but doesn't load.   There's no longer
a /etc/init.d/cups file to start.  

edit: scheduler started when booting

doesn't except "export PRINTER commands   ( eg "PRINTER=HP940c",  "PRINTER=smb://smb://DESK/HP940c")  or lpoptions:

Code: [Select]
tc@box:~$ lpoptions -d HP940c            
lpoptions: Unknown printer or class!

edit: okay, able to export Printer  (needed to reinstall printer in cups).  Not getting "no destination" error anymore; but it's just hanging after issuing print command (getting closer).....
Title: Re: cups, samba printing
Post by: jpeters on October 06, 2009, 03:15:34 PM
Looks like it's ready, but still not printing

Code: [Select]
tc@box:~$ lpoptions -d HP940c
auth-info-required=none copies=1 device-uri=smb://DESK/HP940c finishings=3 job-hold-until=no-hold
 job-priority=50 job-sheets=none,none marker-change-time=0 media=na_letter_8.5x11in
number-up=1 printer-commands=AutoConfigure,Clean,PrintSelfTestPage printer-info
printer-is-accepting-jobs=true printer-is-shared=true printer-location printer-make-and-model='HP
Deskjet 940c Foomatic/hpijs, hpijs 2.8.12.26' printer-state=3 printer-state-change-time=1254841449
printer-state-reasons=cups-missing-filter-warning printer-type=8425500
printer-uri-supported=ipp://localhost:631/printers/HP940c sides=one-sided
tc@box:~$ lp stats.txt
request id is HP940c-2 (1 file(s))
tc@box:~$ lpr  stats.txt
tc@box:~$

Cups printer  doesn't save after a boot, even with 
 etc/cups/printers.conf
 etc/cups/ppd/HP940c.ppd
 etc/cups/cupsd.conf

Bye.....
Title: Re: cups, samba printing
Post by: jpeters on October 06, 2009, 08:38:04 PM
Loading -i -r  removes necessity of exporting PRINTER:
Code: [Select]
tc@box:~$ lpstat -d HP940c
system default destination: HP940c
HP940c-1                root              1024   Tue Oct  6 20:22:40 2009

This may all come down to permission errors. 
Title: Re: cups, samba printing
Post by: Juanito on October 06, 2009, 09:08:18 PM
Quote
The CUPS backend file /usr/local/lib/cups/backend/smb should be a symlink, typically to
/usr/local/bin/smbspool.
Let me check when I get back home - the symlink should be there.

Quote
Cups admin no longer has a print test (that I could find, anyway).
It's in a drop-down box on the "printers" tab

Quote
The CUPS 1.4 package is broken several ways.
Since there are many ways to print, I cannot test them all, but it works for me. Aside from the samba symlink, are there other problems with the extension packaging or are you speaking of bugs in cups-1.4 as compared to cups-1.3?

Quote
Cups printer  doesn't save after a boot, even with
 etc/cups/printers.conf
 etc/cups/ppd/HP940c.ppd
 etc/cups/cupsd.conf

Your printer set-up may need an extra file, could you try from scratch, using "touch mymarker", set-up printer, "find yada yada" to see which files are added when you add a printer maybe?

Quote
Loading -i -r  removes necessity of exporting PRINTER:
Does it print now?
Title: Re: cups, samba printing
Post by: jpeters on October 06, 2009, 09:38:44 PM
I found the print test.
No, still not printing.  Curious, the HP printer driver doesn't show hp in the "Add Printer" drop down list
like it used to. I have to provide PPD file.

shows up as "stopped" in cups jobs; no reason.
Code: [Select]
tc@box:~$ lp stats.txt
request id is HP940c-1 (1 file(s))


Maybe /etc/printcap, although it should be generated by the printers.conf file.

New files:
/etc/printcap
/usr/local/etc/cups/printers.conf
/usr/local/etc/cups/ppd/HP940c.ppd
/var/spool/cups/tmp
/var/run/cups/certs/0
/var/log/cups/access_log
/var/log/cups/error_log
/var/cache/cups/HP940c.ipp
/var/cache/cups/ppds.dat

edit: still no printer in cups after reboot. (after adding /etc/printcap) . Don't think adding /var files
is appropriate.
Title: Re: cups, samba printing
Post by: Juanito on October 07, 2009, 12:37:58 AM
I found the print test.
No, still not printing.  Curious, the HP printer driver doesn't show hp in the "Add Printer" drop down list
like it used to. I have to provide PPD file.

Are you using a usb connected printer? The reason I ask is that I saw somewhere that cups-1.4 had problems with some usb printers and you might need to "rmmod" the usblp module and then restart cups - you should then see your printer automatically.

Also, the cups-1.4 version of the extension does not contain foomatic-rip - it appears from posts above, you might be using a ppd that requires foomatic rip rather than choosing the "cups driver dynamic generation of the pdd" thing. If you set the logging to "debug" in cupsd.conf and restart cups, you will be able to see a lack of foomatic-rip error if this is the problem.

Did you try with hplip? My all-in-one hp printers will only work with hplip (the "hp" backend), so I cannot test the usb backend.
Title: Re: cups, samba printing
Post by: jpeters on October 07, 2009, 01:16:27 AM


Also, the cups-1.4 version of the extension does not contain foomatic-rip - it appears from posts above, you might be using a ppd that requires foomatic rip rather than choosing the "cups driver dynamic generation of the pdd" thing.
Did you try with hplip? My all-in-one hp printers will only work with hplip (the "hp" backend), so I cannot test the usb backend.

That's it, I'm using foomatic-rip, which used to work fine. I loaded the new drivers from the hplip extension, which appear in the drop-down menu. I selected HP deskjet 940c, and all looked good until I tried to test:
Code: [Select]
Print Test
unsupported format 'application/vnd.cups-banner'!

Okay, so I try to print from geany:
Code: [Select]
lpr: Unsupported format 'application/postscript'!

This looks okay
Code: [Select]
tc@box:~$ lpstat -d
system default destination: HP940c

Title: Re: cups, samba printing
Post by: Juanito on October 07, 2009, 01:27:40 AM
Code: [Select]
Print Test
unsupported format 'application/vnd.cups-banner'!
I saw that once or twice and stopping/restarting cups made it go away.

With hplip, you may need to link /usr/local/etc/hp -> /etc/hp - it appears hplip doesn't like /usr/local.

Can you confirm you're using a usb printer?
Title: Re: cups, samba printing
Post by: jpeters on October 07, 2009, 01:44:55 AM
Code: [Select]
Print Test
unsupported format 'application/vnd.cups-banner'!
I saw that once or twice and stopping/restarting cups made it go away.

With hplip, you may need to link /usr/local/etc/hp -> /etc/hp - it appears hplip doesn't like /usr/local.

Can you confirm you're using a usb printer?

How do you start/stop...there's no /etc/init.d/cups ? (they're listed as "cancelled" on cups....no controls)
The printer is usb connected to a windows desktop. I'm using samba.  
I tried the link, no change.  
Title: Re: cups, samba printing
Post by: Juanito on October 07, 2009, 11:19:08 AM
/usr/local/etc/init.d/cups stop|start|status - which is admittedly not in the info file, but is in the start-up script.
Title: Re: cups, samba printing
Post by: jpeters on October 07, 2009, 09:40:36 PM
/usr/local/etc/init.d/cups stop|start|status - which is admittedly not in the info file, but is in the start-up script.

I could swear that file was NOT there when I checked last night. I even did searches. Anyway, it's all working now.  Now to see if the configuration saves. Nothing worked last night.   
Title: Re: cups, samba printing
Post by: Juanito on October 07, 2009, 10:29:06 PM
Good news - working with cups (usb backend) or working with cups+hplip (hp backend)?
Title: Re: cups, samba printing
Post by: jpeters on October 07, 2009, 11:12:22 PM
Good news - working with cups (usb backend) or working with cups+hplip (hp backend)?

cups+hplip+hpijs_hpoj

edit: Removed hpijs_hpoj --not needed

It's even saving setup between boots now. If I've got it right, we keep hplip loaded after installing the driver....looks like a bunch of support files instead of drivers like previously.  BTW/ thanks for all the work putting this together (cups, hplip, samba, hpijs, dbus, etc, etc   ........formidable. )
Title: Re: cups, samba printing
Post by: Juanito on October 08, 2009, 12:04:32 AM
As you've probably figured out, hpoj was the predecessor of hplip, so you if you have an all-in-one printer, you need either one or the other, but not both. If you have a standard printer, you can use either cups alone or cups+hplip.

You're right, even after loading the driver you need to keep the hplip extension loaded because the driver uses the hplip hp backend instead of the cups usb backend.

There are a few benefits with hplip (even if they don't add up to 5MB) like hp-levels, hp-align, etc.
Title: Re: cups, samba printing
Post by: Juanito on October 08, 2009, 04:17:40 AM
The CUPS backend file /usr/local/lib/cups/backend/smb should be a symlink, typically to
/usr/local/bin/smbspool.

Thanks -this did indeed get lost in  the last cups update, I'll fix it shortly

Strictly speaking, I'm not sure whether it belongs in the cups or the samba extension..
Title: Re: cups, samba printing
Post by: perthie on October 08, 2009, 06:21:23 AM
/usr/local/etc/init.d/cups stop|start|status

A standard CUPS install uses the existing folder /etc/init.d for the cups startup script (see the current CUPS 1.3.8 ). When I compile CUPS, I have to use --sysconfdir=/etc to get this path correct.
Title: Re: cups, samba printing
Post by: Juanito on October 08, 2009, 06:54:56 AM
I've been trying, as far as is possible, to move extensions fully to /usr/local to make them "PPI compliant" (see wiki for definition).

There are several issues surrounding the new cups extension that I'll try to look into this weekend. One possibility I'm thinking about is to create a cups-1.3 extension if the cups extension using 1.4.1 continues to cause problems for some users.
Title: Re: cups, samba printing
Post by: perthie on October 08, 2009, 07:12:21 AM
One possibility I'm thinking about is to create a cups-1.3 extension if the cups extension using 1.4.1 continues to cause problems for some users.

Excellent idea. I have already packaged one based on the current CUPS 1.3.8. It's been tested with a variety of printers, connection methods and driver packages, and looks stable.
Title: Re: cups, samba printing
Post by: jpeters on October 08, 2009, 09:55:18 AM
/usr/local/etc/init.d/cups stop|start|status

A standard CUPS install uses the existing folder /etc/init.d for the cups startup script (see the current CUPS 1.3.8 ). When I compile CUPS, I have to use --sysconfdir=/etc to get this path correct.

Note...although the scheduler starts automatically during bootup (as seen on screen), it needs to be restarted after X loads, or you'll get a broken pipe error.  Also, it needs to be run with "sudo" (eg. "sudo /usr/local/etc/init.d/cups start").  I added to bootlocal.sh ( don't need "sudo" , everything runs root ).
Title: Re: cups, samba printing
Post by: Juanito on October 08, 2009, 10:08:41 PM
Note...although the scheduler starts automatically during bootup (as seen on screen), it needs to be restarted after X loads, or you'll get a broken pipe error.
..interesting, I wonder why that is? Where do you see the broken pipe error?
Title: Re: cups, samba printing
Post by: jpeters on October 10, 2009, 01:34:24 PM
Note...although the scheduler starts automatically during bootup (as seen on screen), it needs to be restarted after X loads, or you'll get a broken pipe error.
..interesting, I wonder why that is? Where do you see the broken pipe error?

Broken pipe error occurred printing from geany. From commandline there's no error message, just won't print.