cups lpr, lp etc


Forum: System
Topic: cups lpr, lp etc
started by: betchern0t

Posted by betchern0t on July 03 2006,10:36
Hi,
    my understanding is that normally installation of cups replaces the cli utils such as lpr etc with cups specific ones. I have installed cups.dsl and have test pages printing however lpr and lp appear to be still the LPRng versions. How do I get the applications to print to printers installed on the cups server? I have to use cups because one of my two printers only has a cups driver. Things such as firefox appear to simply shell out the relevant lpr command.

many thanks in advance

Paul

Posted by betchern0t on July 08 2006,07:19
Ok. A weeks hard work later I have it printing but less than optimally:

1) use apt-get to install cupsys-bsd. This will install the following four packages: cupsys-bsd, cupsys-client, libcupsys2, libpng2. If you like you can also get gtklp

2) turn these into a dsl package by:

    a) extracting the filenames in the packages into a file eg:

          dpkg -c  libpng2 | awk '{ print substr($6,2) }'  | grep -v "\/$" >> files.tmp

    b) use tar to archive them into the dsl package:
       
         tar -zcvf cups-client.dsl -T files.tmp

Note this information gleaned from reading the deb2dsl script

3) add the cups libs to the path in .bash_profile (/usr/lib). You may not need to do this however there  is indication that one problem was the calls to the cups libs were failing.

4) run the shelled out lpr commands under root ie take the normal string starting with lpr and put sudo on the front. There was an indication that it was failing to write the spool file. I can't find where the permission are wrong. It could be that it is not file permissions but rather an issue with the pipes and socket calls these things do.

HTH

Paul

Posted by roberts on July 08 2006,15:11
I use the native cups cli commands

lp -d my_printer_name

instead of the default

lpr -P my_printer_name

And I had to change several apps that default to the lpr style syntax

Posted by betchern0t on July 09 2006,03:18
yeah they  work well with a couple of limitations on my box:

1) gs doesn't like some of the postscript that my gdi cups driver spits out so things printed from the commandline fail with gs errors.

2) to get things like firefox to print you need to add sudo. I don't know why that is but I am confident it is bad practise :D

I am just packaging a dsl with the cli for submission.

Cheers Paul

Posted by roberts on July 09 2006,04:56
Guess I am lucky because I have a postscript printer and have not had printing issues, even with APSFILTER. But cups gives me better control. Also, I did not know about sudo needed by the the builtin firefox. But then that one if very muched a hacked version. I use seamonkey and I don't have to change a thing, it recognizes my cups postscript printer. I will look for your submission. Hopefully it will help others.
Posted by ^thehatsrule^ on July 12 2006,06:58
I remember in my printer setup I had to change the permissions on the printer spool directory - maybe this is a related problem.
Powered by Ikonboard 3.1.2a
Ikonboard © 2001 Jarvis Entertainment Group, Inc.