Page 1 of 2
Posted: Sat 24 Jul 2010, 06:18
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
Posted: Sat 24 Jul 2010, 11:53
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.
Posted: Sun 25 Jul 2010, 02:00
by 01micko
Ok
This is exactly what I did
- *grabbed fonts
*extracted in /usr/share/cups/fonts/
*ranCode: 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
Posted: Sun 25 Jul 2010, 02:37
by rcrsn51
I just installed the FreeMono.ttf because that's what CUPS wanted. I didn't bother with the font setup commands.
Posted: Sun 25 Jul 2010, 02:48
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
Posted: Sun 25 Jul 2010, 02:54
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.
Posted: Sun 25 Jul 2010, 10:17
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
It Works
Posted: Thu 06 Mar 2014, 12:34
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!!