Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 03 Aug 2005 18:13:18 -0700
From:      Graham North <northg@shaw.ca>
To:        questions freebsd <freebsd-questions@freebsd.org>
Subject:   printing problems with CUPS on localhost server
Message-ID:  <42F16BAE.7040600@shaw.ca>

next in thread | raw e-mail | index | archive | help
--=======AVGMAIL-42F16BAE5831=======
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit

I just set up my FreeBSD box to act as a printserver.   I used CUPs and 
Samba following great directions found here: 
http://www.ajl-tech.com/index2.php?option=content&do_pdf=1&id=16

The printserver works very nicely printing jobs from my WinXP client to 
an hp4l printer attached to Freebsd, however it will not print files 
from itself using lpr.

A bit of hunting found some "gotchas" at:  
http://home.nyc.rr.com/computertaijutsu/cups.html ... and so I tried 
adding symbolic links for the lp and lpr commands as per the author's 
recommendations - see bottom of email.

The problem still exists however, now instead of getting error messages, 
if I issue a "lpr filename" command, my printer gives a quick blink, no 
errror messages are generated, but neither is printer output - nada!

Repeat - Samba and Cups work together fine on this elderly hp4l - print 
all sorts from Windows.   Just cannot access from the server itself.
I am sure that this is a simple configuration issue somewhere -

my printcap definition, ie:  hp4l|lp|hp4l:rm=192.168.0.102:rp=hp4l:
ps. This was auto-generated from CUPs and oirignally was 
"hp4l|hp4l:rm=192.168.0.102:rp=hp4l:"
(I later inserted the lp myself as CUPS does not, either way it doesn't 
work.)

Can anyone please point me straight on this?
Thanks,   Graham/


 From "gotchas"
************
"With FreeBSD, cups will place its configuration files in /usr/local/etc 
rather than /etc. The lp or lpr command that you will use is also going 
to be in /usr/local/bin rather than /usr/bin. As /usr/bin is listed 
first in the path for both root and normal user, if one tries to print 
using the command lp filename you'll get an error message.

There are various workarounds--one can edit the $PATH variable, type the 
entire path, eg /usr/local/bin/lp or do it the lazy man's way, which, as 
those who know me would expect, is what I did. I backed up the /usr/bin 
lp and lpr and then sym linked /usr/local/bin's commands to them.
mv /usr/bin/lp /usr/bin/lp.bak
mv /usr/bin/lpr /usr/bin/lpr.bak
ln -s /usr/local/bin/lp /usr/bin/lp
ln -s /usr/local/bin/lpr /usr/bin/lpr"

**************


-- 
Kindness can be infectious - try it.

Graham North
Vancouver, BC
www.soleado.ca



--=======AVGMAIL-42F16BAE5831=======
Content-Type: text/plain; x-avg=cert; charset=us-ascii
Content-Transfer-Encoding: quoted-printable
Content-Disposition: inline
Content-Description: "AVG certification"

No virus found in this outgoing message.
Checked by AVG Anti-Virus.
Version: 7.0.338 / Virus Database: 267.9.9/62 - Release Date: 8/2/2005

--=======AVGMAIL-42F16BAE5831=======--



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?42F16BAE.7040600>