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
+++ 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) {

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
--- 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++) {

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
+++ 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);
GString *retval;
char buf[256];
@@ -90,7 +95,7 @@
if (write (data->fd, p, strlen (p)) < 0) {
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));
- g_warning ("Failed to send message to GDM: %s",
+ g_warning ("Failed to send message to display manager: %s",
g_strerror (errno));
return NULL;
@@ -163,7 +168,7 @@ gdm_authenticate_connection (GdmProtocol
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);
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);
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);
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
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));
return FALSE;
}
@@ -279,18 +284,18 @@
g_warning ("Failed to establish a connection with GDM: %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;
}
return FALSE;
}
- response = gdm_send_protocol_msg (data, GDM_PROTOCOL_MSG_VERSION);
+ response = dm_send_protocol_msg (data, GDM_PROTOCOL_MSG_VERSION);
- response = gdm_send_protocol_msg (data, GDM_PROTOCOL_MSG_VERSION);
+ response = dm_send_protocol_msg (data, GDM_PROTOCOL_MSG_VERSION);
if (!response || strncmp (response, "GDM ", strlen ("GDM ") != 0))
{
g_free (response);
if (!response || strncmp (response, "GDM ", strlen ("GDM ") != 0)) {
g_free (response);
g_warning ("Failed to get protocol version from GDM");
- gdm_shutdown_protocol_connection (data);
+ dm_shutdown_protocol_connection (data);
g_warning ("Failed to get protocol version from GDM");
- gdm_shutdown_protocol_connection (data);
+ dm_shutdown_protocol_connection (data);
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;
}
return FALSE;
}
@@ -299,13 +304,76 @@
return TRUE;
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
time_t current_time;
char *response;
@@ -373,26 +455,35 @@
data->last_update = current_time;
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);
}
- if (!gdm_init_protocol_connection (data)) {
+ if (!dm_init_protocol_connection (data)) {
return;
}
- gdm_shutdown_protocol_connection (data);
+ dm_shutdown_protocol_connection (data);
- 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;
- 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);
- gdm_shutdown_protocol_connection (&gdm_protocol_data);
+ dm_shutdown_protocol_connection (&gdm_protocol_data);
return TRUE;
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);
- gdm_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
@ -274,89 +271,83 @@
+static char *
+gdm_logout_action_msg (GdmLogoutAction action)
{
char *action_str = NULL;
- char *msg;
- char *response;
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);
- 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);
+ if (gdm_protocol_data.is_kdm)
+ msg = kdm_logout_action_msg (action);
+ else
+ msg = gdm_logout_action_msg (action);
g_free (msg);
g_free (response);
- response = gdm_send_protocol_msg (&gdm_protocol_data, msg);
+ response = dm_send_protocol_msg (&gdm_protocol_data, msg);
gdm_protocol_data.last_update = 0;
g_free (msg);
g_free (response);
- gdm_shutdown_protocol_connection (&gdm_protocol_data);
+ dm_shutdown_protocol_connection (&gdm_protocol_data);
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;
char *response;
- if (!gdm_init_protocol_connection (&gdm_protocol_data))
+ if (!dm_init_protocol_connection (&gdm_protocol_data))
return;
- 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);
- 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);
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
+++ 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;
}

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

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.
# 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