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 703972 - GDM does not display banner when disable-user-list is set to true
GDM does not display banner when disable-user-list is set to true
Status: RESOLVED FIXED
Product: gnome-shell
Classification: Core
Component: login-screen
3.8.x
Other Linux
: Normal major
: ---
Assigned To: Ray Strode [halfline]
gnome-shell-maint
: 708323 (view as bug list)
Depends on:
Blocks:
 
 
Reported: 2013-07-10 21:38 UTC by alcantar4
Modified: 2015-03-04 12:48 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
mockup experiments (616.32 KB, image/png)
2013-10-01 08:20 UTC, Allan Day
  Details
loginDialog: display banner message when disable-user-list=true (15.18 KB, patch)
2013-11-08 04:25 UTC, Ray Strode [halfline]
needs-work Details | Review
loginDialog: allocate children manually (13.44 KB, patch)
2014-11-14 20:44 UTC, Ray Strode [halfline]
committed Details | Review
loginDialog: display banner message when disable-user-list=true (25.36 KB, patch)
2014-11-14 20:44 UTC, Ray Strode [halfline]
committed Details | Review
loginDialog: use two column view if banner message long (8.81 KB, patch)
2014-11-14 20:45 UTC, Ray Strode [halfline]
committed Details | Review

Description alcantar4 2013-07-10 21:38:55 UTC
GDM does not display custom banner with the following settings:

disable-user-list=true
banner-message-enable=true
banner-message-text=MyBannerText
Comment 1 Ray Strode [halfline] 2013-07-11 14:41:26 UTC
We probably back it into the wrong box.
Comment 2 Ray Strode [halfline] 2013-09-30 18:13:14 UTC
*** Bug 708323 has been marked as a duplicate of this bug. ***
Comment 3 Allan Day 2013-10-01 08:20:07 UTC
I've done a few experiments to see how we can fit in a banner with everything else on screen. It becomes a bit difficult with the user list and the distributor logo.

There are probably three options here:

 1. Ensure that the banner scrolls if there isn't enough space for it, and maybe adjust its placement depending on the height of the list and the presence of a distributor logo.

 2. Force the user list to off when a banner is enabled.

 3. Force the user list to off when there is a banner and a distributor logo.
Comment 4 Allan Day 2013-10-01 08:20:40 UTC
Created attachment 256162 [details]
mockup experiments

A couple of visual experiments.
Comment 5 PatRiehecky 2013-10-01 16:19:41 UTC
not that my opinion matters much, but those look nice to me!
Comment 6 alcantar4 2013-10-01 16:50:18 UTC
I agree those look very nice. However, can the banner text be displayed on top?
Comment 7 Allan Day 2013-10-02 08:49:20 UTC
(In reply to comment #6)
> I agree those look very nice. However, can the banner text be displayed on top?

Why? Please explain if you have any issues with the design.

I did try having the banner text above the login, but found that it threw the screen off-balance.
Comment 8 alcantar4 2013-10-02 16:10:01 UTC
I work for the government, DOE, and the first thing they want the users to see is the government banner. And if at all possible disable the user list.
Comment 9 sébastien lafargue 2013-10-23 20:55:23 UTC
login-screen is split in two parts :  

 the user list, banner etc...
and
 the authprompt for name and password

The code for the banner is actually only in the first part.

Waiting for design decision to add it to second part

( and after Bug 703107 - User list > login screen transition is commited,
 because before patch in bug 703107, we have a different layout in both parts )

Alan, it's in your hands, and actual design ( i mean code ) is with banner on top, not bottom like in the mockup.

See procedure in  Bug 708323 to make it appear.
Comment 10 Ray Strode [halfline] 2013-11-08 04:23:41 UTC
i looked into this off and on the last couple of days and have a patch i'll post.  I actually found it really hard to place the message centered between the user list and bottom of the screen, while adding scrollbars when necessary.
I sort of got the behavior I wanted by laying out the login screen to use an StTable and nested box layouts.

I think, though, maybe a better approach is a custom layout manager, though I haven't investigated doing that sort of thing here, yet.
Comment 11 Ray Strode [halfline] 2013-11-08 04:25:29 UTC
Created attachment 259235 [details] [review]
loginDialog: display banner message when disable-user-list=true

The login screen supports showing a banner message which admins
can use to mention login rules or disclaimers.

This message only shows up currently if the user list is enabled.
Most people who want to show a banner message also want to disable
the user list.

This commit moves the banner message to display when prompting to
the user instead of when showing the user list.

It also moves the banner to a more aesthetically pleasing location
on screen, and adds a scrollbar if the message is too long.
Comment 12 Florian Müllner 2013-11-08 12:08:05 UTC
Review of attachment 259235 [details] [review]:

::: js/gdm/loginDialog.js
@@ +447,3 @@
+        this._authPrompt.actor.y_expand = false;
+        table.pack(this._authPrompt.actor, 0, 0);
+        table.set_span(this._authPrompt.actor, 1, 3);

Ah, I was wondering how you would achieve centering using a table ...

However, there's a serious regression here: as you add authPrompt and userSelectionBox first, the banner (with the reactive ScrollView) now overlaps them partially and blocks events - "Not listed?", "Sign in" etc are only reachable by keynav, but no longer respond to clicks.

Either reorder the code appropriately, or do something like

  this.actor.set_child_above_sibling(this._userSelectionBox, null);
  this.actor.set_child_above_sibling(this._authPrompt.actor, null);

at the end of the function.

A small comment would be good as well I guess, to avoid this trap in the future.
Comment 13 Ray Strode [halfline] 2013-11-08 12:37:30 UTC
I think I'll look into using a custom layout manager instead of using this.  I'm not sure happy with the way the code looks.
Comment 14 Dan Mossor 2014-07-28 21:30:12 UTC
I am in the process of configuring systems using GNOME 3.12 for use by engineers on a United States Government contract. We are required by NIST Special Publication 800-53A, Appendix F-AC, Section AC-8.1 to provide a login banner to users accessing the system. Appendix F-IA, Section IA-5 contains the guidelines that eventually lead to disabling a user list, even though it isn't specifically stated in those items.

Not being able to display a login banner while disabling a user list makes GNOME 3 unusable for secure United States Government use.
Comment 15 Ray Strode [halfline] 2014-11-14 20:44:38 UTC
Created attachment 290734 [details] [review]
loginDialog: allocate children manually

The login screen is pretty custom full screen container and the standard
layout managers aren't really a good fit for the kind of layout that's
happening. This will be even more problematic with upcoming changes
to login banners, so we need to switch techniques.

This commit moves login dialog over to using a custom allocate handler
that has specific domain knowledge of the parts of the login screen
and where they go.
Comment 16 Ray Strode [halfline] 2014-11-14 20:44:49 UTC
Created attachment 290735 [details] [review]
loginDialog: display banner message when disable-user-list=true

The login screen supports showing a banner message which admins
can use to mention login rules or disclaimers.

This message only shows up currently if the user list is enabled.
Most people who want to show a banner message also want to disable
the user list.

This commit moves the banner message to display when the user is
prompted for login credentials instead of when showing the user
list. It also adds a scrollbar if the message is too long.
Comment 17 Ray Strode [halfline] 2014-11-14 20:45:00 UTC
Created attachment 290736 [details] [review]
loginDialog: use two column view if banner message long

Frequently banner messages are longer than can reasonable
fit in a one column view, which leads to a smooshed layout.

This commit changes the layout to a two column view, with the
banner on the left and the prompt on the right, if the banner
message is long enough that it can't fit well above the prompt.
If there isn't enough space for two columns then we keep the
one column layout but add scrollbars.
Comment 18 Ray Strode [halfline] 2014-11-14 20:49:20 UTC
These are the patches I came up with for RHEL.

attachment 290734 [details] [review] switches the layout logic to happen in an allocate handler.  I think that's more appropriate for this kind of custom layout rather than abusing tables.

attachment 290735 [details] [review] makes the banner message show up when asking for the password, instead of at the user list.  This makes more sense, since there's more room on screen then and almost everyone who wants this feature also wants the user list disabled.

attachment 290736 [details] [review] makes the screen use an alternative layout if the banner messages is a full legal tome, in an effort to prevent squashed views with scrollbars.
Comment 19 Jasper St. Pierre (not reading bugmail) 2014-11-14 21:10:38 UTC
Review of attachment 290734 [details] [review]:

Can you use a custom ClutterLayoutManager?
Comment 20 Ray Strode [halfline] 2014-11-14 21:44:57 UTC
I thought about it (see comment 13), but after thinking about it, I decided it wasn't the best idea.  Having a layout manager makes sense when it can be generic without a lot of domain knowledge of what's getting laid out. If I factored this, as is, into a layout manager then the layout manager would need to have specific domain knowledge of the items "add_banner, add_auth_prompt, etc". It would just add a chunk more boilerplate code, have the same allocate handler but moved to the layout manager instead.  There would be no real benefit.

Now what would be cool is a generic layout manager that could accommodate the layout needs of the login screen.  I did spend a little time trying to go that route, but it gets very complicated very quickly. It would be hard to write, hard to debug and add a ton more code.

Middle ground would be to modify one of the existing layout managers to be more flexible and a slightly better fit.  (maybe add a concept like GtkBox's "center widget" that got added in 3.12).  That would require getting changes into clutter and still some contortions in the shell code to do dynamic relayout when the banner gets big. 

I think having a custom allocate handler for specialized, very custom layouts is fine. It's the most concise way to achieve the desired result, and there's a bunch of prior art in the shell source already.
Comment 21 Ray Strode [halfline] 2014-12-18 18:59:11 UTC
I've gone ahead and pushed these. If we end up doing follow up changes, no biggie.

Attachment 290734 [details] pushed as 522fe8e - loginDialog: allocate children manually
Attachment 290735 [details] pushed as 117a81e - loginDialog: display banner message when disable-user-list=true
Attachment 290736 [details] pushed as 7b9be21 - loginDialog: use two column view if banner message long
Comment 22 Iain 2015-03-04 11:54:08 UTC
What released version was this fixed in? I'm using Fedora 21, with GDM 3.14.1-2.fc21, and I can successfully set a banner message with /etc/dconf/db/gdm.d/01-banner-message, but as soon as I set disable-user-list to true, the banner disappears as well.
Comment 23 Florian Müllner 2015-03-04 12:48:41 UTC
It's not in a stable release yet, it was first included in 3.15.3, so the upcoming 3.16/F22 will have it.