WelcomeWelcome | FAQFAQ | DownloadsDownloads | WikiWiki

Author Topic: Two CUPS Bugs  (Read 6497 times)

Offline perthie

  • Full Member
  • ***
  • Posts: 118
Two CUPS Bugs
« on: August 31, 2009, 09:21:10 PM »
1. The icon for cups.tcel is a 32x32 PNG. In some cases, it will conflict with the adjoining icon, causing the launch bar to scramble.

2. The command "/etc/init.d/cups status" always reports that the CUPS scheduler is not running.  This appears to be caused by TC's use of the busybox "ps" command, which fails to identify the cupsd process.
« Last Edit: August 31, 2009, 11:03:19 PM by perthie »

Offline Juanito

  • Administrator
  • Hero Member
  • *****
  • Posts: 14851
Re: Two CUPS Bugs
« Reply #1 on: August 31, 2009, 11:35:46 PM »
Thanks for the feedback.

I'd started making icons at 30x30 as I've noticed that there is sometimes a problem. I did however think that 32x32 was the standard.

I'm just waiting for cups-4 to be officially released before recompiling the cups and related extensions.

Offline perthie

  • Full Member
  • ***
  • Posts: 118
Re: Two CUPS Bugs
« Reply #2 on: September 02, 2009, 10:13:37 AM »
Here is something to consider. Many printer installer scripts want to use the folders /usr/lib/cups and /usr/share/cups/model.  The TC implementation of CUPS has these in /usr/local.  This means that the scripts have to be modified.

For example, Brother supplies Linux drivers for many of their printers. These will work successfully in TC, but only after some hacking.

Offline Juanito

  • Administrator
  • Hero Member
  • *****
  • Posts: 14851
Re: Two CUPS Bugs
« Reply #3 on: September 02, 2009, 10:53:08 AM »
Almost all of the tinycore extensions are compiled to /usr/local, which would tend to suggest that we either use a symlink to /usr/local or hack the other side of the equation...

Offline perthie

  • Full Member
  • ***
  • Posts: 118
Re: Two CUPS Bugs
« Reply #4 on: September 02, 2009, 11:46:33 AM »
Good call. Symlinking makes the Brother installers work perfectly. The two links are:

/usr/lib/cups -> /usr/local/lib/cups
/usr/share/cups -> /usr/local/share/cups


Offline curaga

  • Administrator
  • Hero Member
  • *****
  • Posts: 11049
Re: Two CUPS Bugs
« Reply #5 on: September 04, 2009, 03:50:50 PM »
cups 1.4 was released Aug 28? Or is it some other version?
The only barriers that can stop you are the ones you create yourself.

Offline Juanito

  • Administrator
  • Hero Member
  • *****
  • Posts: 14851
Re: Two CUPS Bugs
« Reply #6 on: September 05, 2009, 12:57:24 AM »
Already downloaded - I'll start compiling cups-4 soon.

Note that the idea will be to make two extensions - libcups and cups (everything except libcups) so that people who use extensions like, for example, samba without cups do not need to load all of cups due to the compiled dependency on libcups.

Offline Juanito

  • Administrator
  • Hero Member
  • *****
  • Posts: 14851
Re: Two CUPS Bugs
« Reply #7 on: September 11, 2009, 09:52:36 AM »
OK, so I got cups-4 working with the existing version of hplip.

As per the above, I will plan to separate libcups from the cups extension - does anybody have an opinion on the help files and templates associated with the browser interface? I was thinking to leave them in as cups is somewhat non-obvious and users would probably find them helpful...

Offline Juanito

  • Administrator
  • Hero Member
  • *****
  • Posts: 14851
Re: Two CUPS Bugs
« Reply #8 on: September 11, 2009, 11:08:46 AM »
2. The command "/etc/init.d/cups status" always reports that the CUPS scheduler is not running.  This appears to be caused by TC's use of the busybox "ps" command, which fails to identify the cupsd process.

This seems to be due to the following line:
Code: [Select]
pid=`ps ax | awk '{if (match($5, ".*/cupsd$") || $5 == "cupsd") print $1}'`
Note that when cups is running:
Code: [Select]
$ ps | grep cupsd
 7290 root     /usr/local/sbin/cupsd -C /etc/cups/cupsd.conf

Since tinycore does not have the "match" command, I suspect things fail due to this - note that "sudo /etc/init.d/cups stop" does not work either.

Maybe somebody could suggest a replacement line?

Offline jpeters

  • Restricted
  • Hero Member
  • *****
  • Posts: 1017
Re: Two CUPS Bugs
« Reply #9 on: September 11, 2009, 02:48:42 PM »
try pid=`ps ax | awk '{if (match($3, ".*/cupsd$") || $3 == "cupsd") print $1}'`

Offline Juanito

  • Administrator
  • Hero Member
  • *****
  • Posts: 14851
Re: Two CUPS Bugs
« Reply #10 on: September 11, 2009, 03:01:25 PM »
That does indeed fix it - excellent, thanks  :)

Offline ^thehatsrule^

  • Retired Admins
  • Hero Member
  • *****
  • Posts: 1726
Re: Two CUPS Bugs
« Reply #11 on: September 11, 2009, 07:01:56 PM »
Usually `pidof` can be used

Offline Juanito

  • Administrator
  • Hero Member
  • *****
  • Posts: 14851
Re: Two CUPS Bugs
« Reply #12 on: September 12, 2009, 10:04:48 AM »
For example, Brother supplies Linux drivers for many of their printers. These will work successfully in TC, but only after some hacking.

The existing cups extension contains foomatic-rip as I initially needed this to use the hpijs_hpoj extension. The hplip extension uses it's own version of foomatic, so it would not neccessarily be required (for me at least) in a new version of cups.

Do the Brother printer drivers require foomatic-rip?

I was thinking of dropping foomatic-rip or compiling it as a separate extension - if the Brother drivers do not require foomatic, it would make sense for it to be a separate extension. This also has the benefit of removing the perl5 dependency...


Offline perthie

  • Full Member
  • ***
  • Posts: 118
Re: Two CUPS Bugs
« Reply #13 on: September 12, 2009, 12:01:44 PM »
The problem with Brother printers has been solved. Their installers use the Debian post-install script to create the key files (the filter and the PPD) and want to use paths like /usr/lib/cups. So it's just a matter of symlinking the correct paths, running the installer and extracting the driver files into a TCE. After that, the symlinks are not needed.  Unfortunately, each Brother model needs its own TCE.

The Brother drivers do not use foomatic-rip. My sense of foomatic-rip is that it's been made largely obsolete by newer packages like Gutenprint and HPLIP.  However, you still need it to use the built-in Ghostscript drivers. FWIW, there is a new compiled version of foomatic-rip that eliminates the need for Perl.

I've had a look at CUPS 1.4 - lots of changes! I couldn't get it to compile so the Printer Maintenance option would show.

« Last Edit: September 12, 2009, 12:11:25 PM by perthie »

Offline Juanito

  • Administrator
  • Hero Member
  • *****
  • Posts: 14851
Re: Two CUPS Bugs
« Reply #14 on: September 12, 2009, 12:37:47 PM »
The Brother drivers do not use foomatic-rip. My sense of foomatic-rip is that it's been made largely obsolete by newer packages like Gutenprint and HPLIP.  However, you still need it to use the built-in Ghostscript drivers. FWIW, there is a new compiled version of foomatic-rip that eliminates the need for Perl.

I compiled the latest foomatic-rip, as you say it doen't need perl, but it does need libgs (also non-negligible in size).

Quote
I've had a look at CUPS 1.4 - lots of changes! I couldn't get it to compile so the Printer Maintenance option would show.

I have a drop-down box with things like "print test page" showing - is this what you mean?