pdq print recovery?

Problems and successes with specific brands/models of printers
Message
Author
User avatar
rcrsn51
Posts: 13096
Joined: Tue 05 Sep 2006, 13:50
Location: Stratford, Ontario

#16 Post by rcrsn51 »

Here's a little workaround. Replace /usr/bin/lprshell with this script

Code: Select all

#!/bin/sh
cat > /tmp/out.txt
defaulttexteditor /tmp/out.txt

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

#17 Post by rcrsn51 »

Here is the proper fix. CUPS is looking for the font /usr/share/cups/fonts/FreeMono.ttf.

You can get it here.

This enables printing of text files with lp/lpr. Then replace /usr/bin/lprshell with the symlink to /usr/bin/lp. Now you can print from Xdialog.

User avatar
01micko
Posts: 8741
Joined: Sat 11 Oct 2008, 13:39
Location: qld
Contact:

#18 Post by 01micko »

Ok

This is exactly what I did
  • *grabbed fonts
    *extracted in /usr/share/cups/fonts/
    *ran

    Code: Select all

    mkfontscale /usr/share/cups/fonts/
    mkfontdir /usr/share/cups/fonts/
    *restarted X
    *openned /root/spot (just as an example, nothing to do with user "spot") in rox
    *openned a terminal there and typed "lp README.txt"
It worked.

Thanks again rcrsn51

Oh, yeah, I had to make that symlink to lp.. lprshell, that fixed Xdialog printing.

What font's could we chop out of that package to make a reasonable sized printing fix package for lupu?

Cheers
Puppy Linux Blog - contact me for access

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

#19 Post by rcrsn51 »

I just installed the FreeMono.ttf because that's what CUPS wanted. I didn't bother with the font setup commands.

User avatar
01micko
Posts: 8741
Joined: Sat 11 Oct 2008, 13:39
Location: qld
Contact:

#20 Post by 01micko »

rcrsn51 wrote:I just installed the FreeMono.ttf because that's what CUPS wanted. I didn't bother with the font setup commands.
Ok, did that too, made a pet that makes the symlink and runs the font tools (there is a stale symlink in there which should come back to life, this is for woof.)

NOTE: anyone downloading this it is for CUPS-1.4... Only ..and the usual disclaimers..use at own risk
Puppy Linux Blog - contact me for access

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

#21 Post by rcrsn51 »

Instead of actually installing the FreeMono.ttf font, I wonder if you could just symlink its name to an existing ttf font. I will test.

[Edit] Yes, that worked. But the font size was larger than normal.

User avatar
01micko
Posts: 8741
Joined: Sat 11 Oct 2008, 13:39
Location: qld
Contact:

#22 Post by 01micko »

Ok, made a smaller version, ditched bold, oblique etc, just 1 font file..

I think this one belongs in Lupu by default.. or else how do you write an app and get it to print?

Tested pfix=ram and Xdilaog worked, so did command line.

Cheers
Attachments
cups-fix-1.4-1-lucid.pet
(109.73 KiB) Downloaded 267 times
Puppy Linux Blog - contact me for access

ItWorks
Posts: 1
Joined: Thu 06 Mar 2014, 12:03

It Works

#23 Post by ItWorks »

I know this is an old thread but want to say this was very helpful for me and explain my experience to help others in the same situation since i was very dissapointed with this issue.

Im not even running Puppy Linux right now (did it some time ago) but the problem was the same. Instaled a home server running CUPS and configured it so all computers at home could print on my HP LaserJet 1020 and on CUPS-PDF for generating PDFs on the shared zone.

All worked fine for my PCs BUT i couldnt print from the server itself!! Really 'not printing' isnt the right expresion since both printers (LaserJet and VirtualPDF) were throwing blank pages. In the CUPS works page i found that "No usable font available" message. The server is command-line only so, not using any app to print, just the lpr command.

As rcrsn51 pointed, the key is that CUPS looks for the font /usr/share/cups/fonts/FreeMono.ttf. My steps were to install ttf fonts (ttf-freefont) since never needed them in command line and symlinked one of them (instaled in /usr/share/fonts/TTF) to the file CUPS is looking for. Thats all!! All working right.

Many thanks guys!!

Post Reply