OBS User unknown 2008-08-13 23:14:49 +00:00 committed by Git OBS Bridge
parent cc5c3243dd
commit bb733687e8
8 changed files with 379 additions and 335 deletions

View File

@ -1,3 +0,0 @@
version https://git-lfs.github.com/spec/v1
oid sha256:c9cb06ecc4300313b73e888e20fb27f481a3ee7c43b38c3131c33337ad23b5a7
size 723228

View File

@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:8356a87e093f208e8c0ae2269c4cbe1772bef9419c6bbdd150872ce52b053e85
size 779272

View File

@ -1,6 +1,8 @@
--- gnome-session-2.23.4.1-pre/splash/splash-window.c 2008-04-21 17:38:11.000000000 -0500 Index: gnome-session-2.23.6/splash/splash-window.c
+++ 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 --- 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_BORDER 26
#define SPLASH_ICON_SPACING 4 #define SPLASH_ICON_SPACING 4
#define SPLASH_ICON_V_OFFSET 28 #define SPLASH_ICON_V_OFFSET 28
@ -9,21 +11,21 @@
#define SPLASH_BASE_ICON_ROWS 1 #define SPLASH_BASE_ICON_ROWS 1
static gboolean update_trans_effect (gpointer); static gboolean update_trans_effect (gpointer);
@@ -330,7 +330,7 @@ layout_icon (GsmSplashWindow *splash, Sp @@ -340,7 +340,7 @@ layout_icon (GsmSplashWindow *splash,
{ if (!si->scaled) {
if (gdk_pixbuf_get_width (si->unscaled) == splash->icon_size && if (gdk_pixbuf_get_width (si->unscaled) == splash->icon_size &&
gdk_pixbuf_get_height (si->unscaled) == splash->icon_size) gdk_pixbuf_get_height (si->unscaled) == splash->icon_size) {
- si->scaled = g_object_ref (si->unscaled); - si->scaled = g_object_ref (si->unscaled);
+ si->scaled = gdk_pixbuf_copy (si->unscaled); + si->scaled = gdk_pixbuf_copy (si->unscaled);
else } else {
{ si->scaled = gdk_pixbuf_scale_simple (si->unscaled, splash->icon_size,
si->scaled = gdk_pixbuf_scale_simple (si->unscaled, splash->icon_size, splash->icon_size,
@@ -470,7 +470,7 @@ gsm_splash_window_start (GsmSplashWindow @@ -469,7 +469,7 @@ gsm_splash_window_start (GsmSplashWindow
return;
pb = gtk_icon_theme_load_icon (splash->icon_theme, icon_name, pb = gtk_icon_theme_load_icon (splash->icon_theme,
- 48, /* icon size */ icon_name,
+ 22, /* icon size */ - 48, /* icon size */
0 /* flags */, NULL); + 22, /* icon size */
if (!pb) 0 /* flags */,
return; NULL);
if (!pb) {

View File

@ -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 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.4.1-pre/gnome-session/xsmp.c 2008-06-03 10:38:18.000000000 -0500 --- gnome-session-2.23.5.orig/gnome-session/gsm-xsmp-server.c 2008-07-29 20:02:33.000000000 +0200
+++ gnome-session-2.23.4.1-post/gnome-session/xsmp.c 2008-07-20 17:35:00.000000000 -0500 +++ gnome-session-2.23.5/gnome-session/gsm-xsmp-server.c 2008-07-29 20:24:58.000000000 +0200
@@ -481,6 +481,9 @@ update_iceauthority (gboolean adding) @@ -421,6 +421,9 @@
fclose (fp); fclose (fp);
ok = TRUE; ok = TRUE;
+ /* Lets programs auth with the session even if running as another user ID */ + /* Lets programs auth with the session even if running as another user ID */
+ putenv (g_strconcat ("ICEAUTHORITY=", filename, NULL)); + putenv (g_strconcat ("ICEAUTHORITY=", filename, NULL));
+ +
cleanup: cleanup:
IceUnlockAuthFile (filename); IceUnlockAuthFile (filename);
for (i = 0; i < num_local_xsmp_sockets; i++) for (i = 0; i < server->priv->num_local_xsmp_sockets; i++) {
Only in gnome-session-2.23.4.1-post/gnome-session: xsmp.c~

View File

@ -1,30 +1,31 @@
--- gnome-session-2.23.4.1-pre/gnome-session/gdm.c 2008-06-17 08:24:45.000000000 -0500 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.4.1-work/gnome-session/gdm.c 2008-07-20 18:45:07.000000000 -0500 --- gnome-session-2.23.5.orig/gnome-session/gdm.c 2008-07-22 12:34:41.000000000 +0200
@@ -57,6 +57,8 @@ +++ 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_REBOOT "REBOOT"
#define GDM_ACTION_STR_SUSPEND "SUSPEND" #define GDM_ACTION_STR_SUSPEND "SUSPEND"
+#define KDM_PROTOCOL_MSG_QUERY_ACTION "caps" +#define KDM_PROTOCOL_MSG_QUERY_ACTION "caps"
+ +
typedef struct { typedef struct {
int fd; int fd;
char *auth_cookie; char *auth_cookie;
@@ -65,6 +67,8 @@ typedef struct { @@ -66,6 +68,8 @@
GdmLogoutAction current_actions; GdmLogoutAction current_actions;
time_t last_update; time_t last_update;
+ +
+ guint is_kdm : 1; + guint is_kdm : 1;
} GdmProtocolData; } GdmProtocolData;
static GdmProtocolData gdm_protocol_data = { static GdmProtocolData gdm_protocol_data = {
@@ -72,12 +76,13 @@ static GdmProtocolData gdm_protocol_data @@ -73,12 +77,13 @@
NULL, NULL,
GDM_LOGOUT_ACTION_NONE, GDM_LOGOUT_ACTION_NONE,
GDM_LOGOUT_ACTION_NONE, GDM_LOGOUT_ACTION_NONE,
- 0 - 0
+ 0, + 0,
+ FALSE + FALSE
}; };
static char * static char *
@ -33,240 +34,236 @@
+dm_send_protocol_msg (GdmProtocolData *data, +dm_send_protocol_msg (GdmProtocolData *data,
+ const char *msg) + const char *msg)
{ {
GString *retval; GString *retval;
char buf[256]; char buf[256];
@@ -90,7 +95,7 @@ gdm_send_protocol_msg (GdmProtocolData * @@ -90,7 +95,7 @@
{ if (write (data->fd, p, strlen (p)) < 0) {
g_free (p); 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));
return NULL; - g_warning ("Failed to send message to GDM: %s",
@@ -163,7 +168,7 @@ gdm_authenticate_connection (GdmProtocol + g_warning ("Failed to send message to display manager: %s",
g_strerror (errno));
msg = g_strdup_printf (GDM_PROTOCOL_MSG_AUTHENTICATE " %s",
data->auth_cookie); return NULL;
- response = gdm_send_protocol_msg (data, msg); @@ -169,7 +174,7 @@
+ response = dm_send_protocol_msg (data, msg);
g_free (msg); msg = g_strdup_printf (GDM_PROTOCOL_MSG_AUTHENTICATE " %s",
data->auth_cookie);
if (response && !strcmp (response, "OK")) - response = gdm_send_protocol_msg (data, msg);
@@ -210,7 +215,7 @@ gdm_authenticate_connection (GdmProtocol + response = dm_send_protocol_msg (data, msg);
XauDisposeAuth (xau); g_free (msg);
msg = g_strdup_printf (GDM_PROTOCOL_MSG_AUTHENTICATE " %s", buffer); if (response && !strcmp (response, "OK")) {
- response = gdm_send_protocol_msg (data, msg); @@ -214,7 +219,7 @@
+ response = dm_send_protocol_msg (data, msg); XauDisposeAuth (xau);
g_free (msg);
msg = g_strdup_printf (GDM_PROTOCOL_MSG_AUTHENTICATE " %s", buffer);
if (response && !strcmp (response, "OK")) - response = gdm_send_protocol_msg (data, msg);
@@ -234,7 +239,7 @@ gdm_authenticate_connection (GdmProtocol + response = dm_send_protocol_msg (data, msg);
g_free (msg);
if (response && !strcmp (response, "OK")) {
@@ -237,7 +242,7 @@
} }
static void static void
-gdm_shutdown_protocol_connection (GdmProtocolData *data) -gdm_shutdown_protocol_connection (GdmProtocolData *data)
+dm_shutdown_protocol_connection (GdmProtocolData *data) +dm_shutdown_protocol_connection (GdmProtocolData *data)
{ {
if (data->fd) if (data->fd) {
close (data->fd); close (data->fd);
@@ -264,7 +269,7 @@ gdm_init_protocol_connection (GdmProtoco @@ -268,7 +273,7 @@
g_warning ("Failed to create GDM socket: %s", g_warning ("Failed to create GDM socket: %s",
g_strerror (errno)); g_strerror (errno));
- gdm_shutdown_protocol_connection (data); - gdm_shutdown_protocol_connection (data);
+ dm_shutdown_protocol_connection (data); + dm_shutdown_protocol_connection (data);
return FALSE; return FALSE;
} }
@@ -276,19 +281,19 @@ gdm_init_protocol_connection (GdmProtoco @@ -279,18 +284,18 @@
g_warning ("Failed to establish a connection with GDM: %s", g_warning ("Failed to establish a connection with GDM: %s",
g_strerror (errno)); g_strerror (errno));
- gdm_shutdown_protocol_connection (data);
+ dm_shutdown_protocol_connection (data);
return FALSE;
}
- response = gdm_send_protocol_msg (data, GDM_PROTOCOL_MSG_VERSION); - gdm_shutdown_protocol_connection (data);
+ response = dm_send_protocol_msg (data, GDM_PROTOCOL_MSG_VERSION); + dm_shutdown_protocol_connection (data);
if (!response || strncmp (response, "GDM ", strlen ("GDM ") != 0)) return FALSE;
{ }
g_free (response);
g_warning ("Failed to get protocol version from GDM"); - response = gdm_send_protocol_msg (data, GDM_PROTOCOL_MSG_VERSION);
- gdm_shutdown_protocol_connection (data); + response = dm_send_protocol_msg (data, GDM_PROTOCOL_MSG_VERSION);
+ dm_shutdown_protocol_connection (data);
return FALSE; if (!response || strncmp (response, "GDM ", strlen ("GDM ") != 0)) {
} g_free (response);
@@ -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;
}
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 +static gboolean
+kdm_init_protocol_connection (GdmProtocolData *data) +kdm_init_protocol_connection (GdmProtocolData *data)
+{ +{
+ struct sockaddr_un addr; + struct sockaddr_un addr;
+ char *dm_display; + char *dm_display;
+ char *dm_control; + char *dm_control;
+ char *p0 = NULL; + char *p0 = NULL;
+ +
+ g_assert (data->fd <= 0); + g_assert (data->fd <= 0);
+ +
+ data->fd = socket (AF_UNIX, SOCK_STREAM, 0); + data->fd = socket (AF_UNIX, SOCK_STREAM, 0);
+ if (data->fd < 0) { + if (data->fd < 0) {
+ g_warning ("Failed to create KDM socket: %s", + g_warning ("Failed to create KDM socket: %s",
+ g_strerror (errno)); + g_strerror (errno));
+ dm_shutdown_protocol_connection (data); + dm_shutdown_protocol_connection (data);
+ return FALSE; + return FALSE;
+ } + }
+ +
+ dm_display = g_strdup (g_getenv ("DISPLAY")); + dm_display = g_strdup (g_getenv ("DISPLAY"));
+ dm_control = g_strdup (g_getenv ("DM_CONTROL")); + dm_control = g_strdup (g_getenv ("DM_CONTROL"));
+ +
+ if (dm_display && (p0 = strchr (dm_display, ':'))) + if (dm_display && (p0 = strchr (dm_display, ':')))
+ p0 = strchr (p0, '.'); + p0 = strchr (p0, '.');
+ +
+ if (!dm_control || !strlen (dm_control) || + if (!dm_control || !strlen (dm_control) ||
+ !dm_display || !strlen (dm_display)) { + !dm_display || !strlen (dm_display)) {
+ g_free (dm_control); + g_free (dm_control);
+ g_free (dm_display); + g_free (dm_display);
+ +
+ g_warning ("Could not locate KDM socket."); + g_warning ("Could not locate KDM socket.");
+ dm_shutdown_protocol_connection (data); + dm_shutdown_protocol_connection (data);
+ return FALSE; + return FALSE;
+ } + }
+ +
+ snprintf (addr.sun_path, sizeof (addr.sun_path), "%s/dmctl-%.*s/socket", + snprintf (addr.sun_path, sizeof (addr.sun_path), "%s/dmctl-%.*s/socket",
+ dm_control, p0 ? p0 - dm_display : 512, dm_display); + dm_control, p0 ? p0 - dm_display : 512, dm_display);
+ addr.sun_family = AF_UNIX; + addr.sun_family = AF_UNIX;
+ +
+ g_free (dm_display); + g_free (dm_display);
+ g_free (dm_control); + g_free (dm_control);
+ +
+ if (connect (data->fd, (struct sockaddr *) &addr, sizeof (addr)) < 0) { + if (connect (data->fd, (struct sockaddr *) &addr, sizeof (addr)) < 0) {
+ g_warning ("Failed to establish a connection with KDM: %s", + g_warning ("Failed to establish a connection with KDM: %s",
+ g_strerror (errno)); + g_strerror (errno));
+ dm_shutdown_protocol_connection (data); + dm_shutdown_protocol_connection (data);
+ return FALSE; + return FALSE;
+ } + }
+ +
+ return TRUE; + return TRUE;
+} +}
+ +
+static gboolean +static gboolean
+dm_init_protocol_connection (GdmProtocolData *data) +dm_init_protocol_connection (GdmProtocolData *data)
+{ +{
+ if (g_getenv ("DM_CONTROL") && !g_getenv ("GDMSESSION")) { + if (g_getenv ("DM_CONTROL") && !g_getenv ("GDMSESSION")) {
+ data->is_kdm = TRUE; + data->is_kdm = TRUE;
+ return kdm_init_protocol_connection (data); + return kdm_init_protocol_connection (data);
+ } + }
+ +
+ data->is_kdm = FALSE; + data->is_kdm = FALSE;
+ return gdm_init_protocol_connection (data); + return gdm_init_protocol_connection (data);
+} +}
+ +
static void static void
gdm_parse_query_response (GdmProtocolData *data, gdm_parse_query_response (GdmProtocolData *data,
const char *response) const char *response)
@@ -357,7 +425,21 @@ gdm_parse_query_response (GdmProtocolDat @@ -360,7 +428,21 @@
} }
static void static void
-gdm_update_logout_actions (GdmProtocolData *data) -gdm_update_logout_actions (GdmProtocolData *data)
+kdm_parse_query_response (GdmProtocolData *data, +kdm_parse_query_response (GdmProtocolData *data,
+ const char *response) + const char *response)
+{ +{
+ data->available_actions = GDM_LOGOUT_ACTION_NONE; + data->available_actions = GDM_LOGOUT_ACTION_NONE;
+ data->current_actions = GDM_LOGOUT_ACTION_NONE; + data->current_actions = GDM_LOGOUT_ACTION_NONE;
+ +
+ if (!response) + if (!response)
+ return; + return;
+ +
+ if (strstr (response, "\tshutdown")) + if (strstr (response, "\tshutdown"))
+ data->available_actions |= GDM_LOGOUT_ACTION_SHUTDOWN | GDM_LOGOUT_ACTION_REBOOT; + data->available_actions |= GDM_LOGOUT_ACTION_SHUTDOWN | GDM_LOGOUT_ACTION_REBOOT;
+} +}
+ +
+static void +static void
+dm_update_logout_actions (GdmProtocolData *data) +dm_update_logout_actions (GdmProtocolData *data)
{ {
time_t current_time; time_t current_time;
char *response; char *response;
@@ -369,25 +451,39 @@ gdm_update_logout_actions (GdmProtocolDa @@ -373,26 +455,35 @@
data->last_update = current_time; data->last_update = current_time;
- if (!gdm_init_protocol_connection (data)) - if (!gdm_init_protocol_connection (data)) {
+ if (!dm_init_protocol_connection (data)) + if (!dm_init_protocol_connection (data)) {
return; return;
- }
- if ((response = gdm_send_protocol_msg (data, GDM_PROTOCOL_MSG_QUERY_ACTION)))
+ - if ((response = gdm_send_protocol_msg (data, GDM_PROTOCOL_MSG_QUERY_ACTION))) {
+ if (data->is_kdm) { - gdm_parse_query_response (data, response);
+ /* KDM */ - g_free (response);
+ if ((response = dm_send_protocol_msg (data, KDM_PROTOCOL_MSG_QUERY_ACTION))) { + if (data->is_kdm) {
+ kdm_parse_query_response (data, response); + /* KDM */
+ g_free (response); + if ((response = dm_send_protocol_msg (data, KDM_PROTOCOL_MSG_QUERY_ACTION))) {
+ } + kdm_parse_query_response (data, response);
+ } else { + g_free (response);
+ /* GDM */ + }
+ if ((response = dm_send_protocol_msg (data, GDM_PROTOCOL_MSG_QUERY_ACTION))) { + } else {
+ gdm_parse_query_response (data, response); + /* GDM */
+ g_free (response); + 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); - gdm_shutdown_protocol_connection (data);
g_free (response); + dm_shutdown_protocol_connection (data);
}
- gdm_shutdown_protocol_connection (data);
+ dm_shutdown_protocol_connection (data);
} }
gboolean gboolean
gdm_is_available (void) gdm_is_available (void)
{ {
- if (!gdm_init_protocol_connection (&gdm_protocol_data)) - if (!gdm_init_protocol_connection (&gdm_protocol_data)) {
+ if (!dm_init_protocol_connection (&gdm_protocol_data)) + if (!dm_init_protocol_connection (&gdm_protocol_data)) {
return FALSE; return FALSE;
}
- gdm_shutdown_protocol_connection (&gdm_protocol_data);
+ dm_shutdown_protocol_connection (&gdm_protocol_data);
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 gboolean
gdm_supports_logout_action (GdmLogoutAction action) gdm_supports_logout_action (GdmLogoutAction action)
{ {
- gdm_update_logout_actions (&gdm_protocol_data); - gdm_update_logout_actions (&gdm_protocol_data);
+ dm_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 GdmLogoutAction
gdm_get_logout_action (void) gdm_get_logout_action (void)
{ {
- gdm_update_logout_actions (&gdm_protocol_data); - gdm_update_logout_actions (&gdm_protocol_data);
+ dm_update_logout_actions (&gdm_protocol_data); + dm_update_logout_actions (&gdm_protocol_data);
return gdm_protocol_data.current_actions; return gdm_protocol_data.current_actions;
} }
-void -void
@ -274,89 +271,83 @@
+static char * +static char *
+gdm_logout_action_msg (GdmLogoutAction action) +gdm_logout_action_msg (GdmLogoutAction action)
{ {
char *action_str = NULL; char *action_str = NULL;
- char *msg; - char *msg;
- char *response; - char *response;
- -
- if (!gdm_init_protocol_connection (&gdm_protocol_data)) - if (!gdm_init_protocol_connection (&gdm_protocol_data)) {
- return; - return;
- - }
+
switch (action) switch (action) {
{ case GDM_LOGOUT_ACTION_NONE:
case GDM_LOGOUT_ACTION_NONE: @@ -439,16 +524,45 @@
@@ -433,17 +524,50 @@ gdm_set_logout_action (GdmLogoutAction a break;
action_str = GDM_ACTION_STR_SUSPEND; }
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);
+ return g_strdup_printf (GDM_PROTOCOL_MSG_SET_ACTION " %s", action_str);
+} +}
+ +
+static char * +static char *
+kdm_logout_action_msg (GdmLogoutAction action) +kdm_logout_action_msg (GdmLogoutAction action)
+{ +{
+ char *msg = NULL; + char *msg = NULL;
+ +
+ if (action == GDM_LOGOUT_ACTION_SHUTDOWN) + if (action == GDM_LOGOUT_ACTION_SHUTDOWN)
+ msg = g_strdup ("shutdown\thalt\task"); + msg = g_strdup ("shutdown\thalt\task");
+ else if (action == GDM_LOGOUT_ACTION_REBOOT) + else if (action == GDM_LOGOUT_ACTION_REBOOT)
+ msg = g_strdup ("shutdown\treboot\task"); + msg = g_strdup ("shutdown\treboot\task");
+ +
+ return msg; + return msg;
+} +}
+ +
+void +void
+gdm_set_logout_action (GdmLogoutAction action) +gdm_set_logout_action (GdmLogoutAction action)
+{ +{
+ char *msg; + char *msg;
+ char *response; + 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;
+ +
+ if (gdm_protocol_data.is_kdm) + if (!dm_init_protocol_connection (&gdm_protocol_data)) {
+ msg = kdm_logout_action_msg (action); + return;
+ else + }
+ msg = gdm_logout_action_msg (action);
+ +
+ if (!msg) { + if (gdm_protocol_data.is_kdm)
+ dm_shutdown_protocol_connection (&gdm_protocol_data); + msg = kdm_logout_action_msg (action);
+ return; + else
+ } + msg = gdm_logout_action_msg (action);
+
+ response = dm_send_protocol_msg (&gdm_protocol_data, msg); - response = gdm_send_protocol_msg (&gdm_protocol_data, msg);
+ response = dm_send_protocol_msg (&gdm_protocol_data, msg);
g_free (msg);
g_free (response); g_free (msg);
g_free (response);
gdm_protocol_data.last_update = 0;
gdm_protocol_data.last_update = 0;
- gdm_shutdown_protocol_connection (&gdm_protocol_data);
+ dm_shutdown_protocol_connection (&gdm_protocol_data); - gdm_shutdown_protocol_connection (&gdm_protocol_data);
+ dm_shutdown_protocol_connection (&gdm_protocol_data);
} }
void void
@@ -451,15 +575,15 @@ gdm_new_login (void) @@ -456,16 +570,16 @@
{ {
char *response; char *response;
- if (!gdm_init_protocol_connection (&gdm_protocol_data)) - if (!gdm_init_protocol_connection (&gdm_protocol_data)) {
+ if (!dm_init_protocol_connection (&gdm_protocol_data)) + if (!dm_init_protocol_connection (&gdm_protocol_data)) {
return; return;
}
- response = gdm_send_protocol_msg (&gdm_protocol_data,
- GDM_PROTOCOL_MSG_FLEXI_XSERVER); - response = gdm_send_protocol_msg (&gdm_protocol_data,
+ response = dm_send_protocol_msg (&gdm_protocol_data, - GDM_PROTOCOL_MSG_FLEXI_XSERVER);
+ GDM_PROTOCOL_MSG_FLEXI_XSERVER); + response = dm_send_protocol_msg (&gdm_protocol_data,
+ GDM_PROTOCOL_MSG_FLEXI_XSERVER);
g_free (response);
g_free (response);
gdm_protocol_data.last_update = 0;
gdm_protocol_data.last_update = 0;
- gdm_shutdown_protocol_connection (&gdm_protocol_data);
+ dm_shutdown_protocol_connection (&gdm_protocol_data); - gdm_shutdown_protocol_connection (&gdm_protocol_data);
+ dm_shutdown_protocol_connection (&gdm_protocol_data);
} }

View File

@ -1,45 +1,41 @@
--- gnome-session-2.23.4.1-pre/gnome-session/session.c 2008-06-17 08:24:45.000000000 -0500 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.4.1-work/gnome-session/session.c 2008-07-20 22:32:00.000000000 -0500 --- gnome-session-2.23.5.orig/gnome-session/gsm-resumed-app.c 2008-07-22 12:34:41.000000000 +0200
@@ -347,6 +347,8 @@ append_legacy_session_apps (GsmSession * +++ gnome-session-2.23.5/gnome-session/gsm-resumed-app.c 2008-07-29 23:23:58.000000000 +0200
{ @@ -213,6 +213,22 @@
GKeyFile *saved; char *key;
int num_clients, i; char *id;
+ gchar *compiz_enable_path; char *val;
+ gboolean compiz_enabled = FALSE; + static gboolean compiz_enabled = FALSE;
+ static gboolean compiz_init = 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);
+ +
num_clients = g_key_file_get_integer (saved, "Default", "num_clients", NULL); + if (!compiz_init) {
for (i = 0; i < num_clients; i++) + gchar *compiz_enable_path;
{
GsmApp *app = gsm_app_resumed_new_from_legacy_session (saved, i);
if (app)
+ {
+ GsmAppResumed *app_resumed = (GsmAppResumed *) app;
+ +
+ /* Maybe replace legacy metacity/compiz with gnome-wm */ + /* See if compiz is enabled; if it is, we have to replace
+ if (app_resumed->restart_command && + * legacy metacity/compiz entries with gnome-wm */
+ (((!strcmp (app_resumed->restart_command, "metacity") || + compiz_enable_path = g_build_filename (g_get_user_config_dir (),
+ !strcmp (app_resumed->restart_command, "/usr/bin/metacity")) && compiz_enabled) || + "compiz", "enable-compiz",
+ (!strcmp (app_resumed->restart_command, "compiz") || + NULL);
+ !strcmp (app_resumed->restart_command, "/usr/bin/compiz")))) + compiz_enabled = compiz_enable_path &&
+ { + g_file_test (compiz_enable_path,
+ g_free (app_resumed->restart_command); + G_FILE_TEST_IS_REGULAR);
+ app_resumed->restart_command = g_strdup ("gnome-wm"); + 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;
}

View File

@ -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 Sun Jul 20 23:21:00 CST 2008 - hpj@suse.de

View File

@ -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. # 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/ # 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 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 License: GPL v2 or later; LGPL v2.1 or later
Group: System/GUI/GNOME Group: System/GUI/GNOME
Version: 2.23.4.1 Version: 2.23.6
Release: 14 Release: 1
Summary: Session Tools for the GNOME 2.x Desktop Summary: Session Tools for the GNOME 2.x Desktop
Url: http://www.gnome.org Url: http://www.gnome.org
Source: %{name}-%{version}.tar.bz2 Source: %{name}-%{version}.tar.bz2
@ -30,9 +37,9 @@ Source4: SuSE.desktop
Source5: suse-help.svg Source5: suse-help.svg
#PATCH-FIX-OPENSUSE Install files needed by /usr/bin/gnome suse.svg bnc388735 sbrabec@suse.cz #PATCH-FIX-OPENSUSE Install files needed by /usr/bin/gnome suse.svg bnc388735 sbrabec@suse.cz
Source6: suse.svg 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 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 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. #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 Patch2: gnome-session-wm-switch.patch
@ -48,6 +55,7 @@ Recommends: control-center2
Obsoletes: gnome-core Obsoletes: gnome-core
Requires: hicolor-icon-theme Requires: hicolor-icon-theme
Requires: %{name}-branding Requires: %{name}-branding
Requires: %{name}-lang = %{version}
Suggests: rsh Suggests: rsh
# bug-buddy is required for GTK_MODULES=gnomebreakpad: # bug-buddy is required for GTK_MODULES=gnomebreakpad:
Requires: bug-buddy Requires: bug-buddy
@ -157,7 +165,7 @@ rm -rf $RPM_BUILD_ROOT
%{_datadir}/xsessions/*.desktop %{_datadir}/xsessions/*.desktop
%{_datadir}/icons/hicolor/*/*/*.* %{_datadir}/icons/hicolor/*/*/*.*
%{_datadir}/gnome/autostart/* %{_datadir}/gnome/autostart/*
%{_datadir}/gnome-session/session-properties.glade %{_datadir}/gnome-session/*.glade
%{_libdir}/gnome-session/helpers/* %{_libdir}/gnome-session/helpers/*
%{_datadir}/gnome/shutdown/* %{_datadir}/gnome/shutdown/*
%dir %{_datadir}/pixmaps/splash %dir %{_datadir}/pixmaps/splash
@ -174,6 +182,27 @@ rm -rf $RPM_BUILD_ROOT
%files lang -f %{name}-2.0.lang %files lang -f %{name}-2.0.lang
%changelog %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 * Mon Jul 21 2008 hpj@suse.de
- gnome-session-suspend.patch removed; no longer needed and code - gnome-session-suspend.patch removed; no longer needed and code
changed radically. changed radically.
@ -283,7 +312,7 @@ rm -rf $RPM_BUILD_ROOT
* Fri Mar 28 2008 rodrigo@suse.de * Fri Mar 28 2008 rodrigo@suse.de
- Added gnome-session-parse-autostart-command-line.patch to deal - Added gnome-session-parse-autostart-command-line.patch to deal
correctly with placeholders in command lines (bnc#180126) 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: - Update to version 2.22.0:
+ Remove hard esound dependency + Remove hard esound dependency
+ Don't start the sound server, and play the login sound when + 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) - Ensure ~/Desktop exists before copying to it (#310363)
* Thu Sep 13 2007 sbrabec@suse.cz * Thu Sep 13 2007 sbrabec@suse.cz
- Fixed background resetting in /usr/bin/gnome (#309946). - 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 - Fixed up kdm-support patch to support gnome sessions in KDM
Novell Bug #308022 Novell Bug #308022
* Mon Sep 10 2007 maw@suse.de * Mon Sep 10 2007 maw@suse.de
@ -714,7 +743,7 @@ rm -rf $RPM_BUILD_ROOT
expected (#117491) expected (#117491)
* Wed Feb 15 2006 rodrigo@suse.de * Wed Feb 15 2006 rodrigo@suse.de
- Added MOTD on login, as requested by customer. - 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. - Added patch to support KDM's logout options.
* Fri Feb 10 2006 joeshaw@suse.de * Fri Feb 10 2006 joeshaw@suse.de
- Remove the beagled invocation from the /usr/X11R6/bin/gnome - 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). - Fixed gnome-session-desktop-file.patch (#73047).
* Mon Mar 14 2005 clahey@suse.de * Mon Mar 14 2005 clahey@suse.de
- Update gnome splash from artists. - 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). - Update to version 2.10.0 (GNOME 2.10).
* Mon Mar 07 2005 gekker@suse.de * Mon Mar 07 2005 gekker@suse.de
- mv suseplugger to default-apps patch - mv suseplugger to default-apps patch