GNOME Bugzilla – Bug 758170
"Print Test Page" doesn't prompt for authentication information
Last modified: 2021-06-09 16:24:48 UTC
Description of the problem: If you print a test page to a printer queue that requires authentication it will be held in the queue but you won't know why... Steps to reproduce: 1. Add a printer queue that requires authentication (e.g. using the steps mentioned in bug #758146 ). 2. In the main window select the printer down the left and click the Print Test Page button. 3. Click on the Show Jobs button. Expected results: After step 2. to be prompted for Windows authentication information and for a test page to be printed. Actual result: No authentication information is prompted, no print job appears out of the printer. After step 3. it is possible to see the Test page job is held but the reason why it is held is not visible. Additional information: Running lpstat -p at the command line outputs the following: printer hp-LaserJet-1320 is idle. enabled since Mon 16 Nov 2015 11:40:19 GMT Tree connect failed (NT_STATUS_ACCESS_DENIED) Printing a page from gedit correctly prompts for authentication information.
This should be solved by #766563 in gnome-settings-daemon once it is fixed. I'll keep this bug open since I'm thinking about adding the auth dialog into Jobs dialog of Printers panel.
Created attachment 367712 [details] Proposed workflow Currently, users have no way to authenticate their print jobs in Gnome once they were submitted for print. They have to provide the info to the print dialog but if user provides wrong password for example then the print job just stays in the queue and does not proceed. Attached is a proposed workflow for adding this possibility to gnome-control-center's Printers panel. It consists in changing icon of a job which needs authentication from the "play" icon to the unlock one. Clicking on it will bring user to an authentication dialog which will offer him/her GtkEntries for requested info (e.g. username and password). Once he/she enters the info the button "Print" becomes sensitive and clicking it will send the job for printing. There is also the back button which will bring him/her back to the list of active jobs for the printer. There is also second part for this which should be implemented in gnome-settings-daemon and is tracked in the bug #766563 .
I've attached a proposal of gsd notification of this feature to https://bugzilla.gnome.org/show_bug.cgi?id=766563#c7. Once you click on the notification it opens directly the authentication dialog for the print job.
Created attachment 368429 [details] [review] Add ability to authenticate print jobs Here are the patches which implements the auth dialog popup from https://raw.githubusercontent.com/gnome-design-team/gnome-mockups/master/system-settings/printing/printers.png.
Created attachment 368430 [details] [review] Get "job-hold-until" attribute for jobs
Created attachment 368431 [details] [review] Add authentication dialog for print jobs This is the actual UI change.
Created attachment 368432 [details] [review] Add method for authentication of jobs to PpPrinterEntry
Created attachment 368433 [details] [review] Add commandline action "authenticate-jobs"
Review of attachment 368431 [details] [review]: ::: panels/printers/pp-jobs-dialog.c @@ +250,3 @@ + { + /* Translators: Job's state (job needs authentication to proceed further) */ + state_string = g_strdup (C_("print job", "<span foreground=\"#ff0000\">Authentication required</span>")); Mark-up in strings should be avoided — it’s even a GNOME Goal. :) https://wiki.gnome.org/Initiatives/GnomeGoals/RemoveMarkupInMessages
Review of attachment 368431 [details] [review]: ::: panels/printers/jobs-dialog.ui @@ +121,3 @@ + <child> + <object class="GtkButton" id="authenticate-button"> + <property name="label" translatable="yes">Authenticate</property> Add mnemonics where applicable as suggested by Piotr.
Created attachment 368536 [details] [review] Add authentication dialog for print jobs The same patch with added mnemonics and removed mark-ups from translatable strings.
Created attachment 368537 [details] [review] Make jobs dialog wider Allan suggested to make the jobs dialog wider and to not resize if a job title is long.
Review of attachment 368429 [details] [review]: sure.
Review of attachment 368430 [details] [review]: sure
Review of attachment 368432 [details] [review]: ok
Review of attachment 368433 [details] [review]: sure.
Review of attachment 368536 [details] [review]: lgtm. Don't forget to ask for a freeze exception.
Review of attachment 368537 [details] [review]: Widening the panel doesn't seem to scale well. Since the main control-center shell requests 980x640, this should be fine tho. I guess in the future we need to discuss whether breaking the line, tooltiping, or nothing (ellipsize), as a solution to long job titles.
Created attachment 368548 [details] Infobar informing about need for authentication
Created attachment 368549 [details] Popup dialog for entering credentials
Thank you for the reviews! I've just asked for the exception.
Created attachment 368723 [details] [review] Fix GVariant handling I've discovered a small issue with one of my patches.
Created attachment 368724 [details] [review] Add commandline action "show-jobs" We've agreed with Allan to show the Jobs dialog when user clicks on notification informing him/her about authentication requirement. This patch adds corresponding commandline action to Printers panel.
Review of attachment 368723 [details] [review]: sure. Sorry for letting it slip through my previous review. Alternatively we could use g_autoptr. But this is fine for now. Please push.
Review of attachment 368724 [details] [review]: Works great. Thx!
Comment on attachment 368724 [details] [review] Add commandline action "show-jobs" Thank you for the reviews. I've pushed the patches to master branch. I'll keep this bug opened because of showing the need of authentication in the printer entry.
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.