You are not logged in.

#1 2010-01-13 12:28:46

fdac
Member
From: Brisbane, Australia
Registered: 2005-06-19
Posts: 96

Printing problems - related to incorrect $PATH

Hi,

I have a Samsung ML-2010 laser printer which has worked well with CUPS and splix for a couple of years now.  With the new CUPS 1.4 it stopped working, however the solution from  http://bbs.archlinux.org/viewtopic.php? … 88#p683588 got the printer working again. 

However there is an ongoing problem:

Whenever I try to print a PDF, either from Adobe Reader or Okular, I get a series of error messages. 

First:
20100113220640725x440sc.png

This looks like a generic X Window.... I click OK, it goes away, then the same error pos up straight away a second time.

For the second time, I click OK, then a new window pops up which looks like an ugly printing dialog box...

20100113221948729x646sc.png

I click OK on this box, then finally the printer starts up and the document prints.

This only happens with PDFs, I've tried several different PDF files, from the web, made here with cups-pdf, etc.  Printing text from KWrite, spreadsheet from OpenOffice, rtf document from AbiWord, etc., all work perfectly. 


Any ideas?


Thanks
Francis

Last edited by fdac (2010-01-13 13:51:17)

Offline

#2 2010-01-13 12:32:09

fdac
Member
From: Brisbane, Australia
Registered: 2005-06-19
Posts: 96

Re: Printing problems - related to incorrect $PATH

Interesting - I've just tried printing the same files direct from the command line, using lp:

lp ~/data/pdfprints/Blankstaff1.pdf

And it works perfectly!

So, it seems like this problem is with the PDF viewers rather than the printing system.

Still not fixed though.

Offline

#3 2010-01-13 12:45:42

fdac
Member
From: Brisbane, Australia
Registered: 2005-06-19
Posts: 96

Re: Printing problems - related to incorrect $PATH

OK - I've tried an alternative PDF viewer, gv.

The print dialog of gv allows use of a print command, the default being lpr.

When printing like this, I get the same problem as with Acrobat and Okular.


Since printing with just lp worked from the console, I tried changing the print command in gv to just lp, and voila!


Going back to the console, I try using lpr and get the error messages....  so the problem must be with the lpr command.



Now I'll see if I can adjust the default printing command in the other viewers....

Anybody know why lp would work but not lpr, only for PDF files??

Offline

#4 2010-01-13 13:42:48

fdac
Member
From: Brisbane, Australia
Registered: 2005-06-19
Posts: 96

Re: Printing problems - related to incorrect $PATH

OK -  found some weird stuff:

/usr/bin/lp, and /usr/bin/lpr, both work fine.

However, look what 'lpr' actually does on my system - it's default is /usr/local/linuxprinter/bin/lpr - which is a symling to /usr/local/linuxprinter/llpr.   This file is from 2006!!!!  Doesn't belong to any package, either.


So - the linuxprinter bin directory is in my $PATH for some reason.  A quick look around determines that it is being put there by either /etc/profile.d/linux.sh or /etc/profile.d/linux.csh ... both of which also date from 2006! 

I've removed these files and am about to try logging off then back on.

Offline

#5 2010-01-13 13:50:27

fdac
Member
From: Brisbane, Australia
Registered: 2005-06-19
Posts: 96

Re: Printing problems - related to incorrect $PATH

Success!

I deleted the linux.sh and linux.csh out of /etc/profile, logged out and back in, and my $PATH was correct.  lpr now points to /usr/bin/lpr, as it should, and my PDFs print properly.

I then deleted the whole linuxprinter directory - good riddance.

So -----  the issue was not with PDF files, but with some 3-year old files.  I have no idea what installed them, they were not owned by any package - gone.

Probably not much help to anybody else out there but I've learnt a few things, at least.

Offline

Board footer

Powered by FluxBB