View RSS Feed

The Ill-Tempered Audiophool

Shell script for tweaking OS X

Rate this Entry
I made this for 10.6.X, but most of it still works on 10.7.X. However, there is lots more to do for 10.7.X, and I haven't had time to put into making a newer version. Meanwhile, feel free...

Here is the shell script. Please read through it first (a good idea):

Download it to (say) the desktop, and if the name offends, sorry, just rename it.

Then run it by opening the terminal into the directory where you downloaded it (Desktop or Downloads) and then issue the command:

zsh audiophool.zsh

Everything is undoable just by answering no (n).

You have to be an admin user, and some of the commands use "sudo" so you will have to supply your password. The shell script doesn't actually "see" the password, so it is safe.
Personal Blogs


  1. SteveChicago's Avatar
    What does this do?
  2. wgscott's Avatar
    It is an interactive shell script. The output explains what is happening:

    % zsh audiophool.zsh

    Spotlight is enabled by default, and its associated auto-indexing.

    can slow everything down substantially.

    Would you like to Disable Spotlight ? [y/n]: n


    Indexing enabled.


    Error: invalid operation.

    No index.


    Indexing enabled.

    Here is the current status of Spotlight indexing


    Indexing enabled.


    No index.


    Indexing enabled.

    Dashboard Widgets tend to be memory hogs. Unless you need it,

    it is best to deactivate it.

    Would you like to Disable Dashboard ? [y/n]: y

    Dashboard is now turned off

    Spaces (multiple virtual desktops) uses considerable system resources. Unless you need it, it might be best to deactivate it.

    Would you like to Disable Spaces ? [y/n]: n

    Turning "Spaces" on.

    Spaces is now turned on

    Would you like to add a Quit menu option to the Finder ? [y/n]: y

    This will appear next time you restart the Finder.

    To maximize performance, you can prevent the computer and displayfrom going to sleep and spinning down its hard drive.

    If your computer is connected to a TV, it is always best for it not to send a display sleep signal.

    Answer Y to implement 'insomnia' settings, N to return to factory default settings. [y/n]: n

    Here is the current status:

    Active Profiles:

    Battery Power -1*

    AC Power -1

    Currently in use:

    halfdim 1

    sms 1

    panicrestart 157680000

    hibernatefile /var/vm/sleepimage

    disksleep 10

    sleep 30

    hibernatemode 3

    ttyskeepawake 1

    displaysleep 10

    acwake 0

    lidwake 1

    If you do Time Machine backups, the hourly default backup may interfere with your musical enjoyment.

    You can set Time Machine to back up once per day, or any desired interval, using a free program called

    Time Machine Editor .

    Would you like to do that? (If so, I will open up the website for Time Machine Editor) [y/n]: n

    A free, low-overhead set of system monitors for memory and CPU consumption, etc, is available for free

    in the form of a program called Menu Meters

    Shall I open up their website? [y/n]: n
  3. Bob Stern's Avatar
    The last time I played with mdutil, I found that when I turned Spotlight back on, it took a long time to rebuild the Spotlight database even though I had not used the -E switch to erase the database.

    I found a better solution was to use launchctl to disable (unload) the mds daemon. Reenabling it with the 2nd command works almost instantly.

    sudo launchctl unload -w /System/Library/LaunchDaemons/

    sudo launchctl load -w /System/Library/LaunchDaemons/
  4. wgscott's Avatar

    I'll do that.
  5. ericuco's Avatar
    Do you need to run this script at every system start-up (or reboot) of the system or are these settings "permanent" meaning still good after a restart? Sorry if my terminology is not precise.

  6. wgscott's Avatar

    The settings stick unless you run it again and change them.