After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 692532 - Allow sharing of printers
Allow sharing of printers
Status: RESOLVED OBSOLETE
Product: gnome-control-center
Classification: Core
Component: Sharing
3.7.x
Other Linux
: Normal normal
: ---
Assigned To: Control-Center Maintainers
Control-Center Maintainers
triaged
: 777882 (view as bug list)
Depends on:
Blocks:
 
 
Reported: 2013-01-25 14:43 UTC by Marek Kašík
Modified: 2021-06-09 16:33 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
screenshots of printers sharing (203.05 KB, image/png)
2013-02-15 17:59 UTC, Marek Kašík
Details

Description Marek Kašík 2013-01-25 14:43:00 UTC
Since we have Sharing panel it would be useful to have possibility to turn on sharing of printers.
This needs an entry in g-c-c's Sharing panel which would turn on/off sharing globally and a widget in printers panel which would enable/disable sharing of each printer. Or we can place whole list of printers to the Sharing panel together with the global switch (and switches for each printer).

There is one problem with this, the panel can not know whether the sharing is enabled or not without administrator authentication.

I'll try to prepare a simple patch which would implement that.

Marek


PS: This feature request comes originally from Till Kamppeter.
Comment 1 Allan Day 2013-02-13 15:24:04 UTC
What would printer sharing mean in this context? Would you be sharing a local printer over the network?
Comment 2 Marek Kašík 2013-02-13 15:26:47 UTC
Yes, it means to share local printers over the network so others can print on them.
Comment 3 Marek Kašík 2013-02-15 17:59:17 UTC
Created attachment 236282 [details]
screenshots of printers sharing

Hi,

here are screenshots of workflow for printers sharing in Sharing panel.

Clicking "Printers Sharing" opens dialog with listed printers. At the same time it asks you for authentication so it can find out whether sharing of printers is enabled globally (because of the switch).
Once you click on a checkbox near a printer another authentication dialog shows up because setting of sharing of a printer needs another type of permission.

Regards

Marek
Comment 4 Norman Smith 2015-05-12 16:36:14 UTC
This needs attention.  In Fedora system-config-printer is not a part of a default Workstation install.

In a discussion of "Why people are not switching to Fedora" the gnome-control-center and system-config* utilities came up.  Please see link below for details: 

https://lists.fedoraproject.org/pipermail/desktop/2015-May/012131.html
Comment 5 Bastien Nocera 2015-05-12 17:22:26 UTC
Marek, can we figure out the technicalities behind the printer configuration first?

First, what do you talk to to enable printers sharing, system-config-printer or CUPS directly? Does it ultimately modify the CUPS configuration, or more things?

The shared printer will work and be advertised for:
- Linux?
- OS X?
- Windows?
- iOS? (support is enabled for it in Ubuntu but not Fedora)
- Android? (does it use Google Printers only? Could this functionality be an entry point configuring Google Cloud Printers in GNOME?)

Can one share remote printers? eg. I have a Wi-Fi printer, not connected directly to my laptop, but want to make it accessible to another OS listed above.

The current code in gnome-settings-daemon handling the per-network sharing requires that services run inside the session/as the user. I guess that means that currently, the user as well as gnome-settings-daemon should be able to start the printer sharing.

All of this might also be slightly complicated by the fact that you might want to share a particular printer in one location, and another printer in another.
Comment 6 Marek Kašík 2015-05-14 11:13:00 UTC
(In reply to Bastien Nocera from comment #5)
> Marek, can we figure out the technicalities behind the printer configuration
> first?
> 
> First, what do you talk to to enable printers sharing, system-config-printer
> or CUPS directly? Does it ultimately modify the CUPS configuration, or more
> things?

We modify CUPS configuration only and we do this via cups-pk-helper.
There are two types of setting.
The first one is whether our local CUPS server will share anything at all by setting CUPS server option '_share_printers' to '1'/'0'.
The second one is done for each printer individually and sets 'Shared Yes/No' for respective item in '/etc/cups/printers.conf'.


> The shared printer will work and be advertised for:
> - Linux?
> - OS X?
> - Windows?
> - iOS? (support is enabled for it in Ubuntu but not Fedora)
> - Android? (does it use Google Printers only? Could this functionality be an
> entry point configuring Google Cloud Printers in GNOME?)

This should work for each application/system which is able to list printers offered by DNSSD protocol.
I guess that Linux, OS X and iOS should be able to see such printers.


> Can one share remote printers? eg. I have a Wi-Fi printer, not connected
> directly to my laptop, but want to make it accessible to another OS listed
> above.

If you have it set on your local CUPS server then you can offer it from your computer (which has to be running and have correct firewall options set).


> The current code in gnome-settings-daemon handling the per-network sharing
> requires that services run inside the session/as the user. I guess that
> means that currently, the user as well as gnome-settings-daemon should be
> able to start the printer sharing.

This is independent on gnome-settings-daemon, it is a system service.


> All of this might also be slightly complicated by the fact that you might
> want to share a particular printer in one location, and another printer in
> another.

This would need some complicated setting in '/etc/cups/cupsd.conf' which is not possible to do via cups-pk-helper so I don't consider this option. Just share it or not.
Comment 7 Bastien Nocera 2015-05-15 13:00:08 UTC
(In reply to Marek Kašík from comment #6)
<snip>
> > The current code in gnome-settings-daemon handling the per-network sharing
> > requires that services run inside the session/as the user. I guess that
> > means that currently, the user as well as gnome-settings-daemon should be
> > able to start the printer sharing.
> 
> This is independent on gnome-settings-daemon, it is a system service.

Which is exactly the problem. I don't want to be sharing:
- printers which aren't there
- my home printer when I'm at the coffee shop

> > All of this might also be slightly complicated by the fact that you might
> > want to share a particular printer in one location, and another printer in
> > another.
> 
> This would need some complicated setting in '/etc/cups/cupsd.conf' which is
> not possible to do via cups-pk-helper so I don't consider this option. Just
> share it or not.

Right. Which means that we'll need to have a polkit helper that doesn't require a password, or replicate gnome-settings-daemon's network monitor in the systemd/system bus realm:
https://git.gnome.org/browse/gnome-settings-daemon/tree/plugins/sharing
Comment 8 Bastien Nocera 2015-05-15 13:04:03 UTC
(In reply to Marek Kašík from comment #6)
<snip>
> > The shared printer will work and be advertised for:
> > - Linux?
> > - OS X?
> > - Windows?
> > - iOS? (support is enabled for it in Ubuntu but not Fedora)
> > - Android? (does it use Google Printers only? Could this functionality be an
> > entry point configuring Google Cloud Printers in GNOME?)
> 
> This should work for each application/system which is able to list printers
> offered by DNSSD protocol.
> I guess that Linux, OS X and iOS should be able to see such printers.

Not iOS for Fedora, but will on Ubuntu. It needs additional metadata which something like:
https://github.com/tjfontaine/airprint-generate
can generate.

I wonder if adding this feature and not supporting Windows is a good idea...
Comment 9 Bastien Nocera 2015-05-15 13:37:13 UTC
Looks like:
https://support.apple.com/kb/DL999?locale=en_GB
would solve the "sharing to Windows" problem.

If this works, and could get mentioned in the Settings docs, then all good.
Comment 10 Marek Kašík 2015-05-15 13:43:48 UTC
(In reply to Bastien Nocera from comment #9)
> Looks like:
> https://support.apple.com/kb/DL999?locale=en_GB
> would solve the "sharing to Windows" problem.
> 
> If this works, and could get mentioned in the Settings docs, then all good.

OK, I'll try the service.
Comment 11 Marek Kašík 2015-05-15 14:21:52 UTC
(In reply to Marek Kašík from comment #10)
> (In reply to Bastien Nocera from comment #9)
> > Looks like:
> > https://support.apple.com/kb/DL999?locale=en_GB
> > would solve the "sharing to Windows" problem.
> > 
> > If this works, and could get mentioned in the Settings docs, then all good.
> 
> OK, I'll try the service.

It works for me, it just doesn't detect printer driver so you have to choose it yourself.
Comment 12 Bastien Nocera 2015-05-15 14:32:49 UTC
(In reply to Marek Kašík from comment #11)
> (In reply to Marek Kašík from comment #10)
> > (In reply to Bastien Nocera from comment #9)
> > > Looks like:
> > > https://support.apple.com/kb/DL999?locale=en_GB
> > > would solve the "sharing to Windows" problem.
> > > 
> > > If this works, and could get mentioned in the Settings docs, then all good.
> > 
> > OK, I'll try the service.
> 
> It works for me, it just doesn't detect printer driver so you have to choose
> it yourself.

Better than nothing, and that means we don't have to launch our own Samba to enable sharing to Windows clients.
Comment 13 Till Kamppeter 2015-05-15 22:52:21 UTC
Note that on Ubuntu systems AirPrint support is already integrated in CUPS, so you do not need to generate metadata with scripts like

https://github.com/tjfontaine/airprint-generate

Simply activate general printer sharing and all printers marked shared are also available for iOS devices. This works with all printers which work with CUPS.
Comment 14 Till Kamppeter 2015-05-15 22:54:11 UTC
AirPrint is also integrated in CUPS on Debian systems as Debian uses the same CUPS packaging as Ubuntu.
Comment 15 Marek Kašík 2017-07-07 10:02:58 UTC
Hi,

just to update on this bug. I've implemented sharing panel's part but I'm still waiting for a CUPS feature which would allow us to share printers on specific network (see https://github.com/apple/cups/issues/5020) to finish it.
The second part would be a check button in printer entry to share specific printer.

Marek
Comment 16 Marek Kašík 2017-07-07 10:03:58 UTC
*** Bug 777882 has been marked as a duplicate of this bug. ***
Comment 17 Till Kamppeter 2018-07-10 08:54:17 UTC
I commented on the mentioned upstream bug report and Mike Sweet told that he will not support selection of interfaces to share to per-printer.

So please let the GUI simply support what CUPS already supports:

- Global switch to share or not to share the locally set up print queues

- For each printer a switch to share it or not

- BrowseAllow, BrowseDeny, ... (Global selection where to share to)

By the  way, can someone migrate this bug report into GitLab?
Comment 18 Georges Basile Stavracas Neto 2018-07-11 22:40:33 UTC
(In reply to Till Kamppeter from comment #17)

> By the  way, can someone migrate this bug report into GitLab?

This ticket will be migrated automatically with the mass migration of gnome-control-center tickets.
Comment 19 Bastien Nocera 2018-07-16 11:37:41 UTC
(In reply to Till Kamppeter from comment #17)
> I commented on the mentioned upstream bug report and Mike Sweet told that he
> will not support selection of interfaces to share to per-printer.

That's only part of what was requested, which we might be able to do without.

The other was being able to control the sharing based on the network that we're connected to, eg. don't share my printer (that's not going to be connected) when I'm connected to a network out of my home. That means that the sharing/unsharing needs to be controllable through other means.

For session-provided shares (eg. the ones implemented in the gnome-settings-daemon's sharing plugin, and listed in the Sharing Settings panel), it's easy to control. For system-wide, we might need something running as root, and its only job to be toggling this on and off, eg. replicating g-s-d's NetworkManager usage outside the session.
Comment 20 André Klapper 2021-06-09 16:33:23 UTC
GNOME is going to shut down bugzilla.gnome.org in favor of gitlab.gnome.org.
As part of that, we are mass-closing older open tickets in bugzilla.gnome.org
which have not seen updates for a longer time (resources are unfortunately
quite limited so not every ticket can get handled).

If you can still reproduce the situation described in this ticket in a recent
and supported software version, then please follow
  https://wiki.gnome.org/GettingInTouch/BugReportingGuidelines
and create a new bug report at
  https://gitlab.gnome.org/GNOME/gnome-control-center/-/issues/

Thank you for your understanding and your help.