Welcome to the MacNN Forums.

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

You are here: MacNN Forums > Software - Troubleshooting and Discussion > Developer Center > Sound Preferences: Change via Terminal?

Sound Preferences: Change via Terminal?
Thread Tools
Mac Elite
Join Date: Nov 2003
Location: Rockville, MD
Status: Offline
Reply With Quote
Sep 12, 2006, 07:08 PM
 
Is there a command to alter OS X's Sound Preferences via the Terminal? I have done some of this through UI Scripting, but wonder if there's a more efficient way to do it.
     
Senior User
Join Date: Feb 2003
Location: USA
Status: Offline
Reply With Quote
Sep 12, 2006, 07:27 PM
 
I've only got one entry in my sound prefs plist, so I'm not sure of what options are availabe. Do a "defaults read com.apple.soundprefs" and see what you've got. You should have no problem changing any defaults from the command line.
MacBook 2.0 160/2GB/SuperDrive
Lots of older Macs
     
Mac Elite
Join Date: Nov 2003
Location: Rockville, MD
Status: Offline
Reply With Quote
Sep 16, 2006, 05:24 PM
 
Originally Posted by techtrucker
I've only got one entry in my sound prefs plist, so I'm not sure of what options are availabe. Do a "defaults read com.apple.soundprefs" and see what you've got. You should have no problem changing any defaults from the command line.
Didn't work. Here's the three things I tried:
Code:
Last login: Sat Sep 16 15:00:16 on console Welcome to Darwin! Sam-Elowitchs-Computer-2:~ samelowitch$ defaults read com.apple.soundprefs 2006-09-16 18:13:12.303 defaults[285] Domain com.apple.soundprefs does not exist Sam-Elowitchs-Computer-2:~ samelowitch$ defaults read com.apple.soundpref.plist 2006-09-16 18:13:49.773 defaults[288] Domain com.apple.soundpref.plist does not exist Sam-Elowitchs-Computer-2:~ samelowitch$ defaults read com.apple.soundpref 2006-09-16 18:14:13.293 defaults[289] Domain com.apple.soundpref does not exist
Turns out the file in question is actually located here: /Library/Preferences/ and is called "com.apple.soundpref.plist".
     
Senior User
Join Date: Feb 2003
Location: USA
Status: Offline
Reply With Quote
Sep 17, 2006, 03:04 AM
 
I goofed, it should have been com.apple.soundpref without the s on the end. But you did eventually try that I see, and for some reason didn't work for you. Very strange, here's what I get:

steven-woodwards-computer:~ steve$ defaults read com.apple.soundpref
{PlayFrontRowSounds = 1; }

BTW, it won't work if you include .plist on the file name...

Maybe the sound prefs file hasn't been created yet because you haven't changed any default settings? Not sure what else to think.
MacBook 2.0 160/2GB/SuperDrive
Lots of older Macs
     
Professional Poster
Join Date: Jan 2003
Location: Teaneck, NJ
Status: Offline
Reply With Quote
Sep 29, 2006, 12:29 PM
 
I don't know a ton about dev. stuff, but can this be used to change the sound output device without a trip to the system prefs? I have tried using applescript, but without much luck.
My goal is to have an applescript application or two that changes between my sound card and my imic output.

Sorry to derail, but my question seemed similar enough.
ATT iPhone 4; 13" MBP; MDD G4.
http://twitter.com/SSharon27
     
Senior User
Join Date: Feb 2003
Location: USA
Status: Offline
Reply With Quote
Sep 29, 2006, 05:35 PM
 
     
Professional Poster
Join Date: Jan 2003
Location: Teaneck, NJ
Status: Offline
Reply With Quote
Sep 30, 2006, 06:49 PM
 
Originally Posted by techtrucker
It IS helpful. Thanks! That gives me enough to work with that I don't mind editing it and learning a bit more myself.
ATT iPhone 4; 13" MBP; MDD G4.
http://twitter.com/SSharon27
     
   
Thread Tools
Forum Links
Forum Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Top
Privacy Policy
All times are GMT -5. The time now is 10:59 PM.
All contents of these forums © 1995-2011 MacNN. All rights reserved.
Branding + Design: www.gesamtbild.com
vBulletin v.3.8.7 © 2000-2011, Jelsoft Enterprises Ltd., Content Relevant URLs by vBSEO 3.3.2