Bug#868728: cups requires do lpadmin configuration to share printers

2017-07-18 Thread Antoine Beaupré
On 2017-07-18 17:19:08, Brian Potkin wrote:
> On Mon 17 Jul 2017 at 20:56:48 -0400, Antoine Beaupre wrote:
>
>> Package: cups
>> Version: 2.2.1-8
>> Severity: normal
>> 
>> Hi!
>
> Hello Antoine. Thank you for your report.
>  
>> When trying to share my printers with my roommates through the CUPS
>> web interface, I quickly found the "Share printers connected to this
>> system" button and clicked it. And lo and behold, other Linux (and
>> probably Mac, haven't tried) computers just see the printers and can
>> print to it. Great!
>
> What do you mean by "just see the printers"?

I mean that, when they choose the "Print..." menu in an application
(e.g. Firefox or Evince), the printer shows up in the printer selection
dialog.

> My understanding would be that when you switch your server on, its
> printers simply appear in the output of 'lpstat -a' (and in the
> printing dialogs of applications) on client machines.

I haven't tested the commandline version of this usage. I assume my
users are not proficient with the commandline and like to use the GUI
for things like printing... 

> This is achieved through the agency of cups-browsed and does not
> involve the owners of these machines touching a single key on the
> keyboard.  If they have done, they are probably going about it in the
> wrong way. Close down your server and the printers disappear from
> 'lpstat -a'.

Sure. The clients did not touch the keyboard: only the mouse. ;)

>> But when they do, they get this mysterious error message: "Filter
>> failed". Searching for that error message on the web is a dead end:
>> you end up with all sorts of errors with foomatic-db not being
>> configured properly and so on. This problem is remote-specific:
>> printing works fine on the local machine, just not from the remote
>> CUPS clients.
>
> We would need an error_log from a client to get to the bottom of this.
> The Printing section on wiki will guide you on this. Please compress
> the file before sending it to the bug.

Understood, I'll see if i can find the time to send this.

Actually, looking at the "Printing" page on the wiki:

https://wiki.debian.org/Printing

I do not see exactly what you are refering to.

Or are you refering to this page:

https://wiki.debian.org/DissectingandDebuggingtheCUPSPrintingSystem

I must say the "Printing" page is a little confusing: there are too many
links there and it's hard to figure out what's what. A "troubleshooting"
section would be really helpful, for example. :)

>> I have found this bug in the RedHat bugtracker that seems similar to
>> the situation I'm seeing here:
>> 
>> https://bugzilla.redhat.com/show_bug.cgi?id=1010580
>> 
>> This is another forum with the simple solution:
>> 
>> https://ubuntuforums.org/showthread.php?t=2254352
>> 
>> .. which is to run the following command, in a terminal:
>> 
>>sudo lpadmin -p HP-LaserJet-p3015 -m raw
>> 
>> where "HP-LaserJet-p3015" is the printer name.
>> 
>> It seems to me a little odd that I would need to do this, as a user. I
>> would expect the graphical interface to do the right thing, or just
>> not offer the functionality at all. In the RH bugtracker, there's a
>> debate regarding whether this is an actual bug, as this seems to be
>> upstream's behavior of choice, but I fail to see how this is an
>> appropriate response... I am using what are mostly default
>> configurations here and didn't do anything special on the remote
>> computer.
>
> cups-browsed does the right thing. The web interface does the right
> thing too; a user who chose other than the raw "PPD" as an alternative
> to using cups-browsed would be working against it.

The user, AFAIK, did not make any specific choice on the printer
configuration.

>> It seems to me it would be essential to be able to share printers
>> through the GUI in Debian, out of the box. Having people go through
>> the commandline to workaround such an issue seems to defeat the whole
>> point of having that GUI in the first place.
>> 
>> Or did I miss something?
>
> The Printer section's account of "Double Filtering" on the wiki? :)

I am not sure how I was expected to find this, but I did find this page
after doing a full text search for the "double filtering" quoted string:

https://wiki.debian.org/PrintQueuesCUPS#Double_Filtering

Reading that section just makes me more confused - while I am sure I
could spend the next 15 minutes trying to understand all the subtleties
of the CUPS internals, I fail to see how users are expected to learn
that stuff just to share printers over the network.

I don't understand the trade-offs here: why isn't "raw" processing
the default? What's the downside, if it allows automatic remote printing
configurations?

If I need to install cups-browsed on the client, why isn't that
installed by default?

It certainly seems to me that we expect way too much of our poor
users. I've been using Debian for over a decade, and I've been a DD for
years now, and I took my about 30 minutes to figure out how to 

Bug#868728: cups requires do lpadmin configuration to share printers

2017-07-18 Thread Antoine Beaupré
On 2017-07-18 23:17:10, Brian Potkin wrote:
> On Tue 18 Jul 2017 at 14:43:19 -0400, Antoine Beaupré wrote:
>
>> On 2017-07-18 17:19:08, Brian Potkin wrote:
>> 
>> https://wiki.debian.org/PrintQueuesCUPS#Double_Filtering
>> 
>> Reading that section just makes me more confused - while I am sure I
>> could spend the next 15 minutes trying to understand all the subtleties
>> of the CUPS internals, I fail to see how users are expected to learn
>> that stuff just to share printers over the network.
>
> Users are not sharing printers. You (and your server) are.

I don't get this. I am not a user?

And I would argue this is not a "server": it's my workstation, to which
a printer is connected. I just want to share that printer.

>> I don't understand the trade-offs here: why isn't "raw" processing
>> the default? What's the downside, if it allows automatic remote printing
>> configurations?
>
> The problem appears to be you have a client which isn't doing raw
> processing. Sort them out,

Is that normal behavior? Or is this a symptom of some (possible
deliberate) misconfiguration on that client?

>> If I need to install cups-browsed on the client, why isn't that
>> installed by default?
>
> It is recommended by cups-daemon, so it is hard to avoid unless you
> choose to. 

Understood.

>> It certainly seems to me that we expect way too much of our poor
>> users. I've been using Debian for over a decade, and I've been a DD for
>> years now, and I took my about 30 minutes to figure out how to make this
>> work. I consider myself lucky that I find the magic incantation at all,
>> and would be very surprised if a normal user would manage to fix this on
>> their own.
>> 
>> I guess one thing remains unclear to me: is remote printing automatic
>> configuration supposed to work without commandline intervention right
>> now? Or are we expected to switch the queue to raw mode on the server
>> when we want to share printers? It seemed to me this was the issue here,
>> but maybe that assumption is flawed...
>
> Remote printing works out of the box without commandline intervention.

Thanks for the clarification,

a.

-- 
Wherever they's a fight so hungry people can eat, I'll be there.
Wherever they's a cop beatin' up a guy, I'll be there.
If Casy knowed, why, I'll be in the way guys yell when they're mad an'
I'll be in the way kids laugh when they're hungry an' they know
supper's ready. An' when our folks eat the stuff they raise an' live
in the house they build, why I'll be there.
- John Steinbeck, The Grapes of Wrath



Bug#868728: cups requires do lpadmin configuration to share printers

2017-07-18 Thread Antoine Beaupré
On 2017-07-19 00:23:32, Brian Potkin wrote:
> Just a normal misconfiguration. Tell them not to do double filtering.
> It's evil and completely unnecessary.

I guess this is the root of the problem. I don't even know how they/I
did that in the first place.

I wouldn't even know how to undo the `lpadmin raw` thing i did to
workaround the problem in the first place.

A.

-- 
The Net treats censorship as damage and routes around it.
 - John Gilmore