Posted on 11-13-2012 07:34 AM
I know that this question isn't directly related to Casper, but does anyone know of a way to disable the internal speakers on a system via a script or managed setting in Casper? I've been getting complaints from students that the noise levels in the computer labs are getting out of hand, so I'm trying to find a solution that forces the use of headphones without causing me a lot of grief in the process.
Solved! Go to Solution.
Posted on 09-30-2013 09:07 AM
These two Utilities allow control from the command line
I found two command line utilities to change output devices:
audiodevice
Examples: audiodevice output 'Line Out'
audiodevice output 'Digital Out'
SwitchAudioSource
Examples: SwitchAudioSource -s 'Built-in Line Output'
SwitchAudioSource -s 'Built-in Digital Output'
I use SwitchAudioSource to set HDMI defaults for new smartboards
Posted on 03-01-2013 02:56 AM
Hi,
I've had a similar request to change the default audio device on a set of MacPro's to use the lineout instead of the internal speaker.
We are using nothing but 10.8 machines so i do not know if this will apply to you or not.
What i have found is that the audio plist writes an entry for EACH user. I am looking at seeing if i can write a MCX for the default & current output device.
Posted on 09-27-2013 08:45 AM
here's my solution - https://www.dropbox.com/sh/3v6ck82vy23jp0f/Fewh-BYzGQ
Posted on 09-30-2013 09:07 AM
These two Utilities allow control from the command line
I found two command line utilities to change output devices:
audiodevice
Examples: audiodevice output 'Line Out'
audiodevice output 'Digital Out'
SwitchAudioSource
Examples: SwitchAudioSource -s 'Built-in Line Output'
SwitchAudioSource -s 'Built-in Digital Output'
I use SwitchAudioSource to set HDMI defaults for new smartboards
Posted on 08-09-2015 09:42 AM
This is weird. How did a discussion from >2 years ago just get marked as solved today?
Also, it would be nice to have someone re-upload the scripts in question. They were covered in this blog post: http://whoshacks.blogspot.com/2009/01/change-audio-devices-via-shell-script.html
Posted on 08-09-2015 12:18 PM
@bradtchapman Here is the script that I ended up using with the utility. Since I don't want this running on an infinite loop, I have it in a policy that is triggered to execute upon check-in. As for why it was just marked, I was logged in and looking for something in an old thread, and noticed that I never marked the solution that I ended up going with in this one. Sorry for the confusion...
#!/bin/sh
# This is reliant on /bin/audiodevice
#http://forums.appleinsider.com/t/79221/how-to-disable-sound-output-through-internal-speakers
#http://whoshacks.blogspot.co.uk/2009/01/change-audio-devices-via-shell-script.html
#http://whosawhatsis.com/paraphernalia/audiodevice.zip
#infinite loop while system is on
# uncomment ## for loop
#turn off speakers if enabled
##while [ 1 ]
##do
OUTPUT=`audiodevice output`
if [ "$OUTPUT" = "Internal Speakers" ] ; then
osascript -e "set Volume 0"
fi
##done