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 642988 - assumes session name is always set
assumes session name is always set
Status: RESOLVED FIXED
Product: gnome-session
Classification: Core
Component: gnome-session
2.91.x
Other Linux
: Normal critical
: ---
Assigned To: Session Maintainers
Session Maintainers
Depends on:
Blocks:
 
 
Reported: 2011-02-22 19:42 UTC by Bill Nottingham
Modified: 2011-02-22 20:15 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
manager: Handle session name being NULL from gdm (1.65 KB, patch)
2011-02-22 19:55 UTC, Colin Walters
committed Details | Review
Don't check for fallback if the session is not set. (1019 bytes, patch)
2011-02-22 19:57 UTC, Bill Nottingham
none Details | Review

Description Bill Nottingham 2011-02-22 19:42:21 UTC
static void
possibly_show_fallback_dialog (GsmManager *manager)
{
        if (manager->priv->is_fallback_session &&
            strcmp (manager->priv->session_name, "gnome-fallback") == 0 &&
            g_settings_get_boolean (manager->priv->settings,
                                    KEY_SHOW_FALLBACK_WARNING)) {
...
        } else if (strcmp (manager->priv->session_name, "gnome") == 0 &&
...
        }

This assumes that the session name is always set.

However:

gboolean
gsm_session_fill (GsmManager  *manager,
                  char       **override_autostart_dirs,
                  const char  *session)
{
        GKeyFile *keyfile;
        gboolean is_fallback;
        char *actual_session;

        if (override_autostart_dirs != NULL) {
                load_override_apps (manager, override_autostart_dirs);
                return TRUE;
        }

        if (IS_STRING_EMPTY (session))
                session = _gsm_manager_get_default_session (manager);

If we pass autostart overrides, setting of the session name, etc. doesn't happen.

Hence, the gdm greeter (which passes overrides) goes into a crash loop.

gnome-session-2.91.90-1.fc15.1.x86_64
gdm-2.91.6-10.fc15.x86_64

Not being a core dev, dunno whether the fix is to initialize the session name, etc. in all cases, or to switch GDM to defining a session that it passes in.
Comment 1 Colin Walters 2011-02-22 19:46:31 UTC
Hmm.  Possibly gdm should be using a session, and not overriding the autostart.  But that gets messy, since then we'll get other random crud from the autostart in login.

Easiest thing here is just to handle session being NULL here I guess.
Comment 2 Colin Walters 2011-02-22 19:55:52 UTC
Created attachment 181626 [details] [review]
manager: Handle session name being NULL from gdm
Comment 3 Bill Nottingham 2011-02-22 19:57:18 UTC
Created attachment 181627 [details] [review]
Don't check for fallback if the session is not set.

This can happen if the session is started with autostart overrides, for example.
Comment 4 Colin Walters 2011-02-22 20:00:46 UTC
Attachment 181626 [details] pushed as 0b71e3d - manager: Handle session name being NULL from gdm
Comment 5 Ray Strode [halfline] 2011-02-22 20:15:55 UTC
see bug 637883 for gdm-gets-its-own-session