Provide easy way to enable/disable printer sharing

Bug #17981 reported by R (Chandra) Chandrasekhar
74
Affects Status Importance Assigned to Milestone
cupsys (Ubuntu)
Fix Released
Wishlist
Martin Pitt
kdeadmin (Ubuntu)
Fix Released
Wishlist
Unassigned

Bug Description

I understand that "no open ports in the default installation" is Ubuntu policy,
and I find it sensible.

In Gnome, there is a setting to allow LAN printers to be detected.

In KDE, there is none, as far as I know. So in Kubuntu, I was unable to share
my CUPS printer, linked by USB to my Kubuntu PC, with another printer on my home
LAN running MEPIS Linux. Although I did achieve printer sharing by editing
/etc/cups/cupsd.conf, I think this is non-ideal.

So, I request that Kubuntu provide a clean way to share CUPS printers on a LAN
just like Ubuntu.

FYI, I did the following to enable CUPS printer sharing:
****************************
The file /etc/cups/cupsd-browsing.conf sets Browsing Off by default. This
disallows access from other PCs on the LAN.

To turn browsing on, either (sudo) edit /etc/cups/cupsd-browsing.conf and change
"Off" to "On" or go to /usr/share/cups and type

./enable_browsing 1

Then, (sudo) edit /etc/cups/cupsd.conf to comment out the following line so:

# Listen 127.0.0.1:631

and uncomment, as appropriate, to have these entries:

Port 631
Browsing On
BrowseAddress @LOCAL
<Location />
Order Deny,Allow
Deny From All
Allow From 127.0.0.1
Allow From @LOCAL
</Location>

Finally,

sudo /etc/init.d/cupsys restart

and your CUPS printer should be visible from other PCs on the LAN.
****************************
Thanks.

Revision history for this message
Martin Pitt (pitti) wrote :

(In reply to comment #0)

> To turn browsing on, either (sudo) edit /etc/cups/cupsd-browsing.conf and change
> "Off" to "On" or go to /usr/share/cups and type
>
> ./enable_browsing 1

enable_browsing is an Ubuntu script that was specifically meant to be called
from GUIs. Jonathan, that's what you should call (as root, of course).

> Then, (sudo) edit /etc/cups/cupsd.conf to comment out the following line so:
>
> # Listen 127.0.0.1:631
>
> and uncomment, as appropriate, to have these entries:
>
> Port 631
> Browsing On
> BrowseAddress @LOCAL
> <Location />
> Order Deny,Allow
> Deny From All
> Allow From 127.0.0.1
> Allow From @LOCAL
> </Location>

That part wasn't necessary in Hoary; it was probably introduced while merging a
new Debian version into Breezy, I'll fix that.

Revision history for this message
Martin Pitt (pitti) wrote :

(In reply to comment #0)
> Then, (sudo) edit /etc/cups/cupsd.conf to comment out the following line so:
>
> # Listen 127.0.0.1:631
>
> and uncomment, as appropriate, to have these entries:
>
> Port 631
> [...]

I checked this again, it is not a bug introduced in Breezy. enable_browsing 1 is
for making _your_ client see remote printers on the network. Above recipe is for
exporting a printer to the network on a printer server. Thus these are
completely orthogonal things. Thus for the sake of detecting LAN printers, the
KDE printer tool only needs to call enable_browsing.

Revision history for this message
Patrice Vetsel (vetsel-patrice) wrote :

Is this bug still here with latest packages ?

Changed in cupsys:
status: Unconfirmed → Needs Info
Revision history for this message
Rocco Stanzione (trappist) wrote : Re: CUPS Printer Sharing Option on LAN Not available in Kubuntu and Ubuntu

I believe this can be fixed by moving the Browsing directive from browse.conf into cupsd.conf. The KDE interface doesn't seem to recognize the Include directive. I filed a bug on this earlier today but I can't seem to find it now.

Changed in cupsys:
status: Needs Info → Confirmed
Revision history for this message
Martin Pitt (pitti) wrote :

Alright, so cupsys should provide a small script which does the configuration, similar to /usr/share/cups/enable_browsing (probably enable_sharing), and gnome-cups-manager and KDE need to integrate this into the GUI.

Changed in cupsys:
assignee: jr → pitti
Matt Zimmerman (mdz)
Changed in gnome-cups-manager:
status: Unconfirmed → Confirmed
Revision history for this message
Martin Pitt (pitti) wrote :

in my local version, enable_browsing also enables exporting printers with Browsing (that's just how cups works).

Changed in cupsys:
status: Confirmed → Fix Committed
Revision history for this message
Martin Pitt (pitti) wrote :

gnome-cups-manager already has a GUI for enabling/disabling browsing; KDE needs to grow an equivalent, reassigning task.

Revision history for this message
Martin Pitt (pitti) wrote :

 cupsys (1.1.99.rc3-0ubuntu1) dapper; urgency=low
 .
   * New upstream bug fix release 1.2RC3, UVF exception approved by Matt
     Zimmerman.
   * Add debian/patches/56_revert_svn_5438.dpatch: Revert upstream svn commit
     5438 (fixed handling of products/manufacturers with spaces in the name)
     for now since it causes regressions in gnome-cups-add. Will be reactivated
     later when the issue is sorted out with upstream.
   * Update patches for new upstream release.
   * Remove debian/patches/20_httpGetHostname_crash.dpatch, fixed upstream.
   * Add debian/patches/14_dont_force_ssl.dpatch: Upstream now requires
     encryption by default for accessing /admin/, but our GUI frontends do not
     yet cope with that. Disable SSL requirement for now to revert to the old
     behaviour.
   * debian/patches/08_cupsd.conf.conf.d.dpatch:
     - Set "BrowseAddress @LOCAL"; without this, sending browsing information
       does not work (Browsing still has to be enabled). Since enable_browsing
       now works for exporting printers, too, this Closes: LP#17981
     - Add some comments to point out that the Port and Browsing settings are
       moved to /etc/cups/cups.d/.
   * debian/cupsys.postrm: Clean up passwd.md5 on purge.
   * debian/cupsys.init.d: Pre-create error_log, too, and clean up code a bit.
     Closes: LP#41267
   * debian/cupsys.postinst: If upgrading from Breezy, adapt the inclusion of
     external browsing configuration in cupsd.conf to retain the correct
     setting for modified cupsd.conf files.
   * debian/cupsys.config:
     - Fix handling of cupsd-browsing.conf -> cups.d/browse.conf transition for
       breezy->dapper upgrades.
     - Fix browse.conf parsing to set the correct debconf default value, so
       that the browse setting is not reset to 'off' on upgrades.
       Closes: LP#38704
   * Add debian/patches/57_svn_5461.dpatch:
     - Properly HTML-quote the printer name so that names containing e. g. '+'
       work properly in the web interface.
     - Upstream svn commit 5461.
     - Closes: LP#37018

Changed in cupsys:
status: Fix Committed → Fix Released
affects: kdeutils (Ubuntu) → kdeadmin (Ubuntu)
Revision history for this message
Jonathan Thomas (echidnaman) wrote :

There should be a "share printers to local network" checkbox on the first page of the Printer Configuration section of System Settings in Kubuntu 9.04 and up.

Changed in kdeadmin (Ubuntu):
status: Confirmed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.