Your message dated Fri, 04 Jan 2008 15:34:16 +0100
with message-id <[EMAIL PROTECTED]>
and subject line Bug#450846: gnome-session: No login sound
has caused the attached Bug report to be marked as done.

This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.

(NB: If you are a system administrator and have no idea what I am
talking about this indicates a serious mail system misconfiguration
somewhere.  Please contact me immediately.)

Debian bug tracking system administrator
(administrator, Debian Bugs database)

--- Begin Message ---
Package: gnome-session
Version: 2.20.1-1
Severity: normal
Tags: patch

Hi,

Though all even sounds play fine during the session, and even when logging out,
I can't hear the startup sound when logging in my GNOME session.

This bug is already known upstream: 
http://bugzilla.gnome.org/show_bug.cgi?id=466458

After compiling gnome-session with the latest patch applied, I can hear the 
login
sound again.

It would be nice to include the patch in your next upload.

Cheers,
Julien

-- System Information:
Debian Release: lenny/sid
  APT prefers unstable
  APT policy: (500, 'unstable'), (1, 'experimental')
Architecture: amd64 (x86_64)

Kernel: Linux 2.6.23-1-amd64 (SMP w/2 CPU cores)
Locale: LANG=fr_FR.UTF-8, LC_CTYPE=fr_FR.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/bash

Versions of packages gnome-session depends on:
ii  gconf2                      2.20.1-1     GNOME configuration database syste
ii  gnome-control-center        1:2.20.1-1   utilities to configure the GNOME d
ii  libatk1.0-0                 1.20.0-1     The ATK accessibility toolkit
ii  libbonobo2-0                2.20.1-1     Bonobo CORBA interfaces library
ii  libc6                       2.7-0exp7    GNU C Library: Shared libraries
ii  libdbus-1-3                 1.1.1-3      simple interprocess messaging syst
ii  libdbus-glib-1-2            0.74-1       simple interprocess messaging syst
ii  libgconf2-4                 2.20.1-1     GNOME configuration database syste
ii  libglib2.0-0                2.14.2-1     The GLib library of C routines
ii  libgnome-keyring0           2.20.1-1     GNOME keyring services library
ii  libgnome2-0                 2.20.1.1-1   The GNOME 2 library - runtime file
ii  libgnomeui-0                2.20.1.1-1   The GNOME 2 libraries (User Interf
ii  libgtk2.0-0                 2.12.1-1     The GTK+ graphical user interface 
ii  libice6                     2:1.0.4-1    X11 Inter-Client Exchange library
ii  liborbit2                   1:2.14.7-0.1 libraries for ORBit2 - a CORBA ORB
ii  libpango1.0-0               1.18.3-1     Layout and rendering of internatio
ii  libsm6                      2:1.0.3-1+b1 X11 Session Management library
ii  libwrap0                    7.6.dbs-14   Wietse Venema's TCP wrappers libra
ii  libx11-6                    2:1.0.3-7    X11 client-side library
ii  libxau6                     1:1.0.3-2    X11 authorisation library
ii  libxrandr2                  2:1.2.2-1    X11 RandR extension library

Versions of packages gnome-session recommends:
ii  dbus                          1.1.1-3    simple interprocess messaging syst
ii  desktop-base                  4.0.3      common files for the Debian Deskto
ii  gnome-panel                   2.20.1-1   launcher and docking facility for 
ii  metacity                      1:2.20.0-1 A lightweight GTK2 based Window Ma
ii  nautilus                      2.20.0-1   file manager and graphical shell f

-- no debconf information
--- gnome-session-2.20.0/gnome-session/gsm-sound.c.esd	2007-09-17 20:36:00.000000000 +0200
+++ gnome-session-2.20.0/gnome-session/gsm-sound.c	2007-09-21 11:43:24.000000000 +0200
@@ -11,6 +11,9 @@
 
 #include <libgnome/gnome-sound.h>
 #include <libgnome/gnome-triggers.h>
+#include <libgnome/gnome-util.h>
+#include <libgnome/gnome-config.h>
+#include <libgnome/gnome-exec.h>
 
 #define ENABLE_SOUND_KEY        "/desktop/gnome/sound/enable_esd"
 #define ENABLE_EVENT_SOUNDS_KEY "/desktop/gnome/sound/event_sounds"
@@ -56,33 +59,20 @@ sound_events_enabled (void)
 }
 
 #ifdef HAVE_ESD
-static GPid esd_pid = 0;
-
-static void
-reset_esd_pid (GPid     pid,
-	       gint     status,
-	       gpointer ignore)
-{
-  if (pid == esd_pid)
-    esd_pid = 0;
-}
-
 static void
 start_esd (void) 
 {
-  gchar  *argv[] = {ESD_SERVER, "-nobeeps", NULL};
+  const char args[] = ESD_SERVER " -terminate -nobeeps";
   GError *err = NULL;
   time_t  starttime;
 
-  if (!gsm_exec_async (NULL, argv, NULL, &esd_pid, &err))
+  if (gnome_execute_shell (NULL, args) == -1)
     {
       g_warning ("Could not start esd: %s\n", err->message);
       g_error_free (err);
       return;
     }
 
-  g_child_watch_add (esd_pid, reset_esd_pid, NULL);
-
   starttime = time (NULL);
   gnome_sound_init (NULL);
 
@@ -94,19 +84,80 @@ start_esd (void) 
     }
 }
 
-static void
-stop_esd (void)
+
+static gboolean
+load_login_sample_from (const char *file,
+		gboolean   *isset)
 {
-  gnome_sound_shutdown ();
+	char *key;
+	char *sample_file;
+	int sample_id;
 
-  if (esd_pid)
-    {
-      if (kill (esd_pid, SIGTERM) == -1)
-        g_printerr ("Failed to kill esd (pid %d)\n", esd_pid);
-      else
-        esd_pid = 0;
-    }
+	if (!file)
+		return FALSE;
+
+	key = g_strconcat ("=", file, "=login/file", NULL);
+	sample_file = gnome_config_get_string (key);
+	g_free (key);
+
+	if (sample_file && isset)
+		*isset = TRUE;
+	else if (isset)
+		*isset = FALSE;
+
+	if (sample_file && *sample_file && *sample_file != '/')
+	{
+		char *tmp_sample_file;
+		tmp_sample_file = gnome_program_locate_file (NULL, GNOME_FILE_DOMAIN_SOUND, sample_file, TRUE, NULL);
+		g_free (sample_file);
+		sample_file = tmp_sample_file;
+	}
+
+	if (!(sample_file && *sample_file))
+	{
+		g_free (sample_file);
+		return FALSE;
+	}
+
+	sample_id = esd_sample_getid (gnome_sound_connection_get (), "gnome-2/login");
+	if (sample_id >= 0)
+		esd_sample_free (gnome_sound_connection_get (), sample_id);
+
+	sample_id = gnome_sound_sample_load ("gnome-2/login", sample_file);
+
+	if (sample_id < 0)
+	{
+		g_warning ("Couldn't load sound file %s\n", sample_file);
+		return FALSE;
+	}
+
+	g_free (sample_file);
+
+	return TRUE;
 }
+
+#define SOUND_EVENT_FILE "sound/events/gnome-2.soundlist"
+	static gboolean
+load_login_sample (void)
+{
+	char *s;
+	gboolean loaded;
+	gboolean isset;
+
+	s = gnome_util_home_file (SOUND_EVENT_FILE);
+	loaded = load_login_sample_from (s, &isset);
+	g_free (s);
+
+	if (isset)
+		return loaded;
+
+	s = gnome_program_locate_file (NULL, GNOME_FILE_DOMAIN_CONFIG, SOUND_EVENT_FILE, TRUE, NULL);
+	loaded = load_login_sample_from (s, NULL);
+	g_free (s);
+
+	return loaded;
+}
+
 #endif /* HAVE_ESD */
 
 static gboolean
@@ -127,14 +178,14 @@ sound_init (void)
       return FALSE;
     }
 
-  return TRUE;
+  return load_login_sample();
 }
 
 static void 
 sound_shutdown (void)
 {
 #ifdef HAVE_ESD
-  stop_esd ();
+  gnome_sound_shutdown ();
 #endif
 }
 

--- End Message ---
--- Begin Message ---
Version: 2.20.2-1

Le dimanche 11 novembre 2007 à 17:21 +0100, Julien Valroff a écrit :
> Though all even sounds play fine during the session, and even when logging 
> out,
> I can't hear the startup sound when logging in my GNOME session.
> 
> This bug is already known upstream: 
> http://bugzilla.gnome.org/show_bug.cgi?id=466458
> 
> After compiling gnome-session with the latest patch applied, I can hear the 
> login
> sound again.
> 
> It would be nice to include the patch in your next upload.

This was done in the 2.20.2-1 upload.

Cheers,
-- 
 .''`.
: :' :      We are debian.org. Lower your prices, surrender your code.
`. `'       We will add your hardware and software distinctiveness to
  `-        our own. Resistance is futile.

Attachment: signature.asc
Description: Ceci est une partie de message numériquement signée


--- End Message ---

Reply via email to