[pulseaudio-discuss] Using "expect" to feed pacmd

Whit Blauvelt whit.pulse at transpect.com
Thu Sep 9 18:25:22 PDT 2010


> Curious about pacmd, I tried the man page:
> 
> "This program takes no command line options." Hmm.

Okay, here's how to have an expect script check off that radio button
(requires expect to be installed of course):

===

#! /usr/bin/expect

spawn pacmd
expect ">>>"
send "set-default-source alsa_input.usb-Generic_FREETALK_Everyman_0000000001-00-Everyman.analog-stereo\r"
expect ">>>"
send "exit=\r"

===

If I tie that to a custom application launcher in my panel, it does check
the radio button and activate the mic. 

Now if I could tie it to some event triggered by plugging the usb headset
in, the immediate problem would be completely (if awkwardly) solved.

Whit



More information about the pulseaudio-discuss mailing list