Fatdog64-810 Final [17 Jan 2020]

A home for all kinds of Puppy related projects
Post Reply
Message
Author
artsown
Posts: 403
Joined: Wed 12 Sep 2012, 18:35

#81 Post by artsown »

step wrote:Art, can you please start the Gslapt-package manager and tell me which versions of the cups-filter packages are installed? Please include also cups-filters-avahi versions, if installed. Did you test the 810 beta with a new savefile, or did you carry your 802 savefile into the beta?
Fatdog's cups-filters packages were last updated in April 2019, which could explain why you were unable to print in Fatdog 802.
These are in the working installation:
cups-filters 1.22.5-x86_64-1
cups-filters-avahi 1.22.5-x86_64-1

I always use a new save folder.

As I had stated earlier, cups-filters was not installed. I don't recall if
cups-filters-avahi was installed or not. I may have added it as well.
I can easily remove cups-filters-avahi to see if that has any effect, if
you wish.

Edit #1: Corrected typo. avhi changed to avahi
Edit #2: I checked what's included in the "untouched" iso of the beta
and compared this to what's in my working remaster. The
only difference is my addition of cups-filters 1.22.5-x86+64-1
(which caused the printer to start working).

Art

jamesbond
Posts: 3433
Joined: Mon 26 Feb 2007, 05:02
Location: The Blue Marble

#82 Post by jamesbond »

@Art - some more ideas and suggestion.

First of all, did you disable the avahi service? If you do, the cups-filter-avahi probably won't work and you're right that using cups-filter (without avahi) would have "fixed" it.

However, in my test, it seems that you actually need to install "ghotscript" for the driver to work, whichever cups-filter I used to test it. I assume you've installed ghostscript yourself.

Here is a test that I did on a plain vanilla Fatdog (pristine boot, no savefile). I don't have pixma printer so I "emulated" it as a "network printer" using the socket interface (there are other ways to test it - result is the same). I added the "canon pixma mg2520" printer (it uses gutenprint), and then attempt to print something. I got an error - missing ghostscript, it says. So I installed ghostscript, and attempt to re-print - and it worked; as in the cups reported that printing was successfully and I got a binary data file that could have been dumped straight to the printer for printing.
Fatdog64 forum links: [url=http://murga-linux.com/puppy/viewtopic.php?t=117546]Latest version[/url] | [url=https://cutt.ly/ke8sn5H]Contributed packages[/url] | [url=https://cutt.ly/se8scrb]ISO builder[/url]

artsown
Posts: 403
Joined: Wed 12 Sep 2012, 18:35

#83 Post by artsown »

jamesbond wrote:@Art - some more ideas and suggestion.

First of all, did you disable the avahi service? If you do, the cups-filter-avahi probably won't work and you're right that using cups-filter (without avahi) would have "fixed" it.

However, in my test, it seems that you actually need to install "ghotscript" for the driver to work, whichever cups-filter I used to test it. I assume you've installed ghostscript yourself.

Here is a test that I did on a plain vanilla Fatdog (pristine boot, no savefile). I don't have pixma printer so I "emulated" it as a "network printer" using the socket interface (there are other ways to test it - result is the same). I added the "canon pixma mg2520" printer (it uses gutenprint), and then attempt to print something. I got an error - missing ghostscript, it says. So I installed ghostscript, and attempt to re-print - and it worked; as in the cups reported that printing was successfully and I got a binary data file that could have been dumped straight to the printer for printing.
Hi james,

No, I did not disable cups-avahi. It's enabled.

ghostscript seems enabled by default in a pristine 810 beta. It's
enabled in my remaster and I never enabled it. So I'm puzzled that
you had to enable it.

BTW, did you view my edited post just prior to yours?

Art

jamesbond
Posts: 3433
Joined: Mon 26 Feb 2007, 05:02
Location: The Blue Marble

#84 Post by jamesbond »

artsown wrote:No, I did not disable cups-avahi. It's enabled.
Sorry, I was not clear. The question is - did you disable (or turned off) the avahi service (called "avahi-daemon" in the control panel)?
ghostscript seems enabled by default in a pristine 810 beta.
It certainly isn't installed by default.
It's enabled in my remaster and I never enabled it. So I'm puzzled that
you had to enable it.
Hmmm. I can only assume that sometime in the past you have installed it. When you remaster, did you start from a clean savefile?
BTW, did you view my edited post just prior to yours?
I did. cups-filters and cups-filter-avahi are identical except that cups-filters-avahi support zeroconf and bonjour network printers and it requires avahi-daemon to run; but otherwise the printer drivers in it are identical. So it should not make any difference whatsoever. In my test as soon as I can install ghostscript, both works equally well.
Fatdog64 forum links: [url=http://murga-linux.com/puppy/viewtopic.php?t=117546]Latest version[/url] | [url=https://cutt.ly/ke8sn5H]Contributed packages[/url] | [url=https://cutt.ly/se8scrb]ISO builder[/url]

User avatar
rcrsn51
Posts: 13096
Joined: Tue 05 Sep 2006, 13:50
Location: Stratford, Ontario

#85 Post by rcrsn51 »

I am guessing that Art is using the Canon vendor driver, not the Gutenprint driver.

The vendor driver does NOT use Ghostscript. CUPS accepts the incoming print job as a PDF stream, runs it through the CUPS filter "pdftops" and sends it to the Canon filter "pstocanonij".

So Art needs the cups-filter package to provide "pdftops". But he does NOT need Ghostscript.

BTW, Gutenprint drivers are crap. They are a waste of space in your ISO. You would be better off including a more complete CUPS install.

artsown
Posts: 403
Joined: Wed 12 Sep 2012, 18:35

#86 Post by artsown »

@jamesbond
No, I did not disable avahi-daemon
I've already posted that I always use a fresh save folder

@rcrsn51
Yes, of course I'm using the canon vendor driver.

Art

jamesbond
Posts: 3433
Joined: Mon 26 Feb 2007, 05:02
Location: The Blue Marble

#87 Post by jamesbond »

rcrsn51 wrote:I am guessing that Art is using the Canon vendor driver, not the Gutenprint driver.

The vendor driver does NOT use Ghostscript. CUPS accepts the incoming print job as a PDF stream, runs it through the CUPS filter "pdftops" and sends it to the Canon filter "pstocanonij".

So Art needs the cups-filter package to provide "pdftops". But he does NOT need Ghostscript.
Interesting theory which definitely makes sense.

So I went to https://www.usa.canon.com in order to find the driver to test it myself but in their drivers download they don't have a driver for Linux. I went to canon-europe.com too and they don't even list MG2520 as a model (the closest one is MG2540).

Art, can you point to me where you get the vendor driver from?
BTW, Gutenprint drivers are crap. They are a waste of space in your ISO. You would be better off including a more complete CUPS install.
"pdftops" is included in the basesfs. It is provided by poppler, which is part of the base. Ghostscript also offers alternative pdftops but for most usage the poppler's one is usually good enough.
@jamesbond
No, I did not disable avahi-daemon
Ok, thanks. Curiouser and curiouser.
I've already posted that I always use a fresh save folder
Thanks. So ghostscript can't be in it. And rcrsn51 already cleared above that when using vendor driver, ghostscript isn't needed.

So if you can point me to where I can find the vendor driver, I can probably test it further.
Fatdog64 forum links: [url=http://murga-linux.com/puppy/viewtopic.php?t=117546]Latest version[/url] | [url=https://cutt.ly/ke8sn5H]Contributed packages[/url] | [url=https://cutt.ly/se8scrb]ISO builder[/url]

User avatar
rcrsn51
Posts: 13096
Joined: Tue 05 Sep 2006, 13:50
Location: Stratford, Ontario

#88 Post by rcrsn51 »

Get the MG2540. The driver will say "MG2500 series".

User avatar
rcrsn51
Posts: 13096
Joined: Tue 05 Sep 2006, 13:50
Location: Stratford, Ontario

#89 Post by rcrsn51 »

In Debian, "pdftops" actually comes from cups-filter-core-drivers, which is a dependency of cups-filters.

Poppler also provides "pdftops", but it's in /usr/bin, not in /usr/lib/cups/filter.

User avatar
rcrsn51
Posts: 13096
Joined: Tue 05 Sep 2006, 13:50
Location: Stratford, Ontario

#90 Post by rcrsn51 »

Interesting theory
Really? Not a fact backed up by empirical evidence?

artsown
Posts: 403
Joined: Wed 12 Sep 2012, 18:35

#91 Post by artsown »

@jamesbond
Here are drivers for the canon pixma mg2520

http://home.ptd.net/~artnpeg/canon_drivers.tar

Art

jamesbond
Posts: 3433
Joined: Mon 26 Feb 2007, 05:02
Location: The Blue Marble

#92 Post by jamesbond »

@jamesbond
Here are drivers for the canon pixma mg2520
Thank you. Got it.
Get the MG2540. The driver will say "MG2500 series".
Thank you. Got it. It turns out to be the same with the one from Art - but this one is even better, because it comes with __full__ source code (many printer drivers these days only contains open-source "glue". The actual part that performs rasterisation is closed-source. But not this one - the source has everything).
In Debian, "pdftops" actually comes from cups-filter-core-drivers, which is a dependency of cups-filters.

Poppler also provides "pdftops", but it's in /usr/bin, not in /usr/lib/cups/filter.
Correct. Fatdog also has two pdftops, one from poppler, and one from cups-filters(-avahi), in the locations you mentioned.
Really? Not a fact backed up by empirical evidence?
There are two claims made by the theory.
1. Arts uses canon proprietary driver.
2. Canon proprietary driver does not use ghostscript.

(1) has been established as a fact (Art confirmed himself) and it saves me a lot of confusion, so thank you for that and for the suggestion to use the MG2540 drivers.

(2) has now been established as incorrect, as this particular proprietary driver (for this model, as used by Art), still needs ghostscript.

And I have tested - it turns out that ghostscript is still needed. If I don't have ghostscript, pstocanonij will fail with /usr/bin/gs not found. That's the output from the binary driver, in CUPS error log. Looking in the source code itself, it does attempt to run /usr/bin/gs to convert the PS file into a PNM image, which is then wrapped by cifmg2500 with some sort of XML format. This final wrapped file is the one that gets sent to the printer.

---

The good news of all of these invesgation is that I managed to re-package the binary drivers into something that works (in my simulation at least). All you need to do is install them and the install ghostscript. No need to install cups-filters (which has the same effect, more or less, as re-installing cups-filters-avahi). I will upload this somewhere if Art needs it.

---

The only leftover curious part is why installing cups-filter (which is identical to re-installing cups-filters-avahi), works? I'd like to know, @Art, how did you install the drivers? And in which order? (you install driver first, then install cups-filters)?
Fatdog64 forum links: [url=http://murga-linux.com/puppy/viewtopic.php?t=117546]Latest version[/url] | [url=https://cutt.ly/ke8sn5H]Contributed packages[/url] | [url=https://cutt.ly/se8scrb]ISO builder[/url]

User avatar
rcrsn51
Posts: 13096
Joined: Tue 05 Sep 2006, 13:50
Location: Stratford, Ontario

#93 Post by rcrsn51 »

I stand corrected. I had forgotten that pstocanonij uses ghostscript internally, separate from the CUPS work-flow.

But here is one more issue: You stated that poppler's pdftops is "usually good enough". So if I deleted the CUPS pdftops filter, CUPS would switch over to the Poppler version in /usr/bin?

BTW, newer Canon models use the more conventional approach - rasterization is done as part of the CUPS work-flow, probably through the filter gstoraster.

artsown
Posts: 403
Joined: Wed 12 Sep 2012, 18:35

#94 Post by artsown »

@jamesbond
You aked how to install the drivers. It's been years since I've had to do
things that way, but my home-made auto-install simply installs both of
them. Using CUPS, which finds my printer (if it's turned on :)), I can
simply select pixma mg2520 from a list. I have no need to work with
drivers, as such. rcrsn51 was of great help back when many drivers
were not included in Linux.

Art

User avatar
rcrsn51
Posts: 13096
Joined: Tue 05 Sep 2006, 13:50
Location: Stratford, Ontario

#95 Post by rcrsn51 »

From here:
Problems Printing to a PostScript Printer

It can sometimes happen that a file sent to a PostScript printer fails in some way. For example, an error message might be produced on the first page and subsequent pages are blank. The cause is thought to lie with buggy behaviour in the printer's PostScript interpreter even when given valid PostScript.

The filtering chain might be

PDF file -> pdftopdf -> pdftops -> PostScript -> printer

The pdftops filter has the option to convert the PDF into PostScript using Ghostscript, Poppler, Cairo, Adobe Reader or Mupdf. The default mode is one which uses Poppler when the printer make is Brother, Minolta or Konica Minolta but Ghostscript for other printer models. If there is a problem with one of these other models it may be beneficial to switch to rendering PostScript from the PDF with the pdftops-renderer option. Details are in /usr/share/doc/cups-filters/README.txt.gz. See also POSTSCRIPT PRINTING DEBUG MODE in the same document. To use Cairo as the renderer:

lpadmin -p <print_queue> -o pdftops-renderer-default=pdftocairo (For an existing queue).
lp o pdftops-renderer=pdftocairo <print_job> (On a job-to-job basis).
Note that "Poppler mode" refers specifically to the target printer being Postscript-capable, which would not require rasterization or a vendor filter.

jamesbond
Posts: 3433
Joined: Mon 26 Feb 2007, 05:02
Location: The Blue Marble

#96 Post by jamesbond »

But here is one more issue: You stated that poppler's pdftops is "usually good enough". So if I deleted the CUPS pdftops filter, CUPS would switch over to the Poppler version in /usr/bin?
No. You can't delete /usr/lib64/cups/filter/pdftops either because it is what CUPS will call during its filter processing (CUPS only knows how to call filters located in /usr/lib64/cups/filter, and nowhere else).

/usr/lib64/cups/filter/pdftops will then in turn call whatever is the necessary program to actually convert pdf to something else (ps, cairo, etc). The default can be specified at compile time, but as Debian Wiki that you linked explains, this can be modified at run time. The "path" for the binaries however can't be changed - it specified at compile time. (e.g. pdftops -> call /usr/bin/pdftops, gs -> call /usr/bin/gs, etc the choice of whether to call "pdftops" or "gs" can be specified at run-time, but the fact that "gs" is located in /usr/bin/gs is fixed at compile time).

Fatdog cups-filters is set by default to use "pdftops".
BTW, newer Canon models use the more conventional approach - rasterization is done as part of the CUPS work-flow, probably through the filter gstoraster.
Agreed, it is not a good idea to hide to call to ghostscript in the filter itself. It should be made explicit part of the filter processing, and it's good that Canon does it with their newer drivers.
Note that "Poppler mode" refers specifically to the target printer being Postscript-capable, which would not require rasterization or a vendor filter.
Generally-speaking, yes. But it is also use where the intermediary filters require PostScript (and as it turns out, many of the gutenprint and foomatic filters seems to do so, as well as many proprietary drivers).
You asked how to install the drivers. It's been years since I've had to do things that way, but my home-made auto-install simply installs both of
them.
If you can explain the steps that your "home-made auto-install" does, it would be helpful, so we can figure out what's wrong and hopefully correct it for future drivers as well. So far the problem seems to be that the the drivers aren't "adapted" for proper installation.

Here is what I did with the original .deb drivers:
1. Convert them to TXZ packages (right-click, Convert to Fatdog packages)
2. Extract the packages, and rename eveything that has "lib" in it to "lib64"
3. However, keep "usr/lib/bjlib" it its original package.
4. Rebuild the package again (you can simply tar it, or you can use "makepkg" command).
5. Then install.
I have uploaded the two packages here: http://distro.ibiblio.org/fatdog/broken ... 64-DEB.txz and http://distro.ibiblio.org/fatdog/broken ... 64-DEB.txz - which has been processed as explained above. Install these two and then install ghostscript and you should be good to go.
Fatdog64 forum links: [url=http://murga-linux.com/puppy/viewtopic.php?t=117546]Latest version[/url] | [url=https://cutt.ly/ke8sn5H]Contributed packages[/url] | [url=https://cutt.ly/se8scrb]ISO builder[/url]

User avatar
rcrsn51
Posts: 13096
Joined: Tue 05 Sep 2006, 13:50
Location: Stratford, Ontario

#97 Post by rcrsn51 »

Generally-speaking, yes. But it is also use where the intermediary filters require PostScript (and as it turns out, many of the gutenprint and foomatic filters seems to do so, as well as many proprietary drivers).
The modern CUPS work-flow uses pdftopdf as a "pre-processor" for ghostscript, not pdftops. This is true for the majority of consumer printers, including those using Gutenprint.

I can set up a printer with the Gutenprint driver, delete the pdftops filter and it still prints.

BTW, what's the theory on how Art was able to accidentally install ghostscript?
"pdftops" is included in the basesfs. It is provided by poppler, which is part of the base.
Art needs the CUPS pdftops filter for his old Canon, so he apparently got it from some extra package. Did ghostscript come in as a dependency of this package?

artsown
Posts: 403
Joined: Wed 12 Sep 2012, 18:35

#98 Post by artsown »

@rcrsn51
I just started working again with a fresh install of 810 beta. This
time ghostscript does not show up as installed!??? My apologies
to you and james for adding to the confusion! I know I never
installed it, yet It's installed in my remaster???

@james
I'm in the process of checking your modified drivers. Installing
them and ghostscript has not resulted in a printer install. I only
get a offer to print to file. CUPS does not show any printers
installed. I presume you mean to install your drivers by right clicking
and selecting install?

Art

artsown
Posts: 403
Joined: Wed 12 Sep 2012, 18:35

#99 Post by artsown »

Fresh install of 810 beta again. This time ghostscript is not installed.
Driving me nuts! :) I use savefile=none and no partitions are mounted.

Art

User avatar
rcrsn51
Posts: 13096
Joined: Tue 05 Sep 2006, 13:50
Location: Stratford, Ontario

#100 Post by rcrsn51 »

Are you installing the extra package cups-filters 1.22.5-x86_64-1?

Post Reply