GNOME Bugzilla – Bug 679701
Automagically added printers
Last modified: 2014-01-29 10:11:41 UTC
As I was going to review a huge patch today, I was going to use a2ps(1) to pretty-print it. Since I haven't used that tool in a bit I forgot that it by default sends it to the default printer. So this is what happened: $ a2ps gvfs-gdbus-core-squashed.patch [gvfs-gdbus-core-squashed.patch (plain): 316 pages on 158 sheets] request id is HP-Deskjet-6980-series-5 (0 file(s)) [Total: 316 pages on 158 sheets] sent to the default printer [1068 lines wrapped] This caught me by surprise since the only printer I have ever added is my printer at home (an Officejet 4500, also in the screenshot). So I go into the control center and this I see that "HP-Deskjet-6980-series" is the default (see attached screensot). What's worse, there is no way to remove it (the "-" button is not sensitive)! For the record, I never added that printer and I guess it only shows up because it's on the same local network as I'm currently connected to? Printing the document failed (some obscure error message, can't remember) but I was able to go in and cancel the job via the control center. I don't know how printing currently works so it's possible this is not a control center bug at all. But it was suggested that I started by filing a bug here. Thanks. For the record I don't think we should *ever* automatically add any printer (and even worse, make it the default!) - it's just way too dangerous to do things like that behind the users back even if if you are just trying to "help" the user. This is with GNOME 3.4 on Fedora 17.
Created attachment 218451 [details] Screenshot Here's the screenshot mentioned in comment 0.
Hi David, it seems that the printer was automatically added by CUPS. This is caused by "Browsing" ability. You can turn it off by setting it to "Browsing Off" in /etc/cups/cupsd.conf and restarting cups service. Also, you can try to set the printer "Officejet 4500" as a default, this should remove the default flag from the "HP-Deskjet-6980-series-5". Regards Marek
Marek, even if the printer is automatically added by cups, we should always be able to remove it, no ?
(In reply to comment #3) > Marek, even if the printer is automatically added by cups, we should always be > able to remove it, no ? Actually, no, if you remove it (e.g. by lpadmin -x "MyPrinter"), the CUPS will add it again in few seconds. Btw, system-config-printer doesn't allow you to remove it.
Still seems wrong to me, on both ends - we should not add it automatically - we should allow removing it, and that should stick I guess I'm arguing for having 'Browsing Off', but then still show autodiscovered printers in the add-printer dialog - is that easily doable ?
(In reply to comment #5) > Still seems wrong to me, on both ends > > - we should not add it automatically This is default configuration of CUPS, we can not influence this except turning the browsing off (btw, browsing will be removed from CUPS since 1.6). Turning browsing off would mean to call org.opensuse.CupsPkHelper.Mechanism.ServerSetSettings which needs administration authentication (this is additional to the "Unlock" button in the panel). > - we should allow removing it, and that should stick It is not possible with enabled browsing. > I guess I'm arguing for having 'Browsing Off', but then still show > autodiscovered printers in the add-printer dialog - is that easily doable ? These printers can not be shown in the add-printer dialog, they are not detected by CUPS (by cupsGetDevices() function).
> It is not possible with enabled browsing. Well, I guess we could just explicitly ignore them - ie maintain a client-side blacklist of printers to not show. Of course, that list would have to be shared with the gtk print dialog; and we could then show the detected printers from that list in the add-printer dialog. But maybe this needs some more thought. I do think that we probably want printers to show up by default, it just needs to be possible to remove them. I'll talk to the designers about this.
> (btw, browsing will be removed from CUPS since 1.6) Well, in that case, perhaps not worth worrying about
(In reply to comment #8) > > (btw, browsing will be removed from CUPS since 1.6) > > Well, in that case, perhaps not worth worrying about I'm closing this then. Actual version of CUPS is 1.7.x which uses avahi instead of CUPS' own protocol.