OSX Tips – Turn off Notification Center

Notification-Center

Does OSX’s Notification Center ever get on your nerves? You can disable it temporarily by holding down the option key and clicking on the Notification Center icon in the top right of your screen.

Or, you can turn it off using the command line:

sudo defaults write /System/Library/LaunchAgents/com.apple.notificationcenterui KeepAlive -bool false
killall NotificationCenter

The killall NotificationCenter command saves you having to reboot.

You can turn it back on again with the following commands:

sudo defaults write /System/Library/LaunchAgents/com.apple.notificationcenterui KeepAlive -bool true
killall NotificationCenter

If the icon does not reappear on your screen you can either launch the NotificationCenter.app application from within:

/System/Library/CoreServices/

or you can launch it from the command line:

/System/Library/CoreServices/NotificationCenter.app/Contents/MacOS/NotificationCenter

 


If you found this article useful, you might like to try the following book…

What do you get when you cross a Mac with an iPad? OS X 10.8 Mountain Lion. Its 200 new features include iPaddish goodies like dictation, Notification Center, and Reminders—but not a single page of instructions. Fortunately, David Pogue is back, with the expertise and humor that have made this the #1 bestselling Mac book for over 10 years straight.

  • Big-ticket changes. Twitter and Facebook intgration. Air-Play TV mirroring. Power Nap. Game Center. Documents in the Cloud. iMessages. Gatekeeper. If Apple wrote it, this book covers it.
  • Mountain Lion Watch. This book demystifies the hundreds of smaller enhancements, too, in all 50 programs that come with the Mac: Safari, Mail, Messages, Preview…
  • Shortcuts. This must be the tippiest, trickiest Mac book ever written. Undocumented surprises await on every page.
  • Power users. Security, accounts, networking, build-your own Services, file sharing with Windows—this one witty, expert guide makes it all crystal clear.

There's something new on practically every page of this new edition, and David Pogue brings his celebrated wit and expertise to every one of them. Apple's brought a new cat to town, and Mac OS X Mountain Lion: The Missing Manual is the best way to tame it.


Share Button

OSX Tips – Disable Spotlight from the Command Line

Spotlight

If you want to disable OSX’s Spotlight in order to free up resources you can do so from the command line by disabling the daemon:

sudo launchctl unload -w /System/Library/LaunchDaemons/com.apple.metadata.mds.plist

And to turn it back on again:

sudo launchctl load -w /System/Library/LaunchDaemons/com.apple.metadata.mds.plist

 


If you found this article useful, you might like to try the following book…

What do you get when you cross a Mac with an iPad? OS X 10.8 Mountain Lion. Its 200 new features include iPaddish goodies like dictation, Notification Center, and Reminders—but not a single page of instructions. Fortunately, David Pogue is back, with the expertise and humor that have made this the #1 bestselling Mac book for over 10 years straight.

  • Big-ticket changes. Twitter and Facebook intgration. Air-Play TV mirroring. Power Nap. Game Center. Documents in the Cloud. iMessages. Gatekeeper. If Apple wrote it, this book covers it.
  • Mountain Lion Watch. This book demystifies the hundreds of smaller enhancements, too, in all 50 programs that come with the Mac: Safari, Mail, Messages, Preview…
  • Shortcuts. This must be the tippiest, trickiest Mac book ever written. Undocumented surprises await on every page.
  • Power users. Security, accounts, networking, build-your own Services, file sharing with Windows—this one witty, expert guide makes it all crystal clear.

There's something new on practically every page of this new edition, and David Pogue brings his celebrated wit and expertise to every one of them. Apple's brought a new cat to town, and Mac OS X Mountain Lion: The Missing Manual is the best way to tame it.


Share Button

OSX Tips – Fix Audio Issues – Reset CoreAudio

Volume

Sometimes OSX audio gets its knickers in a twist and needs to be reset. One example of this is it you have a set of USB speakers plugged in and suddenly they are not picked up by the OS when previously they have been working fine. You can usually fix this issue with the following command from the terminal:

sudo killall coreaudiod

Of course a reboot would also work but this option just saves the hassle.

 


If you found this article useful, you might like to try the following book…

What do you get when you cross a Mac with an iPad? OS X 10.8 Mountain Lion. Its 200 new features include iPaddish goodies like dictation, Notification Center, and Reminders—but not a single page of instructions. Fortunately, David Pogue is back, with the expertise and humor that have made this the #1 bestselling Mac book for over 10 years straight.

  • Big-ticket changes. Twitter and Facebook intgration. Air-Play TV mirroring. Power Nap. Game Center. Documents in the Cloud. iMessages. Gatekeeper. If Apple wrote it, this book covers it.
  • Mountain Lion Watch. This book demystifies the hundreds of smaller enhancements, too, in all 50 programs that come with the Mac: Safari, Mail, Messages, Preview…
  • Shortcuts. This must be the tippiest, trickiest Mac book ever written. Undocumented surprises await on every page.
  • Power users. Security, accounts, networking, build-your own Services, file sharing with Windows—this one witty, expert guide makes it all crystal clear.

There's something new on practically every page of this new edition, and David Pogue brings his celebrated wit and expertise to every one of them. Apple's brought a new cat to town, and Mac OS X Mountain Lion: The Missing Manual is the best way to tame it.


Share Button

OSX Tips – Copy a DVD from the Command Line

DVDsYou can copy a DVD using the OSX command line with the following commands:

hdiutil unmount /Volumes/THE_DVD/
diskutil list
hdiutil convert /dev/disk5 -format UDTO -o NEW_DVD
hdiutil burn NEW_DVD.cdr -noverifyburn -noeject

THE_DVD is the volume name of the DVD in your drive. /dev/disk5 in this case is the device listed in the diskutil list command for your drive. NEW_DVD is the name you give the local copy of the DVD.

 


If you found this article useful, you might like to try the following book…

What do you get when you cross a Mac with an iPad? OS X 10.8 Mountain Lion. Its 200 new features include iPaddish goodies like dictation, Notification Center, and Reminders—but not a single page of instructions. Fortunately, David Pogue is back, with the expertise and humor that have made this the #1 bestselling Mac book for over 10 years straight.

  • Big-ticket changes. Twitter and Facebook intgration. Air-Play TV mirroring. Power Nap. Game Center. Documents in the Cloud. iMessages. Gatekeeper. If Apple wrote it, this book covers it.
  • Mountain Lion Watch. This book demystifies the hundreds of smaller enhancements, too, in all 50 programs that come with the Mac: Safari, Mail, Messages, Preview…
  • Shortcuts. This must be the tippiest, trickiest Mac book ever written. Undocumented surprises await on every page.
  • Power users. Security, accounts, networking, build-your own Services, file sharing with Windows—this one witty, expert guide makes it all crystal clear.

There's something new on practically every page of this new edition, and David Pogue brings his celebrated wit and expertise to every one of them. Apple's brought a new cat to town, and Mac OS X Mountain Lion: The Missing Manual is the best way to tame it.


Share Button

OSX Tips – Turn off the software update schedule from the command line

Software-UpdateBy default OSX’s Software Update is scheduled to check for updates at a given interval and notify you when there are updates waiting to be installed. You can turn off checking for Software Updates from the command line.

To disable use the following command:

sudo softwareupdate --schedule off

and turn it back on again with the following:

sudo softwareupdate --schedule on

 


If you found this article useful, you might like to try the following book…

What do you get when you cross a Mac with an iPad? OS X 10.8 Mountain Lion. Its 200 new features include iPaddish goodies like dictation, Notification Center, and Reminders—but not a single page of instructions. Fortunately, David Pogue is back, with the expertise and humor that have made this the #1 bestselling Mac book for over 10 years straight.

  • Big-ticket changes. Twitter and Facebook intgration. Air-Play TV mirroring. Power Nap. Game Center. Documents in the Cloud. iMessages. Gatekeeper. If Apple wrote it, this book covers it.
  • Mountain Lion Watch. This book demystifies the hundreds of smaller enhancements, too, in all 50 programs that come with the Mac: Safari, Mail, Messages, Preview…
  • Shortcuts. This must be the tippiest, trickiest Mac book ever written. Undocumented surprises await on every page.
  • Power users. Security, accounts, networking, build-your own Services, file sharing with Windows—this one witty, expert guide makes it all crystal clear.

There's something new on practically every page of this new edition, and David Pogue brings his celebrated wit and expertise to every one of them. Apple's brought a new cat to town, and Mac OS X Mountain Lion: The Missing Manual is the best way to tame it.


Share Button

OSX Tips – Disable Firewire Networking from the Command Line

Firewire NetworkingIf you’re not using firewire networking on your Mac (10.8 Mountain Lion) you can turn it off from the command line:

Turn it off:

sudo sudo networksetup -setnetworkserviceenabled FireWire off

Turn it back on again:

sudo sudo networksetup -setnetworkserviceenabled FireWire on

 


If you found this article useful, you might like to try the following book…

What do you get when you cross a Mac with an iPad? OS X 10.8 Mountain Lion. Its 200 new features include iPaddish goodies like dictation, Notification Center, and Reminders—but not a single page of instructions. Fortunately, David Pogue is back, with the expertise and humor that have made this the #1 bestselling Mac book for over 10 years straight.

  • Big-ticket changes. Twitter and Facebook intgration. Air-Play TV mirroring. Power Nap. Game Center. Documents in the Cloud. iMessages. Gatekeeper. If Apple wrote it, this book covers it.
  • Mountain Lion Watch. This book demystifies the hundreds of smaller enhancements, too, in all 50 programs that come with the Mac: Safari, Mail, Messages, Preview…
  • Shortcuts. This must be the tippiest, trickiest Mac book ever written. Undocumented surprises await on every page.
  • Power users. Security, accounts, networking, build-your own Services, file sharing with Windows—this one witty, expert guide makes it all crystal clear.

There's something new on practically every page of this new edition, and David Pogue brings his celebrated wit and expertise to every one of them. Apple's brought a new cat to town, and Mac OS X Mountain Lion: The Missing Manual is the best way to tame it.


Share Button

OSX Tips – Turn off WiFi from the command line

AirportFollowing on from my previous post where we turned off OSX’s energy saver from the command line, this tip will show you how to disable WiFi/Airport from the same place.

To turn off:

networksetup -setairportpower en1 off

and to turn back on:

networksetup -setairportpower en1 on

You may want to be a bit smarter and use a script to discover the port used by your WiFi card and automate things somewhat:

#!/bin/bash

# get current wifi device
CURRENT_DEVICE=$(networksetup -listallhardwareports | awk '$3=="Wi-Fi" {getline; print $2}')
echo "Current Wi-Fi Device = '$CURRENT_DEVICE'"

# turn off wifi
networksetup -setairportpower $CURRENT_DEVICE off

And to turn it back on again:

#!/bin/bash

# get current wifi device
CURRENT_DEVICE=$(networksetup -listallhardwareports | awk '$3=="Wi-Fi" {getline; print $2}')
echo "Current Wi-Fi Device = '$CURRENT_DEVICE'"

# turn on wifi
networksetup -setairportpower $CURRENT_DEVICE on

 


If you found this article useful, you might like to try the following book…

What do you get when you cross a Mac with an iPad? OS X 10.8 Mountain Lion. Its 200 new features include iPaddish goodies like dictation, Notification Center, and Reminders—but not a single page of instructions. Fortunately, David Pogue is back, with the expertise and humor that have made this the #1 bestselling Mac book for over 10 years straight.

  • Big-ticket changes. Twitter and Facebook intgration. Air-Play TV mirroring. Power Nap. Game Center. Documents in the Cloud. iMessages. Gatekeeper. If Apple wrote it, this book covers it.
  • Mountain Lion Watch. This book demystifies the hundreds of smaller enhancements, too, in all 50 programs that come with the Mac: Safari, Mail, Messages, Preview…
  • Shortcuts. This must be the tippiest, trickiest Mac book ever written. Undocumented surprises await on every page.
  • Power users. Security, accounts, networking, build-your own Services, file sharing with Windows—this one witty, expert guide makes it all crystal clear.

There's something new on practically every page of this new edition, and David Pogue brings his celebrated wit and expertise to every one of them. Apple's brought a new cat to town, and Mac OS X Mountain Lion: The Missing Manual is the best way to tame it.


Share Button

OSX Tips – Turn off sleep mode from the command line

If you’ve ever needed to turn off sleep mode in Mac OSX 10.8 (Mountain Lion) from the command line, here’s how you do it:

sudo pmset sleep 0

To turn it back on again, use the following:

sudo pmset sleep 15

If you wanted to save the original value you could do something like this:

#!/bin/bash

FILENAME="ENERGY_SAVER_OLD_VALUE"

# get current energy saver timeout
CURRENT_TIMEOUT=$(sudo pmset -g | awk '$1=="sleep" {print $2}')

# save current timeout value to disk
echo $CURRENT_TIMEOUT > $FILENAME

sudo pmset sleep 0

You could then turn it back on with something like this:

#!/bin/bash

FILENAME="ENERGY_SAVER_OLD_VALUE"

# get old energy saver timeout value if available

OLD_TIMEOUT=$(cat $FILENAME 2>/dev/null)

if [ "$OLD_TIMEOUT" ]; then
   echo "Old Value = '$OLD_TIMEOUT'"
else
   echo "No old value found, using 15"
   OLD_TIMEOUT=15
fi

# set timeout
sudo pmset sleep $OLD_TIMEOUT

The scripts above will find the current sleep timeout setting, save it to a file on disk, and then try to use that value to set it back to its original value when re-enabling sleep. If it can’t find that file it will just use the default value of 15 minutes.

Update:

You can also turn off display sleep with:

sudo pmset displaysleep 0

and disable hard disk sleep with:

sudo pmset disksleep 0

You can then re-enable them with the following:

sudo pmset disksleep 180
sudo pmset displaysleep 15

This post is part of a series related to optimising osx from the command line. Next up is turning off WiFi/Airport from the command line.

 


If you found this article useful, you might like to try the following book…

What do you get when you cross a Mac with an iPad? OS X 10.8 Mountain Lion. Its 200 new features include iPaddish goodies like dictation, Notification Center, and Reminders—but not a single page of instructions. Fortunately, David Pogue is back, with the expertise and humor that have made this the #1 bestselling Mac book for over 10 years straight.

  • Big-ticket changes. Twitter and Facebook intgration. Air-Play TV mirroring. Power Nap. Game Center. Documents in the Cloud. iMessages. Gatekeeper. If Apple wrote it, this book covers it.
  • Mountain Lion Watch. This book demystifies the hundreds of smaller enhancements, too, in all 50 programs that come with the Mac: Safari, Mail, Messages, Preview…
  • Shortcuts. This must be the tippiest, trickiest Mac book ever written. Undocumented surprises await on every page.
  • Power users. Security, accounts, networking, build-your own Services, file sharing with Windows—this one witty, expert guide makes it all crystal clear.

There's something new on practically every page of this new edition, and David Pogue brings his celebrated wit and expertise to every one of them. Apple's brought a new cat to town, and Mac OS X Mountain Lion: The Missing Manual is the best way to tame it.


Share Button