pdq print recovery?

Problems and successes with specific brands/models of printers
Message
Author
JohnMc
Posts: 118
Joined: Fri 07 Apr 2006, 15:18

pdq print recovery?

#1 Post by JohnMc »

I am having a problem with the pdq/xpdq package. Somehow the printrc file has been corrupted. So even if I rerun setup the 'add printer' in the xpdq program won't complete.

Any suggestions as to a workaround so I can get printing working again?

(And yes I know, use cups, but I would rather not this time around.)

TIA

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

#2 Post by rcrsn51 »

One way to corrupt the printrc file is by using a printer name containing a space. You can fix this just by taking /etc/pdq/printrc into a text editor.

If there is some other problem, you can get a clean copy of the file in /initrd/pup_r02/etc/pdq/printrc .

JohnMc
Posts: 118
Joined: Fri 07 Apr 2006, 15:18

pdq problems

#3 Post by JohnMc »

rcrsn51,

I just sucked a working copy of the rc file out of the directory you suggested and just redid Xpdq again. Worked like a champ!

Thanks for the suggestion.

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

#4 Post by 01micko »

I know this thread is stoneage...

But..

I just tried to print from Xdialog and got this error

Code: Select all

cat /etc/pdq/printrc: no such file or directory
Printer sucked through a page though.. blank

hmmm......

(lupu-503)
Puppy Linux Blog - contact me for access

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

#5 Post by rcrsn51 »

If you look at the help for Xdialog, it tries to print using a script called lprshell. It still exists in Puppy, left over from the pre-CUPS era and uses pdq as the print server. However pdq and its components are long gone.

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

#6 Post by 01micko »

Thanks rcrsn51

I have downloaded and compiled pdq.. it's circa 2006 so I assume is no longer maintained. It compiled fine, I just need to figure out how to use.

OTOH, it might be better to compile in different printing support into Xdialog (if possible) as I am shifting to using that a lot more. In fact I think a shift to Zenity as the main bash/gtk app in Puppy may not be too far off as Xdialog and Gtkdialog are getting old.

Cheers
Puppy Linux Blog - contact me for access

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

#7 Post by rcrsn51 »

If you check the ./configure messages, you should see references to missing GTK. This is because pdq is a GTK1 app that was never upgraded to GTK2. This means that you don't get the xpdq frontend needed to set up a printer.

But why would you bother with pdq at all? You just need to modify the lprshell script to pass the print job on to CUPS.

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

#8 Post by rcrsn51 »

rcrsn51 wrote: You just need to modify the lprshell script to pass the print job on to CUPS.
The simplest thing to try would be replacing /usr/bin/lprshell with a symlink to /usr/bin/lp.

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

#9 Post by 01micko »

rcrsn51 wrote:If you check the ./configure messages, you should see references to missing GTK. This is because pdq is a GTK1 app that was never upgraded to GTK2. This means that you don't get the xpdq frontend needed to set up a printer.

But why would you bother with pdq at all? You just need to modify the lprshell script to pass the print job on to CUPS.
Hehe.. I'm not bothering with pdq.

I have the Xdialog source and it has a configure option --with-print-command=cmd.. so I guess to print to default printer we use lpr "$1"... ok but I can't print a simple txt file , cups is throwing "No usable font available"

Any idea how to set that? Do I need to adjust a config?

Thanks
rcrsn51 wrote:
You just need to modify the lprshell script to pass the print job on to CUPS.

The simplest thing to try would be replacing /usr/bin/lprshell with a symlink to /usr/bin/lp.
I'll try that first
Puppy Linux Blog - contact me for access

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

#10 Post by 01micko »

ok... cups is still pending... need to kill job methinks

Code: Select all

Canon_MP490_series-14  	(stdin)  	root  	4k  	Unknown  	pending since
Sun Jul 25 02:36:54 2010 
No, it's aborted now, must have timed out.

That is with lprshell removed and symlinked lprshell to lp

Thanks, but this is non-urgent. If you continue to help fine but like I said, non-urgent, I'll definitely get back to it.

Cheers
Puppy Linux Blog - contact me for access

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

#11 Post by rcrsn51 »

Can you send me an Xdialog app that has a print option?

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

#12 Post by 01micko »

Just type "Xdialog" in a term and the options get printed to screen in a big Xdialog window with 2 buttons.. OK and Print.

All it did for me was feed a sheet of paper through the machine when I clicked Print. Now it does nothing.

Cheers

EDIT My big problem now is that I can't print from command line.. but Printer works great in all apps otherwise.

Here's the full error message

Code: Select all

(1) This Xdialog binary compiled with: lprshell -P<printer>
    as the print command. If <printer> is "" (an empty string), the -P
    option is not used.
and here's what CUPS says...
request id is Canon_MP490_series-17 (0 file(s))
That's after I made the symlink.. well it's not an error, just cups isn't handling it for me.

Code: Select all

Canon_MP490_series-17  	(stdin)  	root  	4k  	Unknown  	processing since
Sun Jul 25 03:08:20 2010 
"No usable font available"
It's that font error now.

So... it would appear that CUPS is not accepting stdin. However printing from Nicoedit, Geany etc is all fine.
Puppy Linux Blog - contact me for access

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

#13 Post by rcrsn51 »

I tested this in Quirky with CUPS 1.3.11. After setting up the symlink from /usr/bin/lprshell to /usr/bin/lp, Xdialog printed fine.

I then tested it in Lupu 5.01 and got the same errors as you.

I then dropped CUPS 1.3.11 into Lupu and it worked fine.

Once again, CUPS 1.4.x disappoints me.

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

#14 Post by rcrsn51 »

The problem appears to be that Lupus' implementation of CUPS 1.4 won't print a raw text file through the lp or lpr commands.

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

#15 Post by 01micko »

Hmmm.. then it looks pqd is the answer for me then.. Thanks for all your help

I'm in lupu-503 (pfix=ram) and configured CUPS fine in Netsurf... same problem, even prints blank to pdf. :(

Cheers


EDIT
I'm going to have a dig around in the Nicoedit source, look for clues
Puppy Linux Blog - contact me for access

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

Post Reply