KMix has a long history of having a remote interface. But whether it was based on DCOP or DBUS, it has always been an expert tool. For some common tasks like muting the master or setting a volume, the hurdles have been too high for many users and script developers.
Starting with the next release KMix ships a small script kmixremote, that makes things very easy: You can mute, get and set volume levels, and list soundcards and controls. This bash script can also serve as a starting point for developers interested in creating scripts or 3rd party apps.
This was a two hour excursion back into bash scripting for me. I found it entertaining as I am not doing a lot of those anymore. I hope you find the result useful.
Local usage example:
Shown are (in this order) listing soundcards, listing controls of a specific soundcard. After that reading, modifying, and reading the (modified) volume level again:
chris@whitefall # kmixremote list ALSA__Creative_X_Fi_1 ALSA__HDA_NVidia_1 chris@whitefall # kmixremote list ALSA__Creative_X_Fi_1 Master_0 PCM_0 Front_0 [...] chris@whitefall # kmixremote get ALSA__Creative_X_Fi_1 PCM_0 100 chris@whitefall # kmixremote set ALSA__Creative_X_Fi_1 PCM_0 70 chris@whitefall # kmixremote get ALSA__Creative_X_Fi_1 PCM_0 70
Remote usage example:
Remote usage does not differ from local usage. You only have to make sure you have a remote login, and permissions to access the X11 server where KMix is running. In the example, I am using “DISPLAY=:0″:
chris@remote-pc: ssh user@pc-with-kmix DISPLAY=:0 /usr/bin/kmixremote ALSA__Creative_X_Fi_1 ALSA__HDA_NVidia_1