[vox-tech] CUPS on FreeBSD

Jeffrey J. Nonken jjn_lugod at nonken.net
Wed Oct 12 11:06:04 PDT 2005


One question before we start... should I or should I not be running 
lpd while trying to use CUPS? I've got conflicting and unclear 
information on that. Is CUPS supposed to be handling all of it, or 
does it need a spooler?

On Wed, 12 Oct 2005 08:57:23 -0700, Jeff Newmiller wrote:
> Jeffrey J. Nonken wrote:
>> On Mon, 10 Oct 2005 10:01:31 -0700, Jeff Newmiller wrote:
>> 
> [...]
> 
>>> In my case, verifying that the UID that the filters run under
>>> (listed in cupsd.conf) have appropriate permissions was the
>>> most challenging thing to get working right.  The CUPS daemon
>>> runs as root, but runs actual print jobs as a lower-privilege
>>> user.
>>> 
>> 
>> I've spent two days on this and I've gotten almost nowhere. If
>> the next part is the _challenging_ bit, maybe I should throw in
>> the towel now.
>> 
> 
> Sorry, I couldn't help but laugh at that. :-/ 

No, that's good. Laughing is good.
> 
>> However, I have set filters permissions according to
>> instructions, FWIW. Whether that's an issue remains to be seen. 
> 
> Ah, but have you verified that the appropriate users have
> permissions they need?  I don't know how FreeBSD handles USB, but
> the UID that CUPS runs under has to be able to access the device,

I'm still feeling my way around this, but I think this means CUPS 
itself is running as root:

  UID   PID  PPID CPU PRI NI   VSZ  RSS MWCHAN STAT  TT       TIME 
COMMAND
    0   417     1   0  96  0  4944 3396 select Ss    ??    0:00.17 
/usr/local/s

-bash-2.05b$ ls -l /dev/ulpt0
crw-r--r--  1 root  operator  241,   0 Oct 12 10:37 /dev/ulpt0

I'm not sure that this is relevant (yet) since the problem of CUPS not 
respond happened _before_ I tried adding a printer. The printer device 
not being accessible can't possibly affect my ability to to connect to 
CUPS ex-post-facto.

I have done one thing since my last message: I went into client.conf 
and explicitly added the local hostname as ServerName, and did the 
same to cupsd.conf, even though the comments claim it uses that name 
by default. Once I added it to client.conf I was able to connect 
implicitly to cups via lpstat and lpadmin, so I assume I did something 
right.

aphrodite# lpstat -a
5850 accepting requests since Jan 01 00:00
HPLJ5850 accepting requests since Jan 01 00:00
aphrodite# lpstat -s
system default destination: 5850
device for 5850: usb:/dev/ulpt0
device for HPLJ5850: socket://192.168.0.52

However, I still can't see anything in the Device pulldown menu when I 
try to add a printer via the web interface, nor can I see the two 
printers I've added via lpadmin. And I can't seem to do anything like 
actually printing. So there's still mischief afoot. But it is a step 
forward.

> as well as the printer directories in  /var. (Kubuntu moved the
> default conf file from the CUPS-recommended directory structure
> into the /etc to conform with Debian standards, but that mostly
> changed how I dealt with multiple types of printers.)
> 
> Anyway, you didn't make your conf file available, so I haven't been
> able to offer any help with that.
> 
> One other thing... if you are trying to use a printer you added
> before you stabilized your cupsd.conf file, you might want to try
> deleting that one and adding it again.

I haven't really stabilized it, mostly I looked through it and decided 
that the defaults would work. I was going to follow your earlier 
advice and go through it line by line, I just haven't had an 
opportunity yet. I think I'll do that before I toss it in your 
direction. Get all the simple stupid stuff out of the way and take 
care of anything you couldn't possibly know without examining my 
system -- like conflicts between default and actual directories. I 
believe that FreeBSD also moved some things to conform to its own 
standards.

I would expect a properly ported utility to have that done, but that 
doesn't mean it's so. So I will kick those assumptions out and take 
care of that before asking more stupid questions.




More information about the vox-tech mailing list