WelcomeWelcome | FAQFAQ | DownloadsDownloads | WikiWiki

Author Topic: Cups Print Server  (Read 24282 times)

Offline remus

  • Sr. Member
  • ****
  • Posts: 371
Re: Cups Print Server
« Reply #15 on: April 05, 2011, 08:56:52 AM »
Update on cups.

I've set hplip as a onboot item.

I've got cups1331 installed and all the files I need are setup in /etc/cups

When I try to install the printer via the cups gui interface.
- I click add printer
- hp printer is available in the list so I select it and click continue
- i'm presented with screen asking me to setup the ipp network link... NOT a driver selection screen.

I assumed at this stage that the problem might be with the old version of cups.
So I removed cups1331 from onboot in appaudit and swaped it for the uptodate cups extension.

my root password was already setup so did not need to do that.
If I try to setup the printer with hplip 2-6 I get the same problem as I did with cups1331.
If I try to setup the printer with hplip 2-7 I get a screen asking me to select manufacturer and then the driver. I set some default printer options, and I'm done. BUT if I try to do a print test, I get an error.

/usr/libexec/cups/filter/hpcups failed
« Last Edit: April 05, 2011, 09:08:48 AM by remus »
Live long and prosper.

Offline Juanito

  • Administrator
  • Hero Member
  • *****
  • Posts: 14819
Re: Cups Print Server
« Reply #16 on: April 05, 2011, 11:29:53 PM »
I'm using cups with hplip-2.7 as the family shared printer/scanner, a couple of comments/questions:

1. What sort of hp printer are you using - parallel port, usb, network?

2. when cups is used with hplip, the browser interface will automatically propose the correct cups hp driver for your printer - this driver in turn will automatically create the ppd file for your device.

3. if you execute /usr/local/lib/cups/filter/hpcups from the command line, does it show an error message?

Offline remus

  • Sr. Member
  • ****
  • Posts: 371
Re: Cups Print Server
« Reply #17 on: April 06, 2011, 01:47:46 AM »
Quote
1. What sort of hp printer are you using - parallel port, usb, network?
Its a HP T45 with a parallel port connector, the printer works fine when served from a windows xp home machine.

Quote
2. when cups is used with hplip, the browser interface will automatically propose the correct cups hp driver for your printer - this driver in turn will automatically create the ppd file for your device.
Method
boot: tinycorelinux 3.5.1 cd
settings on usb flash drive
extensions (cups, hplip 2-7, minefield, nano) on flash drive

When trying this on the old P2 333Mhz pc
- Boot into tinycorelinux
- start minefield
- access localhost:631
- Click Administration
- enter user:root, password: *****
- Click Add Printer
Printer is listed as : HP Printer (HPLIP)
- Select > HP Printer (HPLIP) > click Continue
I am presented with the following page, instead of a driver selection list.
Code: [Select]
Examples:

    http://hostname:631/ipp/
    http://hostname:631/ipp/port1

    ipp://hostname/ipp/
    ipp://hostname/ipp/port1

    lpd://hostname/queue

    socket://hostname
    socket://hostname:9100
Hmmm, seems that cups is not detecting the printer as a locally connected printer, but a network printer. The printer is connected via Parallel port.
So at this stage the printer is not installed.

I will attach the printer to another computer running a much more modern P4 system and post results.

Quote
3. if you execute /usr/local/lib/cups/filter/hpcups from the command line, does it show an error message?
If I run  /usr/local/lib/cups/filter/hpcups or sudo /usr/local/lib/cups/filter/hpcups
I get
Code: [Select]
prnt/hpcups/HPCupsFilter.cpp 46: ERROR: /usr/local/lib/cupsfilter/hpcups job-id usr title copies options {file]
Just discovered hp-setup and hp-prove

hp-probe gets the following results
Prompt: select connection I/O type
Input: I select 2 for Parallel Port LPT:
Output:  Device Discovery
warning: No devices found on the 'par' bux. If this isn't the result you are expecting, warning: check to make sure your devices are properly connected and powered on.

I'm guessing that the problem with the older computer is that the bios is not set to this printer.
I will experiment with the parallel port bios options and report back.
Live long and prosper.

Offline Juanito

  • Administrator
  • Hero Member
  • *****
  • Posts: 14819
Re: Cups Print Server
« Reply #18 on: April 06, 2011, 01:56:07 AM »
Is the "lp" kernel driver loaded (check lsmod)? I believe it may need to be loaded manually and might need to be loaded on boot.

You might also need the ieee1284 extension
« Last Edit: April 06, 2011, 01:58:58 AM by Juanito »

Offline SamK

  • Hero Member
  • *****
  • Posts: 713
Re: Cups Print Server
« Reply #19 on: April 06, 2011, 02:11:33 AM »
In addition to the BIOS being correctly configured this topic may help...
http://forum.tinycorelinux.net/index.php?topic=9112.0
   

Offline remus

  • Sr. Member
  • ****
  • Posts: 371
Re: Cups Print Server
« Reply #20 on: April 06, 2011, 02:58:43 AM »
thanks to both SamK  and Juanito,

Here is current progress.
Running sudo modprobe lp does not do the trick, but thanks to both of your posts, I googled around and found the following similar idea

sudo modprobe parport_pc
I've added "sudo modprobe parport_pc" to my /opt/bootlocal.sh file BEFORE cups

Accessing add printer in cups now shows the following option
* HP OfficeJet T Series LPT parport0 HPLIP (HP OfficeJet T Series)
I select that option and click continue
I use default options for Name, description, location, click share this printer
click continue

Make is preset to: HP
Model is preset to : HP OfficeJet T Series, HPCups 3.1.6 (en)
I searched the list for specific options for HP Officejet T45 but there is none, so I go with default
I click Add Printer button
Next page is about general default options.
I change media size: to A4
And click Set Default Options, leaving all else default

I click maintenance drop down> and select Print Test Page

Under Jobs it shows
Code: [Select]
HP_OfficeJet_T_Series-1  Test Page  root  1k  Unknown  stopped
"/usr/local/lib/cups/filter/pstoraster failed"

With this progress I tried
/usr/local/lib/cups/filter/hpcups
again with the same error

prnt/hpcups/HPCupsFilter.cpp 46: ERROR: /usr/local/lib/cupsfilter/hpcups job-id usr title copies options {file]
Live long and prosper.

Offline Juanito

  • Administrator
  • Hero Member
  • *****
  • Posts: 14819
Re: Cups Print Server
« Reply #21 on: April 06, 2011, 03:16:09 AM »
It definitely looks like progress is being made.

I'd guess that either pstoraster is missing the ghostscript or ghostscript_common extensions or that hpcups is missing dbus_python-2.7 or one of its deps.

Is there anything in the cups error log if you set logging to "debug" in cupsd.conf?

Offline SamK

  • Hero Member
  • *****
  • Posts: 713
Re: Cups Print Server
« Reply #22 on: April 06, 2011, 03:55:47 AM »
As mentioned in another recent post on printing, rather than seeking the most minimalist set-up, I prefer one that gives (me) the fewest problems.  To that end my standard printing arrangements include loading:
  • ghostscript
  • ghostscript_common
  • poppler-bin

On a slightly different aspect...
Running sudo modprobe lp does not do the trick...

sudo modprobe parport_pc
I've added "sudo modprobe parport_pc" to my /opt/bootlocal.sh file BEFORE cups
The machines here are a range of different manufacturers and models.  Explicitly loading parport_pc has not been needed on any of them; it has been automatically loaded by TC at boot-up.  I have always accepted this as an indicator that the module is enabled in TC and loaded as standard.  Perhaps one of the devs may comment.  The lp module, however, is not enabled by default and manual loading is conducted.

Just musing out loud here...
  • As you find it necessary to manually load parport_pc does this point to some form of contention between the BIOS settings and TC?
  • Should loading the lp module also be conducted as you are using a parallel connection?
 
« Last Edit: April 06, 2011, 03:57:47 AM by SamK »

Offline curaga

  • Administrator
  • Hero Member
  • *****
  • Posts: 11044
Re: Cups Print Server
« Reply #23 on: April 06, 2011, 10:26:05 AM »
FWIW, the lp module is not autoloaded, because it might conflict with newer cups (do I remember this right? Juanito?).
The only barriers that can stop you are the ones you create yourself.

Offline Juanito

  • Administrator
  • Hero Member
  • *****
  • Posts: 14819
Re: Cups Print Server
« Reply #24 on: April 06, 2011, 08:15:11 PM »
it's usblp that causes the problem (or perhaps used to cause the problem) with the cups usb backend

Offline remus

  • Sr. Member
  • ****
  • Posts: 371
Re: Cups Print Server
« Reply #25 on: April 07, 2011, 02:33:29 AM »
Hi all,

I've added the following to OnBoot in AppsAudit
ghostscript.tcz <- already downloaded
ghostscript_common.tcz <- had to download this
poppler-bin.tcz <- had to download this


While tinycorelinux is booting I think I see what might be an error for dbus_daemon or something, its only for a split second, so am not sure exactly, I 'll have a look at the boot options and see if there is a way to keep a log of boot messages.


Here is the contents of /var/log/cups/error_log once tinycore linux is booted, but before I open the cups interface via minefield at localhost:631
Code: [Select]
I [07/Apr/2011:16:15:19 +0000] Listening to 0.0.0.0:631 (IPv4)
I [07/Apr/2011:16:15:19 +0000] Listening to :::631 (IPv6)
I [07/Apr/2011:16:15:19 +0000] Listening to /var/run/cups/cups.sock (Domain)
I [07/Apr/2011:16:15:19 +0000] Remote access is enabled.
D [07/Apr/2011:16:15:19 +0000] Added auto ServerAlias box
D [07/Apr/2011:16:15:19 +0000] Added auto ServerAlias localhost
I [07/Apr/2011:16:15:19 +0000] Loaded configuration file "/usr/local/etc/cups/cupsd.conf"
D [07/Apr/2011:16:15:19 +0000] Creating missing directory "/var/spool/cups"
D [07/Apr/2011:16:15:19 +0000] Repairing ownership of "/var/spool/cups"
D [07/Apr/2011:16:15:19 +0000] Repairing access permissions of "/var/spool/cups"
D [07/Apr/2011:16:15:19 +0000] Creating missing directory "/var/cache/cups"
D [07/Apr/2011:16:15:19 +0000] Repairing ownership of "/var/cache/cups"
D [07/Apr/2011:16:15:19 +0000] Repairing access permissions of "/var/cache/cups"
D [07/Apr/2011:16:15:19 +0000] Creating missing directory "/var/cache/cups/rss"
D [07/Apr/2011:16:15:19 +0000] Repairing ownership of "/var/cache/cups/rss"
D [07/Apr/2011:16:15:19 +0000] Repairing access permissions of "/var/cache/cups/rss"
D [07/Apr/2011:16:15:19 +0000] Creating missing directory "/var/run/cups"
D [07/Apr/2011:16:15:19 +0000] Repairing ownership of "/var/run/cups"
D [07/Apr/2011:16:15:19 +0000] Repairing access permissions of "/var/run/cups"
D [07/Apr/2011:16:15:19 +0000] Creating missing directory "/var/run/cups/certs"
D [07/Apr/2011:16:15:19 +0000] Repairing ownership of "/var/run/cups/certs"
D [07/Apr/2011:16:15:19 +0000] Repairing access permissions of "/var/run/cups/certs"
I [07/Apr/2011:16:15:19 +0000] Using default TempDir of /var/spool/cups/tmp...
D [07/Apr/2011:16:15:19 +0000] Creating missing directory "/var/spool/cups/tmp"
D [07/Apr/2011:16:15:19 +0000] Repairing ownership of "/var/spool/cups/tmp"
D [07/Apr/2011:16:15:19 +0000] Repairing access permissions of "/var/spool/cups/tmp"
I [07/Apr/2011:16:15:19 +0000] Configured for up to 100 clients.
I [07/Apr/2011:16:15:19 +0000] Allowing up to 100 client connections per host.
I [07/Apr/2011:16:15:19 +0000] Using policy "default" as the default!
I [07/Apr/2011:16:15:19 +0000] Full reload is required.
I [07/Apr/2011:16:15:19 +0000] Loaded MIME database from "/usr/local/share/cups/mime" and "/usr/local/etc/cups": 35 types, 45 filters...
D [07/Apr/2011:16:15:19 +0000] Loading printer HP_OfficeJet_T_Series...
D [07/Apr/2011:16:15:19 +0000] cupsdMarkDirty(P-----)
D [07/Apr/2011:16:15:19 +0000] cupsdSetBusyState: Dirty files
D [07/Apr/2011:16:15:19 +0000] load_ppd: Loading /usr/local/etc/cups/ppd/HP_OfficeJet_T_Series.ppd...
D [07/Apr/2011:16:15:19 +0000] load_ppd: Saving /var/cache/cups/HP_OfficeJet_T_Series.ipp4...
D [07/Apr/2011:16:15:19 +0000] cupsdRegisterPrinter(p=0xb8a1cab0(HP_OfficeJet_T_Series))
I [07/Apr/2011:16:15:19 +0000] Generating printcap /etc/printcap...
D [07/Apr/2011:16:15:19 +0000] Scanning /var/spool/cups for jobs...
I [07/Apr/2011:16:15:19 +0000] Full reload complete.
D [07/Apr/2011:16:15:19 +0000] cupsd_clean_files(path="/var/spool/cups/tmp", pattern="(null)")
I [07/Apr/2011:16:15:19 +0000] Cleaning out old files in "/var/spool/cups/tmp"...
D [07/Apr/2011:16:15:19 +0000] cupsd_clean_files(path="/var/cache/cups", pattern="*.ipp")
I [07/Apr/2011:16:15:19 +0000] Cleaning out old files in "/var/cache/cups"...
I [07/Apr/2011:16:15:19 +0000] Listening to 0.0.0.0:631 on fd 4...
E [07/Apr/2011:16:15:19 +0000] Unable to open listen socket for address :::631 - Address family not supported by protocol.
I [07/Apr/2011:16:15:19 +0000] Listening to /var/run/cups/cups.sock on fd 6...
I [07/Apr/2011:16:15:19 +0000] Resuming new connection processing...
D [07/Apr/2011:16:15:19 +0000] cupsdRegisterPrinter(p=0xb8a1cab0(HP_OfficeJet_T_Series))
D [07/Apr/2011:16:15:19 +0000] Discarding unused server-started event...
D [07/Apr/2011:16:15:20 +0000] cupsdNetIFUpdate: "lo" = localhost:631
D [07/Apr/2011:16:15:20 +0000] Report: clients=0
D [07/Apr/2011:16:15:20 +0000] Report: jobs=0
D [07/Apr/2011:16:15:20 +0000] Report: jobs-active=0
D [07/Apr/2011:16:15:20 +0000] Report: printers=1
D [07/Apr/2011:16:15:20 +0000] Report: printers-implicit=0
D [07/Apr/2011:16:15:20 +0000] Report: stringpool-string-count=4944
D [07/Apr/2011:16:15:20 +0000] Report: stringpool-alloc-bytes=8008
D [07/Apr/2011:16:15:20 +0000] Report: stringpool-total-bytes=94480
D [07/Apr/2011:16:15:46 +0000] process_browse_data: hpt-1@10.1.1.100 not found...
D [07/Apr/2011:16:15:46 +0000] Added remote printer "hpt-1"...
D [07/Apr/2011:16:15:46 +0000] Discarding unused printer-added event...
D [07/Apr/2011:16:15:46 +0000] cupsdMarkDirty(---p--)
D [07/Apr/2011:16:15:46 +0000] cupsdMarkDirty(--R---)
D [07/Apr/2011:16:15:46 +0000] cupsdMarkDirty(--Rp--)
D [07/Apr/2011:16:15:46 +0000] cupsdRegisterPrinter(p=0xb8a243b8(hpt-1))
I [07/Apr/2011:16:15:50 +0000] Saving printers.conf...
D [07/Apr/2011:16:15:50 +0000] Saving remote.cache...
I [07/Apr/2011:16:15:50 +0000] Generating printcap /etc/printcap...
D [07/Apr/2011:16:15:50 +0000] cupsdSetBusyState: Not busy
D [07/Apr/2011:16:16:17 +0000] process_browse_data: hpt-1@10.1.1.100 not found...
D [07/Apr/2011:16:16:22 +0000] cupsdNetIFUpdate: "lo" = localhost:631
D [07/Apr/2011:16:16:22 +0000] cupsdNetIFUpdate: "eth0" = 10.1.1.202:631
D [07/Apr/2011:16:16:22 +0000] Report: clients=0
D [07/Apr/2011:16:16:22 +0000] Report: jobs=0
D [07/Apr/2011:16:16:22 +0000] Report: jobs-active=0
D [07/Apr/2011:16:16:22 +0000] Report: printers=2
D [07/Apr/2011:16:16:22 +0000] Report: printers-implicit=0
D [07/Apr/2011:16:16:22 +0000] Report: stringpool-string-count=4996
D [07/Apr/2011:16:16:22 +0000] Report: stringpool-alloc-bytes=8400
D [07/Apr/2011:16:16:22 +0000] Report: stringpool-total-bytes=95720
D [07/Apr/2011:16:16:48 +0000] process_browse_data: hpt-1@10.1.1.100 not found...
D [07/Apr/2011:16:17:19 +0000] process_browse_data: hpt-1@10.1.1.100 not found...

I now access admin and print test page, it works.

Have not yet tried printing from a windows computer, will try this tomorrow, they are shutting down work now.
Live long and prosper.

Offline Juanito

  • Administrator
  • Hero Member
  • *****
  • Posts: 14819
Re: Cups Print Server
« Reply #26 on: April 07, 2011, 02:41:00 AM »
ghostscript_common.tcz <- had to download this

I'm guessing that was the problem, i.e. that pstoraster needs gs, which in turn needs gs_init.ps in this context, which is in ghostscript_common

Quote
While tinycorelinux is booting I think I see what might be an error for dbus_daemon or something, its only for a split second, so am not sure exactly, I 'll have a look at the boot options and see if there is a way to keep a log of boot messages.

Although libcups depends on dbus, I don't believe the daemon needs to be running for basic printing services (hplip fax requires it though). You can probably see the error message in dmesg, if not you could use the "syslog" boot code and look in /var/log/messages

Quote
I now access admin and print test page, it works.

Great  :)

Offline remus

  • Sr. Member
  • ****
  • Posts: 371
Re: Cups Print Server
« Reply #27 on: April 07, 2011, 05:07:33 AM »
Yeah its great to see it working.

Quote
Just musing out loud here...
As you find it necessary to manually load parport_pc does this point to some form of contention between the BIOS settings and TC?

That is possible, I've tried tinycore linux boot cd 3.5.1 on a modern p4 computer and I had no trouble adding the printer via cups and hplip 2.-7, the same p4 computer still could not print but I'll try ghostscript_common.tcz OnBoot on that computer as well. I will also check on the modern computer with lsmod if the required lp and par ports are detected on boot.

I think the old P2 333Mhz pc and its ancient motherboard may be part of the problem, ghostscript_common was the rest.

Will do some further testing and report back, for example, i'll try removing (poppler-bin.tcz , ghostscript.tcz)

Quote
I'm guessing that was the problem, i.e. that pstoraster needs gs, which in turn needs gs_init.ps in this context, which is in ghostscript_common
Juanito - I am wondering if my problem was unique to a old HP T45 Printer ? Or should ghostscript_common be added as a dependency of cups ?
Live long and prosper.

Offline SamK

  • Hero Member
  • *****
  • Posts: 713
Re: Cups Print Server
« Reply #28 on: April 07, 2011, 07:04:54 AM »
...with lsmod if the required lp and par ports are detected on boot.

I think the old P2 333Mhz pc and its ancient motherboard may be part of the problem, ghostscript_common was the rest.
It is certainly possible to run it on kit of this this age as I have a test-rig of similar spec on which it runs flawlessly.

Where the age may be a relevant factor is the BIOS configuration options that were available when the machine was produced. This is what I was referring to in the earlier musings.

My understanding is that where appropriate and possible TC will automatically load the parport_pc kernel module at boot-up as shown by
Code: [Select]
lsmod | grep parport_pc
In this context
  • appropriate could be taken as a working parallel connector
  • possible might be taken as suitably configured

In venerable PCs such as this there are frequently BIOS settings to control
1. Whether IRQs are fixed or dynamically-auto-handled
2. Whether the parallel port is enabled/disabled
3. The mode in which the parallel port operates
4. The memory address and IRQ the parallel port uses

My initial preference here is one that I have found works most often:
1. = Dynamically-auto-handled
2. = Enabled
3. = EPP
4. = 378H/IRQ7
   

Offline remus

  • Sr. Member
  • ****
  • Posts: 371
Re: Cups Print Server
« Reply #29 on: April 07, 2011, 08:26:05 AM »
I remember seeing the following settings in the bios related to the parallel port
enabled/disabled
ECP, EPP, SPP
mine was set to ECP, and I did not see any auto detect setting, i'll try your suggested bios settings and let you know how I go.

Its possable that I may have made some mistake when tinkering with settings saved on my flash drive, so i'll boot the old pc up with just the tinycore linux boot cd and check with:
Code: [Select]
lsmod | grep lpand
Code: [Select]
lsmod | grep parport_pc
Live long and prosper.