WelcomeWelcome | FAQFAQ | DownloadsDownloads | WikiWiki

Author Topic: CUPS USB Printing Issues  (Read 5920 times)

Offline Falco

  • Newbie
  • *
  • Posts: 10
CUPS USB Printing Issues
« on: February 11, 2015, 08:42:31 AM »
Hello, I am working on integrating a Citrix Receiver installation with TinyCorePlus and hit a snag where I can't print to any printers that are connected via USB (NOTE: They are detected on USB). I have installed the printer drivers, via the instructions from here: *link omitted* In addition to trying the PPD, and official Brother (HL-220DW) LPR drivers.

To further clarify, I am not looking for network printing functionality as this is not the issue. USB local printing is the only thing that doesn't seem to work with this CUPS setup. Is there any additional steps that might help in this endeavor?

Thanks.
« Last Edit: February 11, 2015, 08:56:00 AM by Falco »

Offline Juanito

  • Administrator
  • Hero Member
  • *****
  • Posts: 14851
Re: CUPS USB Printing Issues
« Reply #1 on: February 11, 2015, 10:20:19 AM »
What does the cups error log say?

It might be worth trying ldd on any brother printer executables to see if there are any missing deps.

Offline Falco

  • Newbie
  • *
  • Posts: 10
Re: CUPS USB Printing Issues
« Reply #2 on: February 16, 2015, 11:04:18 AM »
What I did to get my Brother HL-2270DW printer working in Tiny Core 6.x. I believe this method will work for a variety of other printers as well.
*** Strongly recommend you read the entire solution before making an attempt. ***

I used the "Apps" application (6.x repository) to install the required base for general printing:
- cups
- foomatic-rip
- firefox
- bash

For me, this is where the trick came into play. I had to use a browser to navigate to the 2.x/3.x TinyCore repository and manually download the hpijs-dynppds.tcz file.
- Download hpijs-dynppds.tcz
- "tce-load -i hpijs-dynppds.tcz" (without the '-w' so you don't need to worry about the wget or checksum)
- "mv hpijs-dynppds.tcz /mnt/sda1/tce/optional/" (to keep is persistent for future boots)
- Add "hpijs-dynppds.tcz" into /mnt/sda1/tce/onboot.lst (to load on future boots)

Adjust the permissions for CUPS. I was consistently warned about permissions issues)
- "chown root:root /usr/local/lib/cups/*"

I copied all of the symbolic links directly into the folders. It was only required for backend and filter.
- "cd /usr/local/lib/cups/backend/"
- "cp -rfH /usr/local/lib/cups/backend/* ."

- "cd /usr/local/lib/cups/filter/"
- "cp -rfH /usr/local/lib/cups/filter/* ."

The CUPS logs, complained about a missing symbolic link "libpoppler.so.37". I was unable to find this library in Tiny Core.
- "cd /usr/lib/" (the directory that needs to contain the library)
- "ln -s /usr/local/lib/libpoppler.so.50" (create a symbolic link to a similar library)
- "mv libpoppler.so.50 libpoppler.so.37" (rename the link so CUPS can find it)

Set the root password to gain easy access to the CUPS server.
- "sudo su" (to get root)
- "passwd" (once root has been obtained)

Set CUPS to start on boot
- "cd /home/tce/X.d/"
- "touch my-init"
- "chmod a+x my-init"
- Add to "my-init"
-- "#!/bin/sh"
-- "sudo /usr/local/etc/init.d/cups start"

Adjusted the list so all of my changes would persist for future boots.
Added to /opt/.filetool.lst:
- "etc/shadow" (saves the root password that is used to gain access to the CUPS server)
- "usr/lib/libpoppler.so.37" (save the missing library for CUPS)
- "usr/local/etc/init.d/cups" (not sure if this persists, I thought I would be safe)
- "usr/local/etc/init.d/dbus" (not sure if this persists, I thought I would be safe)
- "usr/local/etc/cups" (saves CUPS & printer configurations)
- "usr/local/lib/cups" (saves the permissions changes and all of the symbolic link modifications)


A couple last notes:
- I added my printer through the CUPS server, "localhost:631".
- I used "root" + whatever password I set earlier.
- After it was added, I set it to be the sever default printer.
- In Tiny Core 6.x it would never appear under the firefox -> print menu. However, LPR would use the CUPS server default printer.
- Attempting to print a test page through CUPS never worked. There was always some sort of issue. All other forms of printing were successful.

I would be very interested in anyones feedback.

Offline Juanito

  • Administrator
  • Hero Member
  • *****
  • Posts: 14851
Re: CUPS USB Printing Issues
« Reply #3 on: February 16, 2015, 11:22:08 AM »
I'm not too sure why firefox is part of the "required base for general printing"  :o

I'd guess that either the brother printer drivers or hpijs-dynppds is looking for libpoppler.so.37 rather than cups itself.

I'm also not sure why you need to overwrite the backend and filters symlinks?

To start the cups daemon on boot, put "/usr/local/etc/init.d/cups start" in bootlocal.sh, not ~/X.d

/usr/local/etc/init.d/cups and /usr/local/etc/init.d/dbus are part of the cups and dbus extensions, so no need to add these to your backup.

'Glad you got it working  :)

BTW, I deleted your other identical post.

Offline Falco

  • Newbie
  • *
  • Posts: 10
Re: CUPS USB Printing Issues
« Reply #4 on: February 16, 2015, 11:42:00 AM »
Firefox was only used to access CUPS as well as download the additional tcz package that I needed.

I am not certain what exactly was looking for the "libpoppler.so.37", however I tried with many different drivers and this missing library was still one link in the chain. In my solution path, I fixed this error before the hpijs-dynppds addition was involved.

I overwrote the symlinks in backend and filter because there were complaints about insecure permissions. I was not able to change them at the source due to the read-only file system. As a result, I just copied all of the symlinks directly into those folder and there were no more complaints.

I adjusted the init script as per your suggestion. TY.

Sorry for the duplicate post.


I am now onto the next challenge of getting scanners to function with the Tiny Core 6.x environment.

Offline Juanito

  • Administrator
  • Hero Member
  • *****
  • Posts: 14851
Re: CUPS USB Printing Issues
« Reply #5 on: February 16, 2015, 11:53:19 AM »
I've only ever used hp printer/scanners and they've always worked fine with cups/hplip/sane.

Once or twice I've tried to help out with printer/scanner drivers for other manufacturers and it's always been difficult because they are usually pre-built and thus reliant on libs not necessarily present in tinycore.

Good luck with the scanners.

Offline Falco

  • Newbie
  • *
  • Posts: 10
Re: CUPS USB Printing Issues
« Reply #6 on: February 16, 2015, 12:12:13 PM »
I have never worked with scanners before in Linux. I have been doing plenty of reading, research and testing. I have had no luck with sane although I am still working on it.
On Tiny Core, I have installed the sane-backends, hplip, cups and a variety of other utilities to help my attempt at getting this scanner to work.

I feel as though I am still missing a large piece.

When I plug the scanner in there is not even an entry for it anywhere in the "/dev/".


Offline Juanito

  • Administrator
  • Hero Member
  • *****
  • Posts: 14851
Re: CUPS USB Printing Issues
« Reply #7 on: February 16, 2015, 12:17:15 PM »
Is it a stand-alone scanner or is it part of a multifunction printer/scanner/fax device?

What interface does the scanner use - usb, scsi, parallel or network?

Note that hplip is only useful for hp devices.

Offline Falco

  • Newbie
  • *
  • Posts: 10
Re: CUPS USB Printing Issues
« Reply #8 on: February 16, 2015, 12:23:30 PM »
I have a variety of scanners that I can use to test. They are all stand-alone scanners.

My goal is to get the Fujitsu ScanSnap S1300 working locally. I have checked, and this scanner is covered by sane.
- Scanner: Fujitsu ScanSnap S1300
- Interface: USB 2.0

Offline Juanito

  • Administrator
  • Hero Member
  • *****
  • Posts: 14851
Re: CUPS USB Printing Issues
« Reply #9 on: February 16, 2015, 12:34:16 PM »
With the sane-backends extension loaded, what does "scanimage -L" give?

Did you look at the config file section of:

http://www.sane-project.org/man/sane-fujitsu.5.html


Offline Falco

  • Newbie
  • *
  • Posts: 10
Re: CUPS USB Printing Issues
« Reply #10 on: February 16, 2015, 12:46:27 PM »
scanimage -L output:
No scanners were identified. If you were expecting something different.
Check that the scanner is plugged in, turned on and detected by the sane-find-scanner tool (if appropriate).
Please read the documentation which came with this software (README, FAQ, manpages).

I think that udev is not correctly picking up the scanner.

there is a sane-epjitsu that is said to work in place of the sane-fujitsu.


Offline Juanito

  • Administrator
  • Hero Member
  • *****
  • Posts: 14851
Re: CUPS USB Printing Issues
« Reply #11 on: February 16, 2015, 01:03:34 PM »
Does this:
Code: [Select]
$ cat /usr/local/etc/sane.d/fujitsu.conf

..look like either of these:

"usb 0x04c5 0x1042" (or other vendor/product ids)
"usb /dev/usb/scanner0"

Does "lsusb" (with the usb-utils extension loaded) show the scanner?

Offline Falco

  • Newbie
  • *
  • Posts: 10
Re: CUPS USB Printing Issues
« Reply #12 on: February 16, 2015, 01:11:16 PM »
The exact model can be found under
/usr/local/etc/sane.d/epjitsu.conf

it shows up in lsusb with the proper hex as well.


Offline Juanito

  • Administrator
  • Hero Member
  • *****
  • Posts: 14851
Re: CUPS USB Printing Issues
« Reply #13 on: February 16, 2015, 11:50:18 PM »
You could perhaps try this:
Code: [Select]
$ sudo rm /usr/local/etc/sane.d/*conf
$ sudo cp /tmp/tcloop/sane-backends/usr/local/etc/sane.d/epjitsu.conf /usr/local/etc/sane.d

..and then, looking for errors:
Code: [Select]
$ ldd /usr/local/lib/sane/libsane-epjitsu.so
$ SANE_DEBUG_EPJITSU=5 scanimage -L

Offline Juanito

  • Administrator
  • Hero Member
  • *****
  • Posts: 14851
Re: CUPS USB Printing Issues
« Reply #14 on: February 17, 2015, 01:33:16 AM »
I did some more checking - I rarely use the 32-bit version of tc - it's cups-filters that has the dep on libpoppler.so.37.

Note also that scanimage has a dep on libtiff.so.3

I'll look at this some more today