You are not logged in.
Every time I take a screenshot using gnome-screenshot, it makes an annoying camera sound. There's no options available to change that in the GUI or the command line. Any ideas?
EDIT: The file is /usr/share/sounds/freedesktop/stereo/camera-shutter.oga, thanks don_crissti!
Last edited by YAOMTC (2012-01-03 20:35:13)
Offline
Hack the source code.
Or remove the sound file that it plays?
Offline
Hack the source code.
Or remove the sound file that it plays?
I did some searching and I found this part in gnome-screenshot.c:
static void
play_sound_effect (GdkWindow *window)
{
ca_context *c;
ca_proplist *p = NULL;
int res;
c = ca_gtk_context_get ();
res = ca_proplist_create (&p);
if (res < 0)
goto done;
res = ca_proplist_sets (p, CA_PROP_EVENT_ID, "screen-capture");
if (res < 0)
goto done;
res = ca_proplist_sets (p, CA_PROP_EVENT_DESCRIPTION, _("Screenshot taken"));
if (res < 0)
goto done;
if (window != NULL)
{
res = ca_proplist_setf (p,
CA_PROP_WINDOW_X11_XID,
"%lu",
(unsigned long) GDK_WINDOW_XID (window));
if (res < 0)
goto done;
}
ca_context_play_full (c, 0, p, NULL, NULL);
done:
if (p != NULL)
ca_proplist_destroy (p);
}
I don't see a reference to any sound file here, or anywhere else in the file, or in cheese_flash.h (included)... So if I just comment out this function, will it still be able to compile and work? I haven't done this before...
Offline
The sound in question is /usr/share/sounds/freedesktop/stereo/camera-shutter.oga.
Just replace it with your favorite sound (or move it elsewhere if you want no sound at all).
Offline
Hey thanks! Out of curiosity, how did you find that out?
Offline
Let's just say that after 11 years of using Gnome I know a few things about it...
Offline