--- gdm-2.30.2/common/gdm-common.h-orig 2010-05-19 16:21:14.044456572 -0500 +++ gdm-2.30.2/common/gdm-common.h 2010-05-19 16:21:40.818848325 -0500 @@ -30,6 +30,8 @@ #define GDM_SDTLOGIN_DIR "/var/dt/sdtlogin" #endif +#define GDM_CUSTOM_SESSION "custom" + #define GDM_LAST_LANGUAGE "GDM_LAST_LANGUAGE" #define GDM_LAST_LAYOUT "GDM_LAST_LAYOUT" #define GDM_LAST_SESSION "GDM_LAST_SESSION" --- gdm-2.30.2/daemon/gdm-session-direct.c-orig 2010-05-19 16:21:01.808514111 -0500 +++ gdm-2.30.2/daemon/gdm-session-direct.c 2010-05-19 16:41:38.443933686 -0500 @@ -611,11 +611,22 @@ get_session_command_for_name (const char char *filename; filename = g_strdup_printf ("%s.desktop", name); - - command = NULL; res = get_session_command_for_file (filename, command); g_free (filename); + /* + * The GDM Xsession script honors "custom" as a valid session. If the + * session is one of these, no file is needed, then just run the + * command as "custom". + */ + if (!res && strcmp (name, GDM_CUSTOM_SESSION) == 0) { + g_debug ("No custom desktop file, but accepting it anyway."); + if (command != NULL) { + *command = g_strdup (GDM_CUSTOM_SESSION); + } + res = TRUE; + } + return res; } @@ -2101,18 +2112,13 @@ get_session_command (GdmSessionDirect *s { gboolean res; char *command; - char *filename; - - filename = g_strdup_printf ("%s.desktop", get_session_name (session)); command = NULL; - res = get_session_command_for_file (filename, &command); + res = get_session_command_for_name (get_session_name (session), &command); if (! res) { - g_critical ("Cannot read specified session file: %s", filename); - g_free (filename); + g_critical ("Cannot read specified session file: %s.desktop", session); exit (1); } - g_free (filename); return command; } --- gdm-2.30.2/gui/simple-greeter/gdm-greeter-panel.c-orig 2010-05-19 16:21:25.796705502 -0500 +++ gdm-2.30.2/gui/simple-greeter/gdm-greeter-panel.c 2010-05-19 16:28:32.190142908 -0500 @@ -53,6 +53,7 @@ #include "gdm-session-option-widget.h" #include "gdm-timer.h" #include "gdm-profile.h" +#include "gdm-common.h" #include "na-tray.h" @@ -1115,8 +1116,16 @@ gdm_greeter_panel_set_default_session_na if (session_name != NULL && !gdm_option_widget_lookup_item (GDM_OPTION_WIDGET (panel->priv->session_option_widget), session_name, NULL, NULL, NULL)) { - g_warning ("Default session is not available"); - return; + if (strcmp (session_name, GDM_CUSTOM_SESSION) == 0) { + gdm_option_widget_add_item (GDM_OPTION_WIDGET (panel->priv->session_option_widget), + GDM_CUSTOM_SESSION, + C_("customsession", "Custom"), + _("Custom session"), + GDM_OPTION_WIDGET_POSITION_TOP); + } else { + g_warning ("Default session is not available"); + return; + } } gdm_option_widget_set_default_item (GDM_OPTION_WIDGET (panel->priv->session_option_widget),