<span class="it_title3"><span style="display: inline;" id="extra_issue_text"><br>I'm researching a possible solution to disable the internal microphone on laptops running Red Hat Enterprise Linux 5.3. For now we will assume RHEL5/ALSA and <br>
the Gnome desktop are being used. Turning off the microphone is the easy part....we can script in:amixer sset 'Capture' 0%,0% mute nocap<br><br>...at system startup, which will disable the microphone from being used to capture sound. <br>
<br>The user, however, has control over
the mixer channels and can simply override this with a simple mouse
click on the appropriate channel using the Gnome Volume <br>Control.<br><br>The end goal would be to monitor this mouse click, and if the microphone is enabled, issue a popup message warning the user of the potential <br>
foolishness
of their actions. The answer looks like it lies in using dbus (and possibly
HAL) but I haven't found an API for the Volume <br>Control/dbus in Gnome Python would be the prefereable way to code this via the python-dbus module. Something like this:<br>#!/usr/bin/env python<br>import dbus<br>system_bus = dbus.SystemBus()<br>
eth0 = system_bus.get_object('org.freedesktop.NetworkManager', '/org/freedesktop/NetworkManager/Devices/eth0')<br>blah, blah, blah...<br></span></span><span style="display: inline;" class="extra_event_text" id="eid_2935143_extra_event_text"><br>
</span><span style="display: inline;" class="extra_event_text" id="eid_2935143_extra_event_text"></span><span style="display: inline;" class="extra_event_text" id="eid_2935143_extra_event_text">The details on how to possibly do this for the microphone / Volume Control, however, have so far been pretty elusive. <br>
<br>Is this doable via dbus, and, if it is, are there any hints available that might get us a bit further along?</span><br><br>Thanks.<br><span class="it_title3"><span style="display: inline;" id="extra_issue_text"><br></span></span>