Bug 395885 - Printer Settings should be saved under user profile, not global CUPS configuration
Summary: Printer Settings should be saved under user profile, not global CUPS configur...
Status: RESOLVED INTENTIONAL
Alias: None
Product: print-manager
Classification: Frameworks and Libraries
Component: general (show other bugs)
Version: unspecified
Platform: Other Linux
: NOR normal
Target Milestone: ---
Assignee: Daniel Nicoletti
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2018-06-26 10:06 UTC by Angel Docampo
Modified: 2018-07-11 21:56 UTC (History)
2 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments
Per user settings override global settings. (62.15 KB, image/jpeg)
2018-06-28 09:17 UTC, Angel Docampo
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Angel Docampo 2018-06-26 10:06:46 UTC
I found print-manager usage pretty hostile with non-privileged users (i.e.: users who doesn't know the root password or have sudo powers). When that kind of user tries to modify any setting (since quality of the print to its own default printer), is prompted to enter the root credentials (or sudo credentials, as far as I could test) because the changes are saved on /etc/cups/printers.conf instead on ~/.cups/ which I think would be a better place to save user settings.

You can imagine how frustrating must be for that user to select the same printer each and every time he or she wants to print, or trying to change the quality of the print.

Saving the settings on /etc would also difficult several other actions on corporative scenarios, like roaming profiles or multi-seat computers.

So I ask for print-manager to save the settings under user's home. We will kill two birds with one stone: user wouldn't be prompted to enter root's credentials (you can still configure cupsd.conf to control who can modify the settings you want) and it will let set per user configurations.
Comment 1 Daniel Nicoletti 2018-06-26 20:05:53 UTC
print-manager doesn't touch any files by it's own, it only talks CUPS protocol, which is what other desktops also do, I won't even try to write changes to local user because that is likely to break since CUPS doesn't provide any API for that.

I might accept a patch for this if this does look good. But most distros already have the main user as root so that you don't get prompted, and speaking of corporate CUPS process is so small that you usually will be talking to CUPS on your own machine.
Comment 2 Angel Docampo 2018-06-28 09:17:28 UTC
Created attachment 113621 [details]
Per user settings override global settings.

I would love to provide a patch but I can't because I'm not a developer, and I didn't see the code, but CUPS provide some utilities (lpoptions, lpq, lpstat, lpadmin, and so) which modify the user's printers, without the need to be superuser or root. You need (by default) to be root to add new printers, but CUPS let the user set the default settings for each printer. 

If you see the attachment, you'll see how I had set the default printer with `lpoptions -d printername` it will set printername as my user's default printer, ignoring the settings I have on the print-manager -kate shows my user's default printer, not the system printer shown on print-manager- as it doesn't look at the user's configuration, but the global's one.

I think both home and enterprise users would benefit if print-manager looks onto user's settings to set the printer preferences.
Comment 3 Daniel Nicoletti 2018-06-28 12:57:01 UTC
First let me better explain why I'm not going to fix this, I work on free time, so my free time is precious, if this was a bug that crashed the software or make it misbehave I'd surely fix it, but this is a FEATURE that I don't use, and that CUPS AFAIK doesn't have any API to dealing with it, which means if I add this feature and CUPS change the way it behaves tomorrow I'll have new bugs to fix. Having a command line tool that does the job doesn't guarantee any stability as the options might change breaking code at run time.

>I would love to provide a patch but I can't because I'm not a developer

If you are not a developer but is speaking in the name of a company you can pay one to do it, even me as I do freelances. As I said before if the patch looks good I might accept even with the breaks risk as I DO understand this is a nice feature to have, but not one I'll use so I prefer to spend my time on other stuff...
Comment 4 Angel Docampo 2018-06-28 13:10:45 UTC
Thank you Daniel for your fast answer and kind words. I will tell what you say to whom may concern.