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 708691 - login screen doesn't come up in gnome 3.10
login screen doesn't come up in gnome 3.10
Status: RESOLVED FIXED
Product: gnome-shell
Classification: Core
Component: general
3.4.x
Other Linux
: Normal normal
: ---
Assigned To: gnome-shell-maint
gnome-shell-maint
: 708685 710262 (view as bug list)
Depends on:
Blocks:
 
 
Reported: 2013-09-24 16:37 UTC by Ray Strode [halfline]
Modified: 2015-02-28 05:37 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
loginManager: fix versionCompare function (2.37 KB, patch)
2013-09-24 16:44 UTC, Ray Strode [halfline]
committed Details | Review
ui: drop canLock() function (6.46 KB, patch)
2013-09-24 16:48 UTC, Ray Strode [halfline]
rejected Details | Review

Description Ray Strode [halfline] 2013-09-24 16:37:06 UTC
The gnome-shell versionCompare function in loginManager.js doesn't work properly, so "3.10.0" evaluates less than "3.5.91", which makes the login screen fail to show.

I believe this because it's doing string comparison on the version components and not numerical comparison.
Comment 1 Ray Strode [halfline] 2013-09-24 16:44:36 UTC
Created attachment 255643 [details] [review]
loginManager: fix versionCompare function

It's important to compare the version components as integers,
not strings, so "10" evaulates as greater than "5"

This fixes the login screen in gnome 3.10.
Comment 2 Giovanni Campagna 2013-09-24 16:47:37 UTC
Review of attachment 255643 [details] [review]:

This is correct, but as I mentioned in IRC, we should just remove the version check completely.
Comment 3 Ray Strode [halfline] 2013-09-24 16:48:20 UTC
Created attachment 255644 [details] [review]
ui: drop canLock() function

Realistically, we require GDM and gnome-shell to be coupled.

This commit removes the canLock function and associated version check.
Comment 4 Ray Strode [halfline] 2013-09-24 16:49:41 UTC
(i think both patches should go in, so we leave versionCompare in a known "good" state before we remove it in case it ever gets revived from history.)
Comment 5 Colin Walters 2013-09-24 16:52:12 UTC
*** Bug 708685 has been marked as a duplicate of this bug. ***
Comment 6 Giovanni Campagna 2013-09-24 16:52:57 UTC
Review of attachment 255644 [details] [review]:

The canLock() check exists primarily to support gnome-shell on lightdm/kdm, I don't think we can remove it.

::: js/ui/status/system.js
@@ +247,3 @@
         let showLock = !Main.sessionMode.isLocked && !Main.sessionMode.isGreeter;
         let allowLockScreen = !this._lockdownSettings.get_boolean(DISABLE_LOCK_SCREEN_KEY);
+        this._lockScreenAction.visible = showLock && allowLockScreen;

We're making a sync dbus call everytime you open the menu? Bad!
Main.screenShield != undefined should do the trick without IO.
Comment 7 Jasper St. Pierre (not reading bugmail) 2013-09-24 16:53:03 UTC
Review of attachment 255644 [details] [review]:

Yes.
Comment 8 Jasper St. Pierre (not reading bugmail) 2013-09-24 16:55:02 UTC
(In reply to comment #6)
> The canLock() check exists primarily to support gnome-shell on lightdm/kdm, I
> don't think we can remove it.

Do we care about that usecase?

> We're making a sync dbus call everytime you open the menu? Bad!

Not anymore we aren't.
Comment 9 Giovanni Campagna 2013-09-24 16:56:34 UTC
(In reply to comment #8)
> (In reply to comment #6)
> > The canLock() check exists primarily to support gnome-shell on lightdm/kdm, I
> > don't think we can remove it.
> 
> Do we care about that usecase?

Yes, we do. People are using gnome in ubuntu, we want to support them at least to some extent.
Comment 10 Ray Strode [halfline] 2013-09-24 17:09:20 UTC
we've talked about it more, and checking if GDM is on the bus isn't really right. We should check if the session is a GDM session.  That's easiest done by if (GLib.getenv("GDMSESSION")) so that's probably the best way to go.

I think for the current "crisis" though just doing attachment 255643 [details] [review] is right.
Comment 11 Ray Strode [halfline] 2013-09-24 18:34:25 UTC
Comment on attachment 255643 [details] [review]
loginManager: fix versionCompare function

(this went in but git-bz failed because bugzilla was being moved or something)
Comment 12 Nelson Benitez 2013-09-25 21:47:38 UTC
(In reply to comment #11)
> (From update of attachment 255643 [details] [review])
> (this went in but git-bz failed because bugzilla was being moved or something)

From that patch:

+        let requiredInt = parseInt(required[i]);
+        let referenceInt = parseInt(reference[i]);

could be improved as:

+        let requiredInt = parseInt(required[i], 10);
+        let referenceInt = parseInt(reference[i], 10);

Because adding the 'base' parameter is a recommended practice, otherwise parseInt will return 0 for the strings '08' and '09' as they are recognized as octal. 

See http://stackoverflow.com/questions/850341/how-do-i-work-around-javascripts-parseint-octal-behavior for more info about this.

This is corrected in latest versions of javascript, and I checked it works ok in the firefox 24 of fedora 19, but still fails for the javascript that gjs uses (checked in fedora 19 too).
Comment 13 Ray Strode [halfline] 2013-09-26 13:41:08 UTC
I agree that would have been better.  A couple of things though:

1) in practice, gnome-shell will never have a version component that starts with 08 or 09.
2) the patch already went in, so we sort of missed that boat.  The next change will be to remove the version check entirely.  

You are right, though, not passing the base was a little sloppy.
Comment 14 Ray Strode [halfline] 2013-10-16 19:24:29 UTC
*** Bug 710262 has been marked as a duplicate of this bug. ***
Comment 15 Florian Müllner 2015-02-28 01:26:35 UTC
Is there anything left to do here? Ray?
Comment 16 Ray Strode [halfline] 2015-02-28 05:37:30 UTC
don't think so. these days, checking if GDM is on the bus *is* right because gdm allows unlocking sessions it didn't start now.