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 758170 - "Print Test Page" doesn't prompt for authentication information
"Print Test Page" doesn't prompt for authentication information
Status: RESOLVED OBSOLETE
Product: gnome-control-center
Classification: Core
Component: Printers
3.18.x
Other Linux
: Normal normal
: ---
Assigned To: Marek Kašík
Control-Center Maintainers
triaged
Depends on:
Blocks:
 
 
Reported: 2015-11-16 11:48 UTC by Sitsofe Wheeler
Modified: 2021-06-09 16:24 UTC
See Also:
GNOME target: ---
GNOME version: 3.17/3.18


Attachments
Proposed workflow (224.27 KB, image/png)
2018-01-31 15:12 UTC, Marek Kašík
  Details
Add ability to authenticate print jobs (6.22 KB, patch)
2018-02-16 16:06 UTC, Marek Kašík
committed Details | Review
Get "job-hold-until" attribute for jobs (5.40 KB, patch)
2018-02-16 16:07 UTC, Marek Kašík
committed Details | Review
Add authentication dialog for print jobs (30.06 KB, patch)
2018-02-16 16:07 UTC, Marek Kašík
needs-work Details | Review
Add method for authentication of jobs to PpPrinterEntry (6.29 KB, patch)
2018-02-16 16:08 UTC, Marek Kašík
committed Details | Review
Add commandline action "authenticate-jobs" (5.67 KB, patch)
2018-02-16 16:08 UTC, Marek Kašík
committed Details | Review
Add authentication dialog for print jobs (30.53 KB, patch)
2018-02-19 00:11 UTC, Marek Kašík
committed Details | Review
Make jobs dialog wider (1.66 KB, patch)
2018-02-19 00:12 UTC, Marek Kašík
committed Details | Review
Infobar informing about need for authentication (55.55 KB, image/png)
2018-02-19 09:37 UTC, Marek Kašík
  Details
Popup dialog for entering credentials (58.07 KB, image/png)
2018-02-19 09:38 UTC, Marek Kašík
  Details
Fix GVariant handling (1.90 KB, patch)
2018-02-21 17:08 UTC, Marek Kašík
committed Details | Review
Add commandline action "show-jobs" (2.59 KB, patch)
2018-02-21 17:10 UTC, Marek Kašík
committed Details | Review

Description Sitsofe Wheeler 2015-11-16 11:48:21 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.
Comment 1 Marek Kašík 2017-02-03 12:26:35 UTC
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.
Comment 2 Marek Kašík 2018-01-31 15:12:13 UTC
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 .
Comment 3 Marek Kašík 2018-02-02 17:46:05 UTC
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.
Comment 4 Marek Kašík 2018-02-16 16:06:50 UTC
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.
Comment 5 Marek Kašík 2018-02-16 16:07:09 UTC
Created attachment 368430 [details] [review]
Get "job-hold-until" attribute for jobs
Comment 6 Marek Kašík 2018-02-16 16:07:40 UTC
Created attachment 368431 [details] [review]
Add authentication dialog for print jobs

This is the actual UI change.
Comment 7 Marek Kašík 2018-02-16 16:08:04 UTC
Created attachment 368432 [details] [review]
Add method for authentication of jobs to PpPrinterEntry
Comment 8 Marek Kašík 2018-02-16 16:08:26 UTC
Created attachment 368433 [details] [review]
Add commandline action "authenticate-jobs"
Comment 9 Piotr Drąg 2018-02-16 17:30:04 UTC
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
Comment 10 Marek Kašík 2018-02-16 18:18:35 UTC
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.
Comment 11 Marek Kašík 2018-02-19 00:11:15 UTC
Created attachment 368536 [details] [review]
Add authentication dialog for print jobs

The same patch with added mnemonics and removed mark-ups from translatable strings.
Comment 12 Marek Kašík 2018-02-19 00:12:22 UTC
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.
Comment 13 Felipe Borges 2018-02-19 08:53:07 UTC
Review of attachment 368429 [details] [review]:

sure.
Comment 14 Felipe Borges 2018-02-19 08:57:49 UTC
Review of attachment 368430 [details] [review]:

sure
Comment 15 Felipe Borges 2018-02-19 08:59:46 UTC
Review of attachment 368432 [details] [review]:

ok
Comment 16 Felipe Borges 2018-02-19 09:02:43 UTC
Review of attachment 368433 [details] [review]:

sure.
Comment 17 Felipe Borges 2018-02-19 09:08:25 UTC
Review of attachment 368536 [details] [review]:

lgtm.

Don't forget to ask for a freeze exception.
Comment 18 Felipe Borges 2018-02-19 09:12:35 UTC
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.
Comment 19 Marek Kašík 2018-02-19 09:37:47 UTC
Created attachment 368548 [details]
Infobar informing about need for authentication
Comment 20 Marek Kašík 2018-02-19 09:38:15 UTC
Created attachment 368549 [details]
Popup dialog for entering credentials
Comment 21 Marek Kašík 2018-02-19 09:45:01 UTC
Thank you for the reviews! I've just asked for the exception.
Comment 22 Marek Kašík 2018-02-21 17:08:23 UTC
Created attachment 368723 [details] [review]
Fix GVariant handling

I've discovered a small issue with one of my patches.
Comment 23 Marek Kašík 2018-02-21 17:10:07 UTC
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.
Comment 24 Felipe Borges 2018-02-26 12:41:18 UTC
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.
Comment 25 Felipe Borges 2018-02-26 12:45:01 UTC
Review of attachment 368724 [details] [review]:

Works great. Thx!
Comment 26 Marek Kašík 2018-02-26 13:39:17 UTC
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.
Comment 27 André Klapper 2021-06-09 16:24:48 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.