gdm r5830 - in trunk: . daemon



Author: mccann
Date: Thu Feb 21 02:28:44 2008
New Revision: 5830
URL: http://svn.gnome.org/viewvc/gdm?rev=5830&view=rev

Log:
2008-02-20  William Jon McCann  <jmccann redhat com>

	* daemon/gdm-session-direct.c: (gdm_session_direct_init),
	(get_session_command_for_file), (get_session_command):
	Add the .desktop extension when looking for session file.



Modified:
   trunk/ChangeLog
   trunk/daemon/gdm-session-direct.c

Modified: trunk/daemon/gdm-session-direct.c
==============================================================================
--- trunk/daemon/gdm-session-direct.c	(original)
+++ trunk/daemon/gdm-session-direct.c	Thu Feb 21 02:28:44 2008
@@ -1224,7 +1224,7 @@
         }
 
         session->priv->session_pid = -1;
-        session->priv->selected_session = g_strdup ("gnome.desktop");
+        session->priv->selected_session = g_strdup ("gnome");
 
         session->priv->environment = g_hash_table_new_full (g_str_hash,
                                                             g_str_equal,
@@ -1595,6 +1595,8 @@
 
         key_file = g_key_file_new ();
 
+        g_debug ("GdmSessionDirect: looking for session file '%s'", file);
+
         error = NULL;
         full_path = NULL;
         res = g_key_file_load_from_dirs (key_file,
@@ -1669,14 +1671,18 @@
 {
         gboolean res;
         char    *command;
+        char    *filename;
+
+        filename = g_strdup_printf ("%s.desktop", session->priv->selected_session);
 
         command = NULL;
-        res = get_session_command_for_file (session->priv->selected_session,
-                                            &command);
+        res = get_session_command_for_file (filename, &command);
         if (! res) {
-                g_critical ("Cannot read specified session file: %s", session->priv->selected_session);
+                g_critical ("Cannot read specified session file: %s", filename);
+                g_free (filename);
                 exit (1);
         }
+        g_free (filename);
 
         return command;
 }



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]