From 53cc0f3f6846a2a27887f33ee37a713c3a6f8014 Mon Sep 17 00:00:00 2001
From: Ray Strode <rstrode@redhat.com>
Date: Wed, 3 Apr 2013 10:28:09 -0400
Subject: [PATCH] session: default to gnome-classic session
---
daemon/gdm-session.c | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/daemon/gdm-session.c b/daemon/gdm-session.c
index 87bf74f..0430929 100644
--- a/daemon/gdm-session.c
+++ b/daemon/gdm-session.c
@@ -494,60 +494,68 @@ get_session_command_for_name (const char *name,
return res;
}
static const char *
get_default_language_name (GdmSession *self)
{
if (self->priv->saved_language != NULL) {
return self->priv->saved_language;
}
return setlocale (LC_MESSAGES, NULL);
}
static const char *
get_fallback_session_name (GdmSession *self)
{
const char **search_dirs;
int i;
char *name;
GSequence *sessions;
GSequenceIter *session;
if (self->priv->fallback_session_name != NULL) {
/* verify that the cached version still exists */
if (get_session_command_for_name (self->priv->fallback_session_name, NULL)) {
goto out;
}
}
+ name = g_strdup ("gnome-classic");
+ if (get_session_command_for_name (name, NULL)) {
+ g_free (self->priv->fallback_session_name);
+ self->priv->fallback_session_name = name;
+ goto out;
+ }
+ g_free (name);
+
name = g_strdup ("gnome");
if (get_session_command_for_name (name, NULL)) {
g_free (self->priv->fallback_session_name);
self->priv->fallback_session_name = name;
goto out;
}
g_free (name);
sessions = g_sequence_new (g_free);
search_dirs = get_system_session_dirs ();
for (i = 0; search_dirs[i] != NULL; i++) {
GDir *dir;
const char *base_name;
dir = g_dir_open (search_dirs[i], 0, NULL);
if (dir == NULL) {
continue;
}
do {
base_name = g_dir_read_name (dir);
if (base_name == NULL) {
break;
}
if (!g_str_has_suffix (base_name, ".desktop")) {
continue;
--
1.8.1