From bb733687e8fefde155a8297da1bcd5a67215bc22dfc1c76c810c09e25da83c7b Mon Sep 17 00:00:00 2001 From: OBS User unknown Date: Wed, 13 Aug 2008 23:14:49 +0000 Subject: [PATCH] OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/gnome-session?expand=0&rev=56 --- gnome-session-2.23.4.1.tar.bz2 | 3 - gnome-session-2.23.6.tar.bz2 | 3 + gnome-session-bnc389137-splash-layout.patch | 42 +- gnome-session-ice-auth-for-suid.patch | 21 +- gnome-session-kdm-support.patch | 487 ++++++++++---------- gnome-session-wm-switch.patch | 78 ++-- gnome-session.changes | 27 ++ gnome-session.spec | 53 ++- 8 files changed, 379 insertions(+), 335 deletions(-) delete mode 100644 gnome-session-2.23.4.1.tar.bz2 create mode 100644 gnome-session-2.23.6.tar.bz2 diff --git a/gnome-session-2.23.4.1.tar.bz2 b/gnome-session-2.23.4.1.tar.bz2 deleted file mode 100644 index 2f9731d..0000000 --- a/gnome-session-2.23.4.1.tar.bz2 +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:c9cb06ecc4300313b73e888e20fb27f481a3ee7c43b38c3131c33337ad23b5a7 -size 723228 diff --git a/gnome-session-2.23.6.tar.bz2 b/gnome-session-2.23.6.tar.bz2 new file mode 100644 index 0000000..90814f5 --- /dev/null +++ b/gnome-session-2.23.6.tar.bz2 @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:8356a87e093f208e8c0ae2269c4cbe1772bef9419c6bbdd150872ce52b053e85 +size 779272 diff --git a/gnome-session-bnc389137-splash-layout.patch b/gnome-session-bnc389137-splash-layout.patch index d48fc55..f887a7e 100644 --- a/gnome-session-bnc389137-splash-layout.patch +++ b/gnome-session-bnc389137-splash-layout.patch @@ -1,6 +1,8 @@ ---- gnome-session-2.23.4.1-pre/splash/splash-window.c 2008-04-21 17:38:11.000000000 -0500 -+++ gnome-session-2.23.4.1-work/splash/splash-window.c 2008-07-20 23:07:28.000000000 -0500 -@@ -40,7 +40,7 @@ G_DEFINE_TYPE (GsmSplashWindow, gsm_spla +Index: gnome-session-2.23.6/splash/splash-window.c +=================================================================== +--- gnome-session-2.23.6.orig/splash/splash-window.c ++++ gnome-session-2.23.6/splash/splash-window.c +@@ -41,7 +41,7 @@ G_DEFINE_TYPE (GsmSplashWindow, gsm_spla #define SPLASH_ICON_BORDER 26 #define SPLASH_ICON_SPACING 4 #define SPLASH_ICON_V_OFFSET 28 @@ -9,21 +11,21 @@ #define SPLASH_BASE_ICON_ROWS 1 static gboolean update_trans_effect (gpointer); -@@ -330,7 +330,7 @@ layout_icon (GsmSplashWindow *splash, Sp - { - if (gdk_pixbuf_get_width (si->unscaled) == splash->icon_size && - gdk_pixbuf_get_height (si->unscaled) == splash->icon_size) -- si->scaled = g_object_ref (si->unscaled); -+ si->scaled = gdk_pixbuf_copy (si->unscaled); - else - { - si->scaled = gdk_pixbuf_scale_simple (si->unscaled, splash->icon_size, -@@ -470,7 +470,7 @@ gsm_splash_window_start (GsmSplashWindow - return; +@@ -340,7 +340,7 @@ layout_icon (GsmSplashWindow *splash, + if (!si->scaled) { + if (gdk_pixbuf_get_width (si->unscaled) == splash->icon_size && + gdk_pixbuf_get_height (si->unscaled) == splash->icon_size) { +- si->scaled = g_object_ref (si->unscaled); ++ si->scaled = gdk_pixbuf_copy (si->unscaled); + } else { + si->scaled = gdk_pixbuf_scale_simple (si->unscaled, splash->icon_size, + splash->icon_size, +@@ -469,7 +469,7 @@ gsm_splash_window_start (GsmSplashWindow - pb = gtk_icon_theme_load_icon (splash->icon_theme, icon_name, -- 48, /* icon size */ -+ 22, /* icon size */ - 0 /* flags */, NULL); - if (!pb) - return; + pb = gtk_icon_theme_load_icon (splash->icon_theme, + icon_name, +- 48, /* icon size */ ++ 22, /* icon size */ + 0 /* flags */, + NULL); + if (!pb) { diff --git a/gnome-session-ice-auth-for-suid.patch b/gnome-session-ice-auth-for-suid.patch index 0c7aff7..74ca713 100644 --- a/gnome-session-ice-auth-for-suid.patch +++ b/gnome-session-ice-auth-for-suid.patch @@ -1,14 +1,13 @@ -diff -upr gnome-session-2.23.4.1-pre/gnome-session/xsmp.c gnome-session-2.23.4.1-post/gnome-session/xsmp.c ---- gnome-session-2.23.4.1-pre/gnome-session/xsmp.c 2008-06-03 10:38:18.000000000 -0500 -+++ gnome-session-2.23.4.1-post/gnome-session/xsmp.c 2008-07-20 17:35:00.000000000 -0500 -@@ -481,6 +481,9 @@ update_iceauthority (gboolean adding) - fclose (fp); - ok = TRUE; +diff -aur gnome-session-2.23.5.orig/gnome-session/gsm-xsmp-server.c gnome-session-2.23.5/gnome-session/gsm-xsmp-server.c +--- gnome-session-2.23.5.orig/gnome-session/gsm-xsmp-server.c 2008-07-29 20:02:33.000000000 +0200 ++++ gnome-session-2.23.5/gnome-session/gsm-xsmp-server.c 2008-07-29 20:24:58.000000000 +0200 +@@ -421,6 +421,9 @@ + fclose (fp); + ok = TRUE; -+ /* Lets programs auth with the session even if running as another user ID */ -+ putenv (g_strconcat ("ICEAUTHORITY=", filename, NULL)); ++ /* Lets programs auth with the session even if running as another user ID */ ++ putenv (g_strconcat ("ICEAUTHORITY=", filename, NULL)); + cleanup: - IceUnlockAuthFile (filename); - for (i = 0; i < num_local_xsmp_sockets; i++) -Only in gnome-session-2.23.4.1-post/gnome-session: xsmp.c~ + IceUnlockAuthFile (filename); + for (i = 0; i < server->priv->num_local_xsmp_sockets; i++) { diff --git a/gnome-session-kdm-support.patch b/gnome-session-kdm-support.patch index 0b5a844..7168342 100644 --- a/gnome-session-kdm-support.patch +++ b/gnome-session-kdm-support.patch @@ -1,30 +1,31 @@ ---- gnome-session-2.23.4.1-pre/gnome-session/gdm.c 2008-06-17 08:24:45.000000000 -0500 -+++ gnome-session-2.23.4.1-work/gnome-session/gdm.c 2008-07-20 18:45:07.000000000 -0500 -@@ -57,6 +57,8 @@ +diff -aur gnome-session-2.23.5.orig/gnome-session/gdm.c gnome-session-2.23.5/gnome-session/gdm.c +--- gnome-session-2.23.5.orig/gnome-session/gdm.c 2008-07-22 12:34:41.000000000 +0200 ++++ gnome-session-2.23.5/gnome-session/gdm.c 2008-07-29 23:45:19.000000000 +0200 +@@ -58,6 +58,8 @@ #define GDM_ACTION_STR_REBOOT "REBOOT" #define GDM_ACTION_STR_SUSPEND "SUSPEND" +#define KDM_PROTOCOL_MSG_QUERY_ACTION "caps" + typedef struct { - int fd; - char *auth_cookie; -@@ -65,6 +67,8 @@ typedef struct { + int fd; + char *auth_cookie; +@@ -66,6 +68,8 @@ GdmLogoutAction current_actions; - time_t last_update; + time_t last_update; + -+ guint is_kdm : 1; ++ guint is_kdm : 1; } GdmProtocolData; static GdmProtocolData gdm_protocol_data = { -@@ -72,12 +76,13 @@ static GdmProtocolData gdm_protocol_data - NULL, - GDM_LOGOUT_ACTION_NONE, - GDM_LOGOUT_ACTION_NONE, -- 0 -+ 0, -+ FALSE +@@ -73,12 +77,13 @@ + NULL, + GDM_LOGOUT_ACTION_NONE, + GDM_LOGOUT_ACTION_NONE, +- 0 ++ 0, ++ FALSE }; static char * @@ -33,240 +34,236 @@ +dm_send_protocol_msg (GdmProtocolData *data, + const char *msg) { - GString *retval; - char buf[256]; -@@ -90,7 +95,7 @@ gdm_send_protocol_msg (GdmProtocolData * - { - g_free (p); - -- g_warning ("Failed to send message to GDM: %s", -+ g_warning ("Failed to send message to display manager: %s", - g_strerror (errno)); + GString *retval; + char buf[256]; +@@ -90,7 +95,7 @@ + if (write (data->fd, p, strlen (p)) < 0) { + g_free (p); - return NULL; -@@ -163,7 +168,7 @@ gdm_authenticate_connection (GdmProtocol - - msg = g_strdup_printf (GDM_PROTOCOL_MSG_AUTHENTICATE " %s", - data->auth_cookie); -- response = gdm_send_protocol_msg (data, msg); -+ response = dm_send_protocol_msg (data, msg); - g_free (msg); - - if (response && !strcmp (response, "OK")) -@@ -210,7 +215,7 @@ gdm_authenticate_connection (GdmProtocol - XauDisposeAuth (xau); - - msg = g_strdup_printf (GDM_PROTOCOL_MSG_AUTHENTICATE " %s", buffer); -- response = gdm_send_protocol_msg (data, msg); -+ response = dm_send_protocol_msg (data, msg); - g_free (msg); - - if (response && !strcmp (response, "OK")) -@@ -234,7 +239,7 @@ gdm_authenticate_connection (GdmProtocol +- g_warning ("Failed to send message to GDM: %s", ++ g_warning ("Failed to send message to display manager: %s", + g_strerror (errno)); + + return NULL; +@@ -169,7 +174,7 @@ + + msg = g_strdup_printf (GDM_PROTOCOL_MSG_AUTHENTICATE " %s", + data->auth_cookie); +- response = gdm_send_protocol_msg (data, msg); ++ response = dm_send_protocol_msg (data, msg); + g_free (msg); + + if (response && !strcmp (response, "OK")) { +@@ -214,7 +219,7 @@ + XauDisposeAuth (xau); + + msg = g_strdup_printf (GDM_PROTOCOL_MSG_AUTHENTICATE " %s", buffer); +- response = gdm_send_protocol_msg (data, msg); ++ response = dm_send_protocol_msg (data, msg); + g_free (msg); + + if (response && !strcmp (response, "OK")) { +@@ -237,7 +242,7 @@ } static void -gdm_shutdown_protocol_connection (GdmProtocolData *data) +dm_shutdown_protocol_connection (GdmProtocolData *data) { - if (data->fd) - close (data->fd); -@@ -264,7 +269,7 @@ gdm_init_protocol_connection (GdmProtoco - g_warning ("Failed to create GDM socket: %s", - g_strerror (errno)); + if (data->fd) { + close (data->fd); +@@ -268,7 +273,7 @@ + g_warning ("Failed to create GDM socket: %s", + g_strerror (errno)); -- gdm_shutdown_protocol_connection (data); -+ dm_shutdown_protocol_connection (data); +- gdm_shutdown_protocol_connection (data); ++ dm_shutdown_protocol_connection (data); - return FALSE; - } -@@ -276,19 +281,19 @@ gdm_init_protocol_connection (GdmProtoco - g_warning ("Failed to establish a connection with GDM: %s", - g_strerror (errno)); - -- gdm_shutdown_protocol_connection (data); -+ dm_shutdown_protocol_connection (data); - - return FALSE; - } + return FALSE; + } +@@ -279,18 +284,18 @@ + g_warning ("Failed to establish a connection with GDM: %s", + g_strerror (errno)); -- response = gdm_send_protocol_msg (data, GDM_PROTOCOL_MSG_VERSION); -+ response = dm_send_protocol_msg (data, GDM_PROTOCOL_MSG_VERSION); +- gdm_shutdown_protocol_connection (data); ++ dm_shutdown_protocol_connection (data); - if (!response || strncmp (response, "GDM ", strlen ("GDM ") != 0)) - { - g_free (response); + return FALSE; + } - g_warning ("Failed to get protocol version from GDM"); -- gdm_shutdown_protocol_connection (data); -+ dm_shutdown_protocol_connection (data); +- response = gdm_send_protocol_msg (data, GDM_PROTOCOL_MSG_VERSION); ++ response = dm_send_protocol_msg (data, GDM_PROTOCOL_MSG_VERSION); - return FALSE; - } -@@ -298,13 +303,76 @@ gdm_init_protocol_connection (GdmProtoco - if (!gdm_authenticate_connection (data)) - { - g_warning ("Failed to authenticate with GDM"); -- gdm_shutdown_protocol_connection (data); -+ dm_shutdown_protocol_connection (data); - return FALSE; - } + if (!response || strncmp (response, "GDM ", strlen ("GDM ") != 0)) { + g_free (response); - return TRUE; + g_warning ("Failed to get protocol version from GDM"); +- gdm_shutdown_protocol_connection (data); ++ dm_shutdown_protocol_connection (data); + + return FALSE; + } +@@ -299,13 +304,76 @@ + + if (!gdm_authenticate_connection (data)) { + g_warning ("Failed to authenticate with GDM"); +- gdm_shutdown_protocol_connection (data); ++ dm_shutdown_protocol_connection (data); + return FALSE; + } + + return TRUE; } +static gboolean +kdm_init_protocol_connection (GdmProtocolData *data) +{ -+ struct sockaddr_un addr; -+ char *dm_display; -+ char *dm_control; -+ char *p0 = NULL; ++ struct sockaddr_un addr; ++ char *dm_display; ++ char *dm_control; ++ char *p0 = NULL; + -+ g_assert (data->fd <= 0); ++ g_assert (data->fd <= 0); + -+ data->fd = socket (AF_UNIX, SOCK_STREAM, 0); -+ if (data->fd < 0) { -+ g_warning ("Failed to create KDM socket: %s", -+ g_strerror (errno)); -+ dm_shutdown_protocol_connection (data); -+ return FALSE; -+ } ++ data->fd = socket (AF_UNIX, SOCK_STREAM, 0); ++ if (data->fd < 0) { ++ g_warning ("Failed to create KDM socket: %s", ++ g_strerror (errno)); ++ dm_shutdown_protocol_connection (data); ++ return FALSE; ++ } + -+ dm_display = g_strdup (g_getenv ("DISPLAY")); -+ dm_control = g_strdup (g_getenv ("DM_CONTROL")); ++ dm_display = g_strdup (g_getenv ("DISPLAY")); ++ dm_control = g_strdup (g_getenv ("DM_CONTROL")); + -+ if (dm_display && (p0 = strchr (dm_display, ':'))) -+ p0 = strchr (p0, '.'); ++ if (dm_display && (p0 = strchr (dm_display, ':'))) ++ p0 = strchr (p0, '.'); + -+ if (!dm_control || !strlen (dm_control) || -+ !dm_display || !strlen (dm_display)) { -+ g_free (dm_control); -+ g_free (dm_display); ++ if (!dm_control || !strlen (dm_control) || ++ !dm_display || !strlen (dm_display)) { ++ g_free (dm_control); ++ g_free (dm_display); + -+ g_warning ("Could not locate KDM socket."); -+ dm_shutdown_protocol_connection (data); -+ return FALSE; -+ } ++ g_warning ("Could not locate KDM socket."); ++ dm_shutdown_protocol_connection (data); ++ return FALSE; ++ } + -+ snprintf (addr.sun_path, sizeof (addr.sun_path), "%s/dmctl-%.*s/socket", -+ dm_control, p0 ? p0 - dm_display : 512, dm_display); -+ addr.sun_family = AF_UNIX; ++ snprintf (addr.sun_path, sizeof (addr.sun_path), "%s/dmctl-%.*s/socket", ++ dm_control, p0 ? p0 - dm_display : 512, dm_display); ++ addr.sun_family = AF_UNIX; + -+ g_free (dm_display); -+ g_free (dm_control); ++ g_free (dm_display); ++ g_free (dm_control); + -+ if (connect (data->fd, (struct sockaddr *) &addr, sizeof (addr)) < 0) { -+ g_warning ("Failed to establish a connection with KDM: %s", -+ g_strerror (errno)); -+ dm_shutdown_protocol_connection (data); -+ return FALSE; -+ } ++ if (connect (data->fd, (struct sockaddr *) &addr, sizeof (addr)) < 0) { ++ g_warning ("Failed to establish a connection with KDM: %s", ++ g_strerror (errno)); ++ dm_shutdown_protocol_connection (data); ++ return FALSE; ++ } + -+ return TRUE; ++ return TRUE; +} + +static gboolean +dm_init_protocol_connection (GdmProtocolData *data) +{ -+ if (g_getenv ("DM_CONTROL") && !g_getenv ("GDMSESSION")) { -+ data->is_kdm = TRUE; -+ return kdm_init_protocol_connection (data); -+ } ++ if (g_getenv ("DM_CONTROL") && !g_getenv ("GDMSESSION")) { ++ data->is_kdm = TRUE; ++ return kdm_init_protocol_connection (data); ++ } + -+ data->is_kdm = FALSE; -+ return gdm_init_protocol_connection (data); ++ data->is_kdm = FALSE; ++ return gdm_init_protocol_connection (data); +} + static void gdm_parse_query_response (GdmProtocolData *data, const char *response) -@@ -357,7 +425,21 @@ gdm_parse_query_response (GdmProtocolDat +@@ -360,7 +428,21 @@ } static void -gdm_update_logout_actions (GdmProtocolData *data) +kdm_parse_query_response (GdmProtocolData *data, -+ const char *response) ++ const char *response) +{ -+ data->available_actions = GDM_LOGOUT_ACTION_NONE; -+ data->current_actions = GDM_LOGOUT_ACTION_NONE; ++ data->available_actions = GDM_LOGOUT_ACTION_NONE; ++ data->current_actions = GDM_LOGOUT_ACTION_NONE; + -+ if (!response) -+ return; ++ if (!response) ++ return; + -+ if (strstr (response, "\tshutdown")) -+ data->available_actions |= GDM_LOGOUT_ACTION_SHUTDOWN | GDM_LOGOUT_ACTION_REBOOT; ++ if (strstr (response, "\tshutdown")) ++ data->available_actions |= GDM_LOGOUT_ACTION_SHUTDOWN | GDM_LOGOUT_ACTION_REBOOT; +} + +static void +dm_update_logout_actions (GdmProtocolData *data) { - time_t current_time; - char *response; -@@ -369,25 +451,39 @@ gdm_update_logout_actions (GdmProtocolDa - - data->last_update = current_time; - -- if (!gdm_init_protocol_connection (data)) -+ if (!dm_init_protocol_connection (data)) - return; -- -- if ((response = gdm_send_protocol_msg (data, GDM_PROTOCOL_MSG_QUERY_ACTION))) -+ -+ if (data->is_kdm) { -+ /* KDM */ -+ if ((response = dm_send_protocol_msg (data, KDM_PROTOCOL_MSG_QUERY_ACTION))) { -+ kdm_parse_query_response (data, response); -+ g_free (response); -+ } -+ } else { -+ /* GDM */ -+ if ((response = dm_send_protocol_msg (data, GDM_PROTOCOL_MSG_QUERY_ACTION))) { -+ gdm_parse_query_response (data, response); -+ g_free (response); -+ } -+ } -+ -+ if ((response = dm_send_protocol_msg (data, GDM_PROTOCOL_MSG_QUERY_ACTION))) - { - gdm_parse_query_response (data, response); - g_free (response); - } - -- gdm_shutdown_protocol_connection (data); -+ dm_shutdown_protocol_connection (data); + time_t current_time; + char *response; +@@ -373,26 +455,35 @@ + + data->last_update = current_time; + +- if (!gdm_init_protocol_connection (data)) { ++ if (!dm_init_protocol_connection (data)) { + return; + } + +- if ((response = gdm_send_protocol_msg (data, GDM_PROTOCOL_MSG_QUERY_ACTION))) { +- gdm_parse_query_response (data, response); +- g_free (response); ++ if (data->is_kdm) { ++ /* KDM */ ++ if ((response = dm_send_protocol_msg (data, KDM_PROTOCOL_MSG_QUERY_ACTION))) { ++ kdm_parse_query_response (data, response); ++ g_free (response); ++ } ++ } else { ++ /* GDM */ ++ if ((response = dm_send_protocol_msg (data, GDM_PROTOCOL_MSG_QUERY_ACTION))) { ++ gdm_parse_query_response (data, response); ++ g_free (response); ++ } + } + +- gdm_shutdown_protocol_connection (data); ++ dm_shutdown_protocol_connection (data); } gboolean gdm_is_available (void) { -- if (!gdm_init_protocol_connection (&gdm_protocol_data)) -+ if (!dm_init_protocol_connection (&gdm_protocol_data)) - return FALSE; - -- gdm_shutdown_protocol_connection (&gdm_protocol_data); -+ dm_shutdown_protocol_connection (&gdm_protocol_data); +- if (!gdm_init_protocol_connection (&gdm_protocol_data)) { ++ if (!dm_init_protocol_connection (&gdm_protocol_data)) { + return FALSE; + } - return TRUE; +- gdm_shutdown_protocol_connection (&gdm_protocol_data); ++ dm_shutdown_protocol_connection (&gdm_protocol_data); + + return TRUE; } -@@ -395,7 +491,7 @@ gdm_is_available (void) +@@ -400,7 +491,7 @@ gboolean gdm_supports_logout_action (GdmLogoutAction action) { -- gdm_update_logout_actions (&gdm_protocol_data); -+ dm_update_logout_actions (&gdm_protocol_data); +- gdm_update_logout_actions (&gdm_protocol_data); ++ dm_update_logout_actions (&gdm_protocol_data); - return (gdm_protocol_data.available_actions & action) != 0; + return (gdm_protocol_data.available_actions & action) != 0; } -@@ -403,21 +499,16 @@ gdm_supports_logout_action (GdmLogoutAct +@@ -408,21 +499,15 @@ GdmLogoutAction gdm_get_logout_action (void) { -- gdm_update_logout_actions (&gdm_protocol_data); -+ dm_update_logout_actions (&gdm_protocol_data); - - return gdm_protocol_data.current_actions; +- gdm_update_logout_actions (&gdm_protocol_data); ++ dm_update_logout_actions (&gdm_protocol_data); + + return gdm_protocol_data.current_actions; } -void @@ -274,89 +271,83 @@ +static char * +gdm_logout_action_msg (GdmLogoutAction action) { - char *action_str = NULL; -- char *msg; -- char *response; -- -- if (!gdm_init_protocol_connection (&gdm_protocol_data)) -- return; -- -+ - switch (action) - { - case GDM_LOGOUT_ACTION_NONE: -@@ -433,17 +524,50 @@ gdm_set_logout_action (GdmLogoutAction a - action_str = GDM_ACTION_STR_SUSPEND; - break; - } -+ -+ return g_strdup_printf (GDM_PROTOCOL_MSG_SET_ACTION " %s", action_str); + char *action_str = NULL; +- char *msg; +- char *response; +- +- if (!gdm_init_protocol_connection (&gdm_protocol_data)) { +- return; +- } + + switch (action) { + case GDM_LOGOUT_ACTION_NONE: +@@ -439,16 +524,45 @@ + break; + } + +- msg = g_strdup_printf (GDM_PROTOCOL_MSG_SET_ACTION " %s", action_str); ++ return g_strdup_printf (GDM_PROTOCOL_MSG_SET_ACTION " %s", action_str); +} + +static char * +kdm_logout_action_msg (GdmLogoutAction action) +{ -+ char *msg = NULL; ++ char *msg = NULL; + -+ if (action == GDM_LOGOUT_ACTION_SHUTDOWN) -+ msg = g_strdup ("shutdown\thalt\task"); -+ else if (action == GDM_LOGOUT_ACTION_REBOOT) -+ msg = g_strdup ("shutdown\treboot\task"); ++ if (action == GDM_LOGOUT_ACTION_SHUTDOWN) ++ msg = g_strdup ("shutdown\thalt\task"); ++ else if (action == GDM_LOGOUT_ACTION_REBOOT) ++ msg = g_strdup ("shutdown\treboot\task"); + -+ return msg; ++ return msg; +} + +void +gdm_set_logout_action (GdmLogoutAction action) +{ -+ char *msg; -+ char *response; - -- msg = g_strdup_printf (GDM_PROTOCOL_MSG_SET_ACTION " %s", action_str); -- -- response = gdm_send_protocol_msg (&gdm_protocol_data, msg); -+ if (!dm_init_protocol_connection (&gdm_protocol_data)) -+ return; ++ char *msg; ++ char *response; + -+ if (gdm_protocol_data.is_kdm) -+ msg = kdm_logout_action_msg (action); -+ else -+ msg = gdm_logout_action_msg (action); ++ if (!dm_init_protocol_connection (&gdm_protocol_data)) { ++ return; ++ } + -+ if (!msg) { -+ dm_shutdown_protocol_connection (&gdm_protocol_data); -+ return; -+ } -+ -+ response = dm_send_protocol_msg (&gdm_protocol_data, msg); - - g_free (msg); - g_free (response); - - gdm_protocol_data.last_update = 0; - -- gdm_shutdown_protocol_connection (&gdm_protocol_data); -+ dm_shutdown_protocol_connection (&gdm_protocol_data); ++ if (gdm_protocol_data.is_kdm) ++ msg = kdm_logout_action_msg (action); ++ else ++ msg = gdm_logout_action_msg (action); + +- response = gdm_send_protocol_msg (&gdm_protocol_data, msg); ++ response = dm_send_protocol_msg (&gdm_protocol_data, msg); + + g_free (msg); + g_free (response); + + gdm_protocol_data.last_update = 0; + +- gdm_shutdown_protocol_connection (&gdm_protocol_data); ++ dm_shutdown_protocol_connection (&gdm_protocol_data); } void -@@ -451,15 +575,15 @@ gdm_new_login (void) +@@ -456,16 +570,16 @@ { - char *response; - -- if (!gdm_init_protocol_connection (&gdm_protocol_data)) -+ if (!dm_init_protocol_connection (&gdm_protocol_data)) - return; - -- response = gdm_send_protocol_msg (&gdm_protocol_data, -- GDM_PROTOCOL_MSG_FLEXI_XSERVER); -+ response = dm_send_protocol_msg (&gdm_protocol_data, -+ GDM_PROTOCOL_MSG_FLEXI_XSERVER); - - g_free (response); - - gdm_protocol_data.last_update = 0; - -- gdm_shutdown_protocol_connection (&gdm_protocol_data); -+ dm_shutdown_protocol_connection (&gdm_protocol_data); + char *response; + +- if (!gdm_init_protocol_connection (&gdm_protocol_data)) { ++ if (!dm_init_protocol_connection (&gdm_protocol_data)) { + return; + } + +- response = gdm_send_protocol_msg (&gdm_protocol_data, +- GDM_PROTOCOL_MSG_FLEXI_XSERVER); ++ response = dm_send_protocol_msg (&gdm_protocol_data, ++ GDM_PROTOCOL_MSG_FLEXI_XSERVER); + + g_free (response); + + gdm_protocol_data.last_update = 0; + +- gdm_shutdown_protocol_connection (&gdm_protocol_data); ++ dm_shutdown_protocol_connection (&gdm_protocol_data); } diff --git a/gnome-session-wm-switch.patch b/gnome-session-wm-switch.patch index 6815b20..0665ce7 100644 --- a/gnome-session-wm-switch.patch +++ b/gnome-session-wm-switch.patch @@ -1,45 +1,41 @@ ---- gnome-session-2.23.4.1-pre/gnome-session/session.c 2008-06-17 08:24:45.000000000 -0500 -+++ gnome-session-2.23.4.1-work/gnome-session/session.c 2008-07-20 22:32:00.000000000 -0500 -@@ -347,6 +347,8 @@ append_legacy_session_apps (GsmSession * - { - GKeyFile *saved; - int num_clients, i; -+ gchar *compiz_enable_path; -+ gboolean compiz_enabled = FALSE; - - saved = g_key_file_new (); - if (!g_key_file_load_from_file (saved, session_filename, 0, NULL)) -@@ -356,12 +358,33 @@ append_legacy_session_apps (GsmSession * - return; - } - -+ /* See if compiz is enabled; if it is, we have to replace legacy metacity/compiz -+ * entries with gnome-wm */ -+ compiz_enable_path = g_build_filename (g_get_user_config_dir (), "compiz", "enable-compiz", NULL); -+ compiz_enabled = compiz_enable_path && g_file_test (compiz_enable_path, G_FILE_TEST_IS_REGULAR); -+ g_free (compiz_enable_path); +diff -aur gnome-session-2.23.5.orig/gnome-session/gsm-resumed-app.c gnome-session-2.23.5/gnome-session/gsm-resumed-app.c +--- gnome-session-2.23.5.orig/gnome-session/gsm-resumed-app.c 2008-07-22 12:34:41.000000000 +0200 ++++ gnome-session-2.23.5/gnome-session/gsm-resumed-app.c 2008-07-29 23:23:58.000000000 +0200 +@@ -213,6 +213,22 @@ + char *key; + char *id; + char *val; ++ static gboolean compiz_enabled = FALSE; ++ static gboolean compiz_init = FALSE; + - num_clients = g_key_file_get_integer (saved, "Default", "num_clients", NULL); - for (i = 0; i < num_clients; i++) - { - GsmApp *app = gsm_app_resumed_new_from_legacy_session (saved, i); - if (app) -+ { -+ GsmAppResumed *app_resumed = (GsmAppResumed *) app; ++ if (!compiz_init) { ++ gchar *compiz_enable_path; + -+ /* Maybe replace legacy metacity/compiz with gnome-wm */ -+ if (app_resumed->restart_command && -+ (((!strcmp (app_resumed->restart_command, "metacity") || -+ !strcmp (app_resumed->restart_command, "/usr/bin/metacity")) && compiz_enabled) || -+ (!strcmp (app_resumed->restart_command, "compiz") || -+ !strcmp (app_resumed->restart_command, "/usr/bin/compiz")))) -+ { -+ g_free (app_resumed->restart_command); -+ app_resumed->restart_command = g_strdup ("gnome-wm"); ++ /* See if compiz is enabled; if it is, we have to replace ++ * legacy metacity/compiz entries with gnome-wm */ ++ compiz_enable_path = g_build_filename (g_get_user_config_dir (), ++ "compiz", "enable-compiz", ++ NULL); ++ compiz_enabled = compiz_enable_path && ++ g_file_test (compiz_enable_path, ++ G_FILE_TEST_IS_REGULAR); ++ g_free (compiz_enable_path); + } -+ - append_app (session, app); -+ } - } - g_key_file_free (saved); + key = g_strdup_printf ("%d,id", n); + id = g_key_file_get_string (session_file, "Default", key, NULL); +@@ -242,6 +258,14 @@ + g_free (key); + + if (val) { ++ if (((!strcmp (val, "metacity") || ++ !strcmp (val, "/usr/bin/metacity")) && compiz_enabled) || ++ (!strcmp (val, "compiz") || ++ !strcmp (val, "/usr/bin/compiz"))) { ++ g_free (val); ++ val = g_strdup ("gnome-wm"); ++ } ++ + app->priv->restart_command = val; + } + diff --git a/gnome-session.changes b/gnome-session.changes index 701855f..a06a44e 100644 --- a/gnome-session.changes +++ b/gnome-session.changes @@ -1,3 +1,30 @@ +------------------------------------------------------------------- +Mon Aug 11 11:35:02 CDT 2008 - maw@suse.de + +- Update to version 2.23.6: + + This release merges the D-Bus based branch in GNOME SVN into + the mainline + + Isolate old XSMP code as much as possible, and change + gnome-session's design to not be based upon the XSMP lifecycle + + Add a native D-Bus session management interface + + Provide an adapter interface for legacy XSMP clients + + Autostart changes: + * Improved integration + * New functionality to provide future extensibility + + Provide an "inhibit" API for clients to proactively inform + session management that they're busy + + Provide an improved logout experience +- Respin gnome-session-bnc389137-splash-layout.patch, + gnome-session-kde-support.patch, + gnome-session-ice-auth-for-suid.patch, and + gnome-session-wm-switch.patch (thanks, Vincent). + +------------------------------------------------------------------- +Fri Aug 1 12:10:38 EDT 2008 - mauro@suse.de + +- gnome-session-lang added to the gnome-session package + + This fixes bnc#412155 + ------------------------------------------------------------------- Sun Jul 20 23:21:00 CST 2008 - hpj@suse.de diff --git a/gnome-session.spec b/gnome-session.spec index 8106a5c..8c1f574 100644 --- a/gnome-session.spec +++ b/gnome-session.spec @@ -1,10 +1,17 @@ # -# spec file for package gnome-session (Version 2.23.4.1) +# spec file for package gnome-session (Version 2.23.6) # # Copyright (c) 2008 SUSE LINUX Products GmbH, Nuernberg, Germany. -# This file and all modifications and additions to the pristine -# package are under the same license as the package itself. # +# All modifications and additions to the file contributed by third parties +# remain the property of their copyright owners, unless otherwise agreed +# upon. The license for this file, and modifications and additions to the +# file, is the same license as for the pristine package itself (unless the +# license for the pristine package is not an Open Source License, in which +# case the license is the MIT License). An "Open Source License" is a +# license that conforms to the Open Source Definition (Version 1.9) +# published by the Open Source Initiative. + # Please submit bugfixes or comments via http://bugs.opensuse.org/ # @@ -15,8 +22,8 @@ Name: gnome-session BuildRequires: control-center2-devel fdupes gnome-common gnome-desktop-devel gnome-keyring-devel gnome-patch-translation gnome-settings-daemon-devel hicolor-icon-theme intltool libglade2-devel libgnomekbd libnotify-devel perl-XML-Parser tcpd-devel update-desktop-files License: GPL v2 or later; LGPL v2.1 or later Group: System/GUI/GNOME -Version: 2.23.4.1 -Release: 14 +Version: 2.23.6 +Release: 1 Summary: Session Tools for the GNOME 2.x Desktop Url: http://www.gnome.org Source: %{name}-%{version}.tar.bz2 @@ -30,9 +37,9 @@ Source4: SuSE.desktop Source5: suse-help.svg #PATCH-FIX-OPENSUSE Install files needed by /usr/bin/gnome suse.svg bnc388735 sbrabec@suse.cz Source6: suse.svg -#PATCH-FIX-UPSTREAM gnome-session-ice-auth-for-suid.patch hpj@novell.com -- Carries ICE auth over to other UIDs in this session using an env var. +# PATCH-FIX-UPSTREAM gnome-session-ice-auth-for-suid.patch hpj@novell.com -- Carries ICE auth over to other UIDs in this session using an env var. Patch0: gnome-session-ice-auth-for-suid.patch -#PATCH-FIX-UPSTREAM gnome-session-kdm-support.patch hpj@novell.com -- Adds support for KDM logout commands. +# PATCH-FIX-UPSTREAM gnome-session-kdm-support.patch hpj@novell.com -- Adds support for KDM logout commands. Patch1: gnome-session-kdm-support.patch #PATCH-FIX-OPENSUSE gnome-session-wm-switch.patch bnc180506 danw@novell.com -- Fixes legacy sessions to use gnome-wm instead of metacity/compiz. Patch2: gnome-session-wm-switch.patch @@ -48,6 +55,7 @@ Recommends: control-center2 Obsoletes: gnome-core Requires: hicolor-icon-theme Requires: %{name}-branding +Requires: %{name}-lang = %{version} Suggests: rsh # bug-buddy is required for GTK_MODULES=gnomebreakpad: Requires: bug-buddy @@ -157,7 +165,7 @@ rm -rf $RPM_BUILD_ROOT %{_datadir}/xsessions/*.desktop %{_datadir}/icons/hicolor/*/*/*.* %{_datadir}/gnome/autostart/* -%{_datadir}/gnome-session/session-properties.glade +%{_datadir}/gnome-session/*.glade %{_libdir}/gnome-session/helpers/* %{_datadir}/gnome/shutdown/* %dir %{_datadir}/pixmaps/splash @@ -174,6 +182,27 @@ rm -rf $RPM_BUILD_ROOT %files lang -f %{name}-2.0.lang %changelog +* Mon Aug 11 2008 maw@suse.de +- Update to version 2.23.6: + + This release merges the D-Bus based branch in GNOME SVN into + the mainline + + Isolate old XSMP code as much as possible, and change + gnome-session's design to not be based upon the XSMP lifecycle + + Add a native D-Bus session management interface + + Provide an adapter interface for legacy XSMP clients + + Autostart changes: + * Improved integration + * New functionality to provide future extensibility + + Provide an "inhibit" API for clients to proactively inform + session management that they're busy + + Provide an improved logout experience +- Respin gnome-session-bnc389137-splash-layout.patch, + gnome-session-kde-support.patch, + gnome-session-ice-auth-for-suid.patch, and + gnome-session-wm-switch.patch (thanks, Vincent). +* Fri Aug 01 2008 mauro@suse.de +- gnome-session-lang added to the gnome-session package + + This fixes bnc#412155 * Mon Jul 21 2008 hpj@suse.de - gnome-session-suspend.patch removed; no longer needed and code changed radically. @@ -283,7 +312,7 @@ rm -rf $RPM_BUILD_ROOT * Fri Mar 28 2008 rodrigo@suse.de - Added gnome-session-parse-autostart-command-line.patch to deal correctly with placeholders in command lines (bnc#180126) -* Thu Mar 13 2008 maw@suse.de +* Fri Mar 14 2008 maw@suse.de - Update to version 2.22.0: + Remove hard esound dependency + Don't start the sound server, and play the login sound when @@ -353,7 +382,7 @@ rm -rf $RPM_BUILD_ROOT - Ensure ~/Desktop exists before copying to it (#310363) * Thu Sep 13 2007 sbrabec@suse.cz - Fixed background resetting in /usr/bin/gnome (#309946). -* Wed Sep 12 2007 cgaisford@novell.com +* Thu Sep 13 2007 cgaisford@novell.com - Fixed up kdm-support patch to support gnome sessions in KDM Novell Bug #308022 * Mon Sep 10 2007 maw@suse.de @@ -714,7 +743,7 @@ rm -rf $RPM_BUILD_ROOT expected (#117491) * Wed Feb 15 2006 rodrigo@suse.de - Added MOTD on login, as requested by customer. -* Sun Feb 12 2006 hpj@suse.de +* Mon Feb 13 2006 hpj@suse.de - Added patch to support KDM's logout options. * Fri Feb 10 2006 joeshaw@suse.de - Remove the beagled invocation from the /usr/X11R6/bin/gnome @@ -864,7 +893,7 @@ rm -rf $RPM_BUILD_ROOT - Fixed gnome-session-desktop-file.patch (#73047). * Mon Mar 14 2005 clahey@suse.de - Update gnome splash from artists. -* Wed Mar 09 2005 gekker@suse.de +* Thu Mar 10 2005 gekker@suse.de - Update to version 2.10.0 (GNOME 2.10). * Mon Mar 07 2005 gekker@suse.de - mv suseplugger to default-apps patch