WelcomeWelcome | FAQFAQ | DownloadsDownloads | WikiWiki

Author Topic: cups  (Read 9401 times)

Offline Juanito

  • Administrator
  • Hero Member
  • *****
  • Posts: 14814
cups
« on: September 16, 2009, 08:25:13 AM »
cups.tczl posted

As something of a test, a start-up script has been added to start the cups daemon when the extension is loaded. This will only work if the following extensions are loaded in the following order:

expat2.tczl
dbus.tczl
libcups.tczl
cups.tczl

Note:
1. For versions of tc earlier than 2.4rc1, if the above extensions are placed in /tce, the dbus and cups daemons will not start on boot as the boot process loads the extensions in alphabetical order.
2. If the above extensions and cups.tczl.dep are placed in /tce/optional (or any other folder) and the appbrowser is used to load cups.tczl, then the dbus and cups daemons will start.

Note also:
The cups.tcel extension has not been modified.

Code: [Select]
Title:          cups.tczl
Description:    cups printing system
Version:        1.4.0
Author:         see list of sites below
Original-site:  see list of sites below
Copying-policy: see list of sites below
Size: 2.91MB
Extension_by:   juanito
Comments:       cups, the standards-based, open source printing system..
                ..developed by Apple Inc. for Mac OS X and other UNIX-like..
                ..operating systems
                ----------
                requires the expat2, dbus and libcups extensions
                if the expat2, dbus and libcups extensions are loaded in..
                that order, the cups daemon will automatically start.
                ----------
                howto:
                the root password needs to be set perform admin tasks with..
                ..the browser interface
                http://localhost:631 will start the browser interface
                To persist across boots, add the following to your backup:
                /etc/cups/printers.conf
                /etc/cups/cupsd.conf (only if you changed it)
                ----------
                This extension contains:
                cups-1.4.0 - GPLv2 - http://ftp.easysw.com/pub/cups/1.4.0/cups-1.4.0-source.tar.bz2
Change-log:     2008/09/06
                Updated menu item/icon
                Added smb backend for samba
                Added cups windows drivers in /usr/local/share/cups/drivers
                2009/01/30
                Modified foomatic filters for perl in /usr/local/bin
                2009/03/13
                upgraded to cups-1.4 and added start-up script
                compiled to use dynamic printer drivers
                removed foomatic-rip, split out libcups
Current:        2009/09/16
« Last Edit: September 21, 2009, 03:49:20 AM by Juanito »

Offline perthie

  • Full Member
  • ***
  • Posts: 118
Re: cups
« Reply #1 on: September 21, 2009, 01:18:08 PM »
How should this work in 2.4rc1? When I try to add a printer, the Add Printer dialog is duplicated on the web page and the top half is hung up with "Looking for Printers...".

Offline Juanito

  • Administrator
  • Hero Member
  • *****
  • Posts: 14814
Re: cups
« Reply #2 on: September 21, 2009, 01:59:58 PM »
What kind of printer are you using - usb, parallel, network connected?

I tested with two different hp usb printers via hplip and the printers were found automatically. If you go to the next screen, you can enter a uri manually.

Offline perthie

  • Full Member
  • ***
  • Posts: 118
Re: cups
« Reply #3 on: September 21, 2009, 02:30:49 PM »
I have both a local USB printer and a networked printer. CUPS 1.4 can't detect either, while 1.3.8 detects and sets up both.  When I manually set up the networked printer and try a test page, it comes out blank. This is a clean install of TC 2.4rc1 with the extensions loading into RAM. I can see the dbus daemon running.

BTW, Ghostscript is not listed as a dependency.

I brought cups.1.3.8 over from TC 2.3.1 and it works fine.






« Last Edit: September 22, 2009, 08:58:26 AM by perthie »

Offline perthie

  • Full Member
  • ***
  • Posts: 118
Re: cups
« Reply #4 on: September 21, 2009, 02:52:43 PM »
Correction: The network printer was detected. The hangup seems to be with finding USB devices.

Also, the folder /usr/local/lib/cups has been given tc:staff ownership.  CUPS 1.4 complains if the printer filters are not owned by root.


Offline Juanito

  • Administrator
  • Hero Member
  • *****
  • Posts: 14814
Re: cups
« Reply #5 on: September 21, 2009, 11:34:49 PM »
Correction: The network printer was detected. The hangup seems to be with finding USB devices.
Ah - that could be because I didn't put usb-utils as a dep. could you try again with usb-utils loaded? Does the network printer work now (perhaps with gs loaded)?

Quote
Also, the folder /usr/local/lib/cups has been given tc:staff ownership.  CUPS 1.4 complains if the printer filters are not owned by root.

I didn't change anything in terms of ownwership - note that user/group is set as tc/staff in the cups ./configure
« Last Edit: September 21, 2009, 11:37:31 PM by Juanito »

Offline jpeters

  • Restricted
  • Hero Member
  • *****
  • Posts: 1017
Re: cups
« Reply #6 on: September 22, 2009, 12:45:02 AM »
Correction: The network printer was detected. The hangup seems to be with finding USB devices.
Ah - that could be because I didn't put usb-utils as a dep. could you try again with usb-utils loaded? Does the network printer work now (perhaps with gs loaded)?

Quote
Also, the folder /usr/local/lib/cups has been given tc:staff ownership.  CUPS 1.4 complains if the printer filters are not owned by root.

I didn't change anything in terms of ownwership - note that user/group is set as tc/staff in the cups ./configure

For cups.tczl it's root:staff

Offline Juanito

  • Administrator
  • Hero Member
  • *****
  • Posts: 14814
Re: cups
« Reply #7 on: September 22, 2009, 12:52:24 AM »
One other thing to note is that I have tested this latest version of cups with cups printer drivers as opposed to ppd files.

For this reason, the latest cups extension no longer contains foomatic-rip (although I have compiled, but not posted, the "C" version that depends on libgs) - I don't think this would affect the discovery of usb connected printers, but you might need to hunt down the cups driver for your printer.

Offline perthie

  • Full Member
  • ***
  • Posts: 118
Re: cups
« Reply #8 on: September 22, 2009, 07:55:00 AM »
I would recommend that the new repo for TC 2.4 have two printer packages - the reliable CUPS 1.3.8 that supports a wide range of printers, and the experimental CUPS 1.4.

BTW, it is possible to compile HPLIP for CUPS 1.3.x with dynamic PPDs.


Offline Juanito

  • Administrator
  • Hero Member
  • *****
  • Posts: 14814
Re: cups
« Reply #9 on: September 22, 2009, 09:17:28 AM »
I would recommend that the new repo for TC 2.4 have two printer packages - the reliable CUPS 1.3.8 that supports a wide range of printers, and the experimental CUPS 1.4

I take it you didn't have any luck with cups-1.4 finding your usb printer?

We could do as you suggest for cups-1.3.8 once tc-2.4 is final - the tcel extension is still availble.

I just finished compiling cups-1.4.1, which apparently fixes a couple of usb bugs...

Offline Juanito

  • Administrator
  • Hero Member
  • *****
  • Posts: 14814
Re: cups
« Reply #10 on: September 22, 2009, 09:43:30 AM »
updated cups posted:
Code: [Select]
Title:          cups.tczl
Description:    cups printing system
Version:        1.4.1
Author:         see list of sites below
Original-site:  see list of sites below
Copying-policy: see list of sites below
Size: 2.91MB
Extension_by:   juanito
Comments:       cups, the standards-based, open source printing system..
                ..developed by Apple Inc. for Mac OS X and other UNIX-like..
                ..operating systems
                ----------
                requires the expat2, dbus and libcups extensions
                if the expat2, dbus and libcups extensions are loaded in..
                that order, the cups daemon will automatically start.
                ----------
                howto:
                the root password needs to be set perform admin tasks with..
                ..the browser interface
                http://localhost:631 will start the browser interface
                To persist across boots, add the following to your backup:
                /etc/cups/printers.conf
                /etc/cups/cupsd.conf (only if you changed it)
                ----------
                This extension contains:
                cups-1.4.1 - GPLv2 - http://ftp.easysw.com/pub/cups/1.4.1/cups-1.4.1-source.tar.bz2
Change-log:     2008/09/06
                Updated menu item/icon
                Added smb backend for samba
                Added cups windows drivers in /usr/local/share/cups/drivers
                2009/01/30
                Modified foomatic filters for perl in /usr/local/bin
                2009/03/13
                upgraded to cups-1.4 and added start-up script
                compiled to use dynamic printer drivers
                removed foomatic-rip, split out libcups
                2009/09/16
                updated 1.4 -> 1.4.1, moved /etc/cups -> /usr/local
Current:        2009/09/22

Offline Juanito

  • Administrator
  • Hero Member
  • *****
  • Posts: 14814
Re: cups
« Reply #11 on: September 22, 2009, 10:01:56 AM »
..and it seems there is still a problem with usb printers and cups-1.4.1.

I cannot test this as both of my printers use the "hp" backend, but several people have suggested "sudo rmmod usblp" before starting cups.

Offline Juanito

  • Administrator
  • Hero Member
  • *****
  • Posts: 14814
Re: cups
« Reply #12 on: October 09, 2009, 06:49:34 AM »
I updated the extension by adding back the smb backend symlink to samba that got lost from the previous extension.

I tested the latest extension in two ways:

1. Directly connected to an hp usb all-in-one printer using cups+hplip

the cups browser interface finds the printer automatically and prints without problems.

2. Remotely connected to the same all-in-one printer shared by cups over a local network.

the cups browser interface does not find the shared printer, but the following command added the shared printer, which printed without problems thereafter:
Code: [Select]
$ sudo lpadmin -p OfficeJetG85 -E -v ipp://192.168.1.100/printers/OfficeJetG85note that an error in cupsd.conf may be preventing the browser interface from seeing the shared printer.

As the cups usb backend cannot print to hp all-in-one printers, I cannot test it, so I'd appreciate feedback from users with usb printers.

To aid in trouble-shooting, here's what I get for a number of related commands:
Code: [Select]
$ lsmod | grep usb
usblp                   6556  0

$ lsusb
...
Bus 004 Device 003: ID 03f0:0211 Hewlett-Packard OfficeJet G85

$ ls -l /dev/bus/usb/*/*
...
crw-rw-r--    1 tc       staff    189, 385 Oct  9 13:18 /dev/bus/usb/004/003

$ /usr/local/lib/cups/backend/hp
direct hp:/usb/OfficeJet_G85?serial=SGG13E0C49VL "HP OfficeJet G85" "HP OfficeJet
G85 USB SGG13E0C49VL HPLIP" "MFG:Hewlett-Packa;MDL:OfficeJetG85;
CLS:PRINTER;DES:OfficeJet G85;SN:SGG13E0C49VL;"

$ sudo /usr/local/lib/cups/backend/usb [cups-1.4.1 usblp loaded or unloaded]
DEBUG: list_devices
DEBUG: usb_find_busses=5
DEBUG: usb_find_devices=12

$ sudo /usr/local/lib/cups/backend/usb [cups-1.3.8 usblp loaded]
direct usb://HP/OfficeJet%20G85?serial=SGG13E0C49VL "HP OfficeJet G85" "HP
OfficeJet G85 USB #1" "MFG:Hewlett-Packard;MDL:OfficeJetG85;
CMD:MLC,PCL,PML,SCL;CLASS:PRINTER;DESCRIPTION:Hewlett-Packard OfficeJet G
Series;1284.3M:f7f,f7f;1284.4DL:4d,4e,1;SERN:SGG13E0C49VL;VSTATUS:$HB0$NC0ff,
DN,IDLE,CUT,K1,C0,SM,NR,KP000,CP029;AiO:0;DW-PCL;"

Code: [Select]
Title:          cups.tczl
Description:    cups printing system
Version:        1.4.1
Author:         see list of sites below
Original-site:  see list of sites below
Copying-policy: see list of sites below
Size: 2.91MB
Extension_by:   juanito
Comments:       cups, the standards-based, open source printing system..
                ..developed by Apple Inc. for Mac OS X and other UNIX-like..
                ..operating systems
                ----------
                requires the expat2, dbus and libcups extensions
                if the expat2, dbus and libcups extensions are loaded in..
                that order, the cups daemon will automatically start.
                ----------
                howto:
                the root password needs to be set perform admin tasks with..
                ..the browser interface
                http://localhost:631 will start the browser interface
                To persist across boots, add the following to your backup:
                /usr/local/etc/cups/ppd/HP_OfficeJet_G85.ppd [for example]
                /etc/cups/printers.conf
                /etc/cups/cupsd.conf (only if you changed it)
                ----------
                This extension contains:
                cups-1.4.1 - GPLv2 - http://ftp.easysw.com/pub/cups/1.4.1/cups-1.4.1-source.tar.bz2
Change-log:     2008/09/06
                Updated menu item/icon
                Added smb backend for samba
                Added cups windows drivers in /usr/local/share/cups/drivers
                2009/01/30
                Modified foomatic filters for perl in /usr/local/bin
                2009/03/13
                upgraded to cups-1.4 and added start-up script
                compiled to use dynamic printer drivers
                removed foomatic-rip, split out libcups
                2009/09/16
                updated 1.4 -> 1.4.1, moved /etc/cups -> /usr/local
                2009/09/22
                added samba backend symlink
Current:        2009/10/09
« Last Edit: October 09, 2009, 07:24:20 AM by Juanito »

Offline perthie

  • Full Member
  • ***
  • Posts: 118
Re: cups
« Reply #13 on: October 09, 2009, 10:20:07 AM »
Quote
As the cups usb backend cannot print to hp all-in-one printers, I cannot test it, so I'd appreciate feedback from users with usb printers.

I tried compiling CUPS 1.3.11, which I have done successfully in Puppy. But when I ran it in TC, I had the same problem as your CUPS 1.4 - USB printers are not detected.

When the Puppy team upgraded CUPS from 1.1x to 1.3x, there was an issue with udev rules. I tried to duplicate those rules in TC, without success.

When I check lsusb, my USB printer is listed, but CUPS cannot see it.  The device node /dev/usb/lp0 is present.  IIRC, it was necessary for the node to have "0666" permissions.

CUPS 1.3.8 DOES detect my printer.

« Last Edit: October 09, 2009, 10:32:49 AM by perthie »

Offline Juanito

  • Administrator
  • Hero Member
  • *****
  • Posts: 14814
Re: cups
« Reply #14 on: October 09, 2009, 11:24:05 AM »
did you compile with "--cups-user=tc --cups-group=staff"?

I just compiled cups-1.3.11 and the usb backend gave the same output as cups-1.3.8, which would tend to indicate that it would work.