Originally Posted by
The Bright Side
I installed pavucontrol (which breaks Ubuntu's own Sound Settings), and it gives me full control over my sound card (though the internal one is still nowhere to be seen). What can I do so what when I click on "Sound Settings", pavucontrol opens?
it can be changed very easily in the source, in this case specifically /debian/patches/sound_nau.patch
The only tricky thing is this source applies it's patches during the build, there are 3, each builds upon the previous
(the 2nd & 3rd enable pavucontrol for xubuntu & ubuntustudio respectively.
So if allowing all 3 patches to be applied one would need to alter 2 patches, though if only building indicator-sound for ubuntu (unity), then one could edit the first patch & comment out the next 2 in debian/patches/series file
(just as easy to also edit the xubuntu patch & build as normal.
Either way pretty straightforward to do, tested here in a unity session & "sound-settings" now opens pavucontrol .
If unsure of how to build, ect. but want to do then ask, can work out a simple copy & paste routine,.
Otherwise if up on I'm attaching the 2 edited patches.
You'd simply extract & replace the same current 2 in the indicator-sound source's debian/patches folder with these, up the package version slightly in debian/changelog, add a dependency on pavucontrol & build the packages with something simple like
dpkg-buildpackage -rfakeroot -D -us -uc
To show the 1st. patch edit (the one that matters for a unity session
orig sound_nau.patch, area to be edited shown in red
Code:
=== modified file 'src/sound-service-dbus.c'
--- old/src/sound-service-dbus.c 2012-03-16 17:59:34 +0000
+++ new/src/sound-service-dbus.c 2012-03-19 14:54:30 +0000
@@ -227,8 +227,14 @@
gpointer user_data)
{
GError * error = NULL;
+ gchar* cmd;
+ if (!g_strcmp0 (g_getenv ("XDG_CURRENT_DESKTOP"), "Unity"))
+ cmd = "gnome-control-center sound-nua";
+ else
+ cmd = "gnome-control-center sound";
+
if (!g_spawn_command_line_async("gnome-volume-control --page=applications", &error) &&
- !g_spawn_command_line_async("gnome-control-center sound", &error) &&
+ !g_spawn_command_line_async(cmd, &error) &&
!g_spawn_command_line_async("xfce4-mixer", &error))
{
g_warning("Unable to show dialog: %s", error->message);
Edited sound_nau.patch, edit shown in blue
Code:
=== modified file 'src/sound-service-dbus.c'
--- old/src/sound-service-dbus.c 2012-03-16 17:59:34 +0000
+++ new/src/sound-service-dbus.c 2012-03-19 14:54:30 +0000
@@ -227,8 +227,14 @@
gpointer user_data)
{
GError * error = NULL;
+ gchar* cmd;
+ if (!g_strcmp0 (g_getenv ("XDG_CURRENT_DESKTOP"), "Unity"))
+ cmd = "pavucontrol";
+ else
+ cmd = "gnome-control-center sound";
+
if (!g_spawn_command_line_async("gnome-volume-control --page=applications", &error) &&
- !g_spawn_command_line_async("gnome-control-center sound", &error) &&
+ !g_spawn_command_line_async(cmd, &error) &&
!g_spawn_command_line_async("xfce4-mixer", &error))
{
g_warning("Unable to show dialog: %s", error->message);
Really quite simple, the other 2 patches will be affected so if allowed to be applied a small edit to the 2nd patch, (sound_xubuntu.patch) is needed as well
Edit: could be adapted to also use pavucontrol in a gnome session, slightly more edit(s) needed
Bookmarks