Shared Printers - Samba + cups-pdf
NoOp
glgxg at mfire.com
Fri May 25 21:43:58 UTC 2007
On 05/25/2007 09:09 AM, Mitch Contla wrote:
> On 5/24/07, NoOp <glgxg at mfire.com> wrote:
>>
>> Since transitioning to Feisty from Dapper I have an interesting problem
>> regarding my printers:
>>
>> I have a single shared printer setup on this machine. It's a USB
>> printer (Canon MP750) that I share amongst 4 other Ubuntu machines (all
>> now running Feisty 7.04). Printing to the machine from all systems works
>> fine both via the new Feisty MP750 driver and the existing Turboprint
>> driver (although it took some uninstalling & reinstalling to get the
>> Turboprint driver working correctly).
>>
>> Unfortunately, it seems that since 7.04 all of the printers on this
>> machine are now shared amongst the other machines. I can't seem to
>> figure out how to only share this printer, but not the other locally
>> installed virtual PDF printer, fax printer etc. Here is what happens:
>>
>> 1. Printers are set up on this machine - mostly via localhost:631 (cups)
>> as the System|Administration|Printers wizard doesn't seem to want to
>> allow me to delete old printers or add new ones properly.
>>
>> 2. Via localhost:631 I 'unpublish' my virtual PDF printer etc., and only
>> keep my MP750 published.
>>
>> 3. On the other 7.04 machines, they all pick up every printer on this
>> machine; the MP750, the virtual PDF printer, and the fax printer. That's
>> part of the problem; I only want them to pick up the MP750 and not the
>> other printers.
>
>
> I am not using Feisty, but with both Edgy and Dapper, I have experienced
> strange behavior and inconsistencies when using Cups' web-based
> administration...
>
> If you type this command (on the PC where the virtual PDF printer and fax
> printer are hosted):
> $ lpoptions -p name_of_virtual_printer
>
> What is the value of the 'printer-is-shared' option?
>
> If it is '0', try restarting cupsys wait a couple minutes and the from one
> of the other machines, try:
> $ lpstat -p
>
> Does the printer still show up on the remote PCs?
>
> If it is '1', try manually changing the printer's 'Shared' directive to 'No'
> in /etc/cups/printers.conf, restart cups, and try 'lpstat -p' again (from
> another PC).
>
> Does the printer still show up on the remote PCs?
>
> If I try to add a local virtual PDF printer to the second (or other
>> Ubuntu 7.04) machine via the System|Administration|Printers wizard, it
>> will not add a local PDF printer. (cupsys* and cups-pdf are intalled
>> just fine).
>>
>> If I add a local virtual PDF printer back into this machine, it shows up
>> on the other machines, and I can print to it from those machines. But as
>> expected the print output goes back to this machines /PDF directory path.
>>
>>
> Assuming you get the sharing issue worked out, check to make sure the
> cups-pdf URI and PPD exists on the other PCs where you want to set up the
> virtual PDF printer:
>
> $ lpinfo -v | grep pdf
> file cups-pdf:/ # expected output... use with -v option when adding
> printer using lpadmin below
>
> $ lpinfo -m | grep cups-pdf
> cups-pdf/PostscriptColor.ppd Generic postscript color printer rev4 #
> expected output... use with -m option when adding printer using lpadmin
> below
>
> Then to actually add the printer (subsitute 'PDF-Creator' with desired
> name):
> $ lpadmin -p PDF-Creator -E -v cups-pdf:/ -m cups-pdf/PostscriptColor.ppd -u
> allow:all -o printer-is-shared=no
>
> Notice the -o option at the end of line... this will head off trouble before
> it begins! :)
>
> Let me know if this helps.
>
>
I'd planned to try your suggestions when this morning I brought up
System|Administration|Printing and decided to uncheck both of the boxes
for under Global Settings for sharing and lan. Odd; now my printers
disappeared completly from that app. So, I closed the app & tried to
reopen and now I get: "The CUPS server could not be contacted". This
spread to the the other Ubuntu boxes & now they get the exact same msg.
Interestingly enough I can connect via localhost:631 on all machines and
can print via localhost:631 on this machine (where the printer is
connected). I have no idea what happened; I've tried the following:
sudo apt-get install --reinstall cupsys*
[that reloaded/reinstalled just fine]
sudo /etc/init.d/cupsys restart
that responds: * Restarting Common Unix Printing System: cupsd
[ OK ]
ps aux | grep cupsd
shows the cups daemon running although I am unsure of the ? mark:
cupsys 10132 0.0 0.7 4664 1856 ? Ss 14:03 0:00
/usr/sbin/cupsd
gg 12394 0.0 0.2 2884 764 pts/0 R+ 14:07 0:00 grep cupsd
Cups error log shows a crash - I've reinstall & rebooted since:
[25/May/2007:10:57:01 -0700] CUPS-Add-Modify-Printer: Unauthorized
E [25/May/2007:10:57:03 -0700] CUPS-Add-Modify-Printer: Unauthorized
E [25/May/2007:13:00:06 -0700] CUPS-Set-Default: Unauthorized
E [25/May/2007:13:00:09 -0700] CUPS-Set-Default: Unauthorized
E [25/May/2007:13:02:51 -0700] CUPS-Add-Modify-Printer: Unauthorized
E [25/May/2007:13:02:52 -0700] CUPS-Add-Modify-Printer: Unauthorized
E [25/May/2007:13:09:34 -0700] PID 19039
(/usr/lib/cups/cgi-bin/admin.cgi) crashed on signal 9!
E [25/May/2007:14:03:09 -0700] Creating missing directory
"/var/run/cups/certs"
Perhaps even more interesting; from localhost:631 if I check the
following box under the Administration tab:
Share published printers connected to this system
and sudo /etc/init.d/cupsys restart
I can now bring up the gui (System|Administration|Printing) in *all*
systems, the MP750 shows up on all systems. However, the cups error log
on this system now shows:
[snip]
[25/May/2007:14:03:09 -0700] Creating missing directory
"/var/run/cups/certs"
E [25/May/2007:14:26:05 -0700] Unable to bind socket for address :::631
- Permission denied.
E [25/May/2007:14:26:05 -0700] Unable to bind socket for address
0.0.0.0:631 - Permission denied.
E [25/May/2007:14:26:05 -0700] cupsdStartBrowsing: Unable to bind
broadcast socket - Permission denied.
and the virtual cups-pdf printer on the second machine that was working
this morning stops working.
In any event, it appears that I'm back to where I started & can now
print out your suggestions and give them a try. I think that I'll also
clear out all of the config files in my .cups & etc/cups directories
(backup first of course) and do another reinstall of cupsys* to see if
perhaps the config files somehow got screwed up.
More information about the ubuntu-users
mailing list