Automatically Customize Mac OS X with a Bash Script: 27 Defaults Write Commands, custom .aliases, .bash_profile, etc

Sep 9, 2011 - 8 Comments

Bash script to customize many aspects of Mac OS X

If you’re an advanced user and setting up a new Mac, you probably customize the OS with a ton of defaults write commands and .alias adjustments. These are things you can either enter manually, use an easy tool like LionTweaks, or check out this new great script from GitHub called .osx.

Note: this is obviously geared towards more advanced users who are comfortable with the command line and understand what changes they are making. Read the full article to see if these adjustments are right for you. If any of this seems confusing, you probably shouldn’t be making these changes or at least using this method, and the aforementioned LionTweaks utility may be a better fit. Proceed at your own risk.

Option 1) The Full Suite: customize .bash_profile, .bash_prompt, .aliases, git, and Mac OS X with defaults writes

If you want to make a ton of settings adjustments to .bash_profile, .aliases, .gitconfig, and all of the below defaults write commands, you can use this git command in the Terminal to do everything. Before jumping into this one, it’d be a good idea to review the files yourself to make sure the changes are things you want.

git clone https://github.com/mathiasbynens/dotfiles.git && cd dotfiles && ./bootstrap.sh

The .aliases file is pretty useful, but includes some commands like ngrep that are not preinstalled by default, so you’ll need homebrew or otherwise to install those.

Option 2) The defaults write changes to Mac OS X only

If you’re not interested in all of the terminal adjustments and aliases, you can just also just get the .osx file from this link

In either case, after git is finished or you have grabbed the .osx file yourself, you can execute the script with:

./.osx

This will activate all of the commands listed below at once. We’ve covered just about all of these before but having them in a centralized location and easily writable from a bash script is very useful when you’re setting up a new Mac.

Option 3: Selectively customizing OS X by entering the defaults write commands yourself

Here’s the full list of defaults write commands that are contained within the .osx file, review this before launching the script or just pick and choose which ones you want to use by putting them into the Terminal:

# Enable full keyboard access for all controls (e.g. enable Tab in modal dialogs)
defaults write NSGlobalDomain AppleKeyboardUIMode -int 3

# Enable the 2D Dock
defaults write com.apple.dock no-glass -bool true

# Disable menu bar transparency
defaults write -g AppleEnableMenuBarTransparency -bool false

# Expand save panel by default
defaults write -g NSNavPanelExpandedStateForSaveMode -bool true

# Expand print panel by default
defaults write -g PMPrintingExpandedStateForPrint -bool true

# Disable shadow in screenshots
defaults write com.apple.screencapture disable-shadow -bool true

# Enable highlight hover effect for the grid view of a stack (Dock)
defaults write com.apple.dock mouse-over-hilte-stack -bool true

# Enable spring loading for all Dock items
defaults write enable-spring-load-actions-on-all-items -bool true

# Disable press-and-hold for keys in favor of key repeat
defaults write -g ApplePressAndHoldEnabled -bool false

# Disable auto-correct
defaults write NSGlobalDomain NSAutomaticSpellingCorrectionEnabled -bool false

# Disable window animations
defaults write NSGlobalDomain NSAutomaticWindowAnimationsEnabled -bool false

# Disable disk image verification
defaults write com.apple.frameworks.diskimages skip-verify -bool true
defaults write com.apple.frameworks.diskimages skip-verify-locked -bool true
defaults write com.apple.frameworks.diskimages skip-verify-remote -bool true

# Automatically open a new Finder window when a volume is mounted
defaults write com.apple.frameworks.diskimages auto-open-ro-root -bool true
defaults write com.apple.frameworks.diskimages auto-open-rw-root -bool true

# Avoid creating .DS_Store files on network volumes
defaults write com.apple.desktopservices DSDontWriteNetworkStores -bool true

# Disable Safari’s thumbnail cache for History and Top Sites
defaults write com.apple.Safari DebugSnapshotsUpdatePolicy -int 2

# Enable Safari’s debug menu
defaults write com.apple.Safari IncludeDebugMenu -bool true

# Remove useless icons from Safari’s bookmarks bar
defaults write com.apple.Safari ProxiesInBookmarksBar “()”

# Disable send and reply animations in Mail.app
defaults write com.apple.Mail DisableReplyAnimations -bool true
defaults write com.apple.Mail DisableSendAnimations -bool true

# Disable Resume system-wide
defaults write NSGlobalDomain NSQuitAlwaysKeepsWindows -bool false

# Enable Dashboard dev mode (allows keeping widgets on the desktop)
defaults write com.apple.dashboard devmode -bool true

# Reset Launchpad
rm ~/Library/Application\ Support/Dock/*.db

# Show the ~/Library folder
chflags nohidden ~/Library

# Disable local Time Machine backups
sudo tmutil disablelocal

# Kill affected applications
for app in Safari Finder Dock Mail; do killall “$app”; done

# Fix for the ancient UTF-8 bug in QuickLook (http://mths.be/bbo)
echo “0x08000100:0” > ~/.CFUserTextEncoding

If you’re making manual changes, many of these will require either the Finder, Dock, or other applications to be relaunched before they are activated. This is generally handled through the script with the second to last command (“Kill affected applications”) but with so many changes being made, it may be easier to just reboot your Mac to insure everything is working properly.

Thanks to Brian for sending this in!

By William Pearson - Command Line, Mac OS, Tips & Tricks - 8 Comments

Sprint iPhone 5 to Offer Unlimited Data Plan

Sep 9, 2011 - 2 Comments

Sprint iPhone 5

Sprint will be the USA’s only cell provider to offer unlimited data plans with the upcoming iPhone 5. This latest news come from Bloomberg, who also confirms the mid-October release date:

Sprint, the third-largest U.S. wireless carrier, plans to begin selling the device in mid-October under a deal with Apple for the next model, the iPhone 5, said the people, who wouldn’t be identified because the plans aren’t public. Becoming the country’s only operator to offer the device with unlimited data service for a flat fee may help Sprint draw customers from AT&T and Verizon Wireless, which already carry the phone, they said.

Pricing for the iPhone 5 unlimited data plans remains to be seen, but Sprint currently offers three different unlimited data packages ranging from $69.99/mo for unlimited data and messaging but 450 minutes, up to $99.99 per month for unlimited everything – data, SMS, and minutes. If Sprint was to maintain these price points for iPhone customers, they would be the most competitively priced iPhone plans offered to US customers.

Sprint Unlimited Data Plans

On the other side of the data situation is Verizon and AT&T, who have long canceled unlimited data plans and are instead raising rates while reducing data limits, leaving only those grandfathered into the unlimited data plans to still have access to them. Sprint offering unlimited data and cheaper plans could very well draw a significant amount of users to their network.

Rumors also persist that pre-orders for iPhone 5 will become available prior to the official release next month, alongside iOS 5, iCloud, and the cheaper iPhone 4S.

By Matt Chan - iPhone, News - 2 Comments

Share Files from Mac OS X to Windows PC’s Easily

Sep 8, 2011 - 41 Comments

Mac to Windows File Sharing If you have a mixed network of Mac and Windows PC’s, chances are good that you’ll be wanting to move files between the two operating systems. The easiest way to share files from Mac OS X to Windows is to enable Samba support for a given user account on the Mac. This tutorial will how to share files between Mac and Windows PC this way.

Samba (SMB) may have a funny name but it’s essentially just Mac OS X to Windows file sharing support. Because it’s not required by all Mac users or for Mac-to-Mac sharing, it’s actually a separate unique sharing option within Mac OS X File Sharing panel, and enabling it allows a Windows PC to connect to the Mac without any additional software. Let’s cover exactly how to enable this feature, and then how to connect to a shared Mac from a networked Windows PC so that you can swap files back and forth with ease.

Read more »

By Paul Horowitz - Mac OS, Tips & Tricks - 41 Comments

Customize LaunchPad Folders with Emoji

Sep 8, 2011 - 3 Comments

custom LaunchPad folder name with Emoji

You may know by now that Mac OS X Lion has Emoji support, which is easily accessible in most applications. This brings a wide range of icons and emoticons to the Mac, and some of them are perfect to customize the appearance of LaunchPad folder names. Here’s how:

  • Open TextEdit and then hit Command+Option+T to bring up the ‘Special Character’ tool
  • Select “Emoji” from the list on the left and then select a sub category, find an emoticon or icon you want to use and double-click it to make it appear in the blank TextEdit window
  • Highlight and copy the emoji icon in TextEdit so that it is stored within the clipboard
  • Hit F4 or whatever key you remapped to open LaunchPad
  • Click to open the folder you want to edit, then double-click on the folder name to make changes
  • Use your mouse cursor or the arrow keys to go to the beginning of the word, and hit Command+P to paste the Emoji icon into the folder name
  • Emoji icons in LaunchPad folder names

  • Click out of the folder to set the change

Removing the emoji icon from the folder name is the same as deleting any other character. This is actually an older tip from the iOS world but LaunchPad and iOS’s SpringBoard are so similar that it works in Lion.

Emoji Folders in OS X Lion LaunchPad

These Emoji icons tend to look their best on larger screens mostly because the LaunchPad icons are larger, something that nobody has yet figured out how to control independently – although the LaunchPad icons are universally larger in Mac OS X 10.7.2 developer betas, there is still no way to adjust the size.

Enjoy this? Check out more LaunchPad tips.

By William Pearson - Customize, Mac OS, Tips & Tricks - 3 Comments

Enable Element Inspector in the Mac App Store

Sep 7, 2011 - 5 Comments

Mac App Store element inspector

The Mac App Store has a hidden element inspector that lets you view the source of any page or element drawn within the App Store, letting you extract text or images, and even enter your own code into the console (which can lead to all sorts of fun things). This is probably most useful for web and app developers, but anyone with some curiosity might get a kick out of this feature too.

To enable the Mac App Store’s element inspector, quit out of the App Store and then launch the Terminal. Enter the following defaults write command:

defaults write com.apple.appstore WebKitDeveloperExtras -bool true

Hit Return and then relaunch the App Store. You can now right-click to “Inspect Element” on anything, just like you would in Safari through the developer DOM inspector tool.

Inspect Element in the Mac App Store

As you may have guessed, this works because the Mac App Store is basically just a WebKit wrapper for a website.

There isn’t much reason to disable this feature because it’s only activated by a right-click, but if you want to, that defaults write command is:

defaults write com.apple.appstore WebKitDeveloperExtras -bool false

By William Pearson - Mac OS, Tips & Tricks - 5 Comments

You Can Capture & Save Screen Shots with Preview in Mac OS X

Sep 7, 2011 - 7 Comments

Preview in Mac The Preview image editing and photo viewing app in Mac OS X includes the ability to capture screen shots directly within the application. The resulting images open directly into Preview rather than saving to the Mac desktop, allowing user changes to file size, resolution, color, and file format.

There are three different screen capture modes available in Preview that are almost identical to the standard keyboard shortcuts that are typically used on the Mac. Here’s how to use each of the three options to take images of the entire screen (or screens) in the Preview app of OS X:

Read more »

By William Pearson - Mac OS, Tips & Tricks - 7 Comments

MacUpdate Bundle: 11 Mac Apps for $49.99

Sep 7, 2011 - 6 Comments

MacUpdate Fall Bundle of Mac Apps

The latest MacUpdate Bundle has been announced, stuffing in 11 great Mac apps at a dramatically reduced price. Purchased individually these would cost $487, but the MacUpdate Bundle brings the combined price down to $49.99. The apps include:

  • Toast 11 Titanium ($99) – Burn CDs, DVDs and Blu-Ray discs, plus convert and export video for iPhone and PSP, etc
  • Printopia ($19) – first 10,000 buyers only – Share printers with iPhone, iPad, iPod touch, and enable wireless printing on Mac printers
  • Data Rescue 3 ($99) – Data recovery tool for deleted files and failing hard drives
  • FX Photo Studio Pro 2 ($39.99) – Powerful post-processing photo editor with 159 effects and 15 customizable color correction tools
  • Fantastical ($19.99) – Popular menu-bar based calendar that uses natural language to create events
  • iStat Menus 3 ($16) – Monitor system stats and performance from the menubar: CPU, memory, disk use, bandwidth, temperatures, and so much more
  • PhoneView ($19.95) – Access and read iPhone voicemail, SMS, call history, voice memos, and more, easily from your Mac
  • Concealer ($19.95) – Stores information like passwords, credit cards, and license keys, securely with encryption
  • EarthDesk 5 ($24.95) – Replaces the static desktop picture with a rendered image of Earth with live sun, moon, and cloud coverage
  • Mellel 2 ($29) – Powerful word processor for writers, scholars, technical writing with multilingual support
  • Bookends 11 ($99) – Reference management and bibliography app for students and professionals with Mellel, Word, and Pages support

Considering some of these apps cost $99 alone this is quite a deal. If you counted 12 apps you’re not delirious, but Printopia is available only to the first 10,000 buyers and then drops off the included list, bringing the app count back down to 11.

Watch the video below for a quick walkthrough if you’re unfamiliar with any of the apps by name, or you can read more on the MacUpdate Bundle page:

By Paul Horowitz - Mac OS, News - 6 Comments

Switch Between Desktop Spaces Faster in Mac OS X with Control Keys

Sep 6, 2011 - 30 Comments

Switch between Desktops faster in Mac OS X Lion

Switching between active Desktops/Spaces in OS X with the three fingered sideways swipe is very quick, but an even faster method is by using the Control keys.

The first option is to use the Control + Arrow keys, which is enabled by default. As you might expect, Control + Left Arrow switches to the desktop Space to the left, Control + Right Arrow goes to the right.
Read more »

By Paul Horowitz - Mac OS, Tips & Tricks - 30 Comments

Stop Apple Support Communities Email Updates

Sep 6, 2011 - 4 Comments

Stop Apple Support Community Emails

Rant time! Waking up this morning to 49 new emails from “Apple Support Communities Updates” was less than pleasant, especially considering I had already unsubscribed from all email notifications the night before – or so I thought.

It turns out that you have to unsubscribe to email notifications from each individual thread that you are engaged with on Apple’s Discussion Boards…

Stop Emails from Apple Support Communities Updates

Feels a bit weird to be troubleshooting this, but here’s how to finally shut the email updates off:

  • Click on any link to get to Apple’s Support Communities and then click on your profile name
  • Look on the right side for the “Actions” box and click on “Manage email notifications” – yes believe it or not this is separate from the above option to manage your email notifications
  • Click on each box to check what threads you want to unsubscribe from, or check the topmost box to unsubscribe from all threads you have participated in
  • Click on the “Remove selected notifications” button

Stop email notifications from Apple Support Communities

Oddly enough you have to manually unsubscribe for every thread you participate in, so even if you have unsubscribed from other threads in the past but then participate in a new thread, you’ll have to do this again.
Read more »

Use Shake-To-Undo on the MacBook Pro

Sep 6, 2011 - 17 Comments

Shake to Undo on a Mac Laptop

If you’ve used an iPhone or iPad much, you’re undoubtedly familiar with the ‘shake-to-undo’ motion sensing feature that lets you literally shake the device to undo an event or clear a text box. With a little help of a third party tool, we can bring shake to undo to Mac laptops that are equipped with a sudden motion sensor (SMS), mostly MacBook Pro’s and newer unibody MacBooks. The tiny app works by activating Command+Z when movement is detected by the SMS.
Read more »

By Paul Horowitz - Fun, Mac OS, Tips & Tricks - 17 Comments

Move the iPhoto Library to an External Hard Drive

Sep 5, 2011 - 9 Comments

iPhoto Library Need to move your iPhoto library? No problem, it’s easily done by a two-step process – first you need to physically move or copy the picture library to the new location, and then you have to tell iPhoto where the new location is. This is all really easy to do on the Mac, and it works to put your iPhoto library onto an alternate volume with more storage, particularly nice if you’re feeling the disk space pinch in OS X.

Let’s jump right to to it and learn how to relocate the iPhoto library. This is basically a two step process; moving or copying the iPhoto library to the new location, and then pointing to that new location from iPhoto app.

Read more »

By William Pearson - Mac OS, Tips & Tricks - 9 Comments

iPhone 5 Reservations Available Now in EU, Pre-Orders Coming Soon to USA?

Sep 5, 2011 - 5 Comments

Deutsche Telekom

Hinting at an impending release of iPhone 5 and anticipating significant demand, Deutsche Telekom has begun to offer reservations for EU customers who are interested in purchasing the next-gen iPhone, whenever it is released.

Bloomberg confirmed that Deutsche Telekom will hand out coupons starting today to reserve the iPhone 5, but didn’t provide any further release details on availability. Deutsche Telekom is Europes largest cellular carrier, and their USA subsidiary is T-Mobile, which has also been rumored to carry the next-gen iPhone.

The news out of Europe comes a day after a report from BGR claims that US retailer Best Buy anticipates taking iPhone 5 pre-orders soon for a launch in the first week of October. This may correspond with the original pre-order reports for the expected iPhone 5 launch sometime in October.

Read more »

By Matt Chan - iPhone, News - 5 Comments

Internet Explorer for Mac the Easy Way: Run IE 7, IE8, & IE9 Free in a Virtual Machine

Sep 4, 2011 - 473 Comments

Internet Explorer 7 running in Mac OS X

If you’re a Mac user that requires the usage of Internet Explorer under Mac OS X, you’ll find your choices are generally as follows: run IE on top of Mac OS X with Wine which can be slow and buggy, dual boot Windows and Mac OS X which is a nuisance because it requites rebooting, or use virtualization with something like Parallels, VMWare, or VirtualBox. Virtualization is generally the best method because you can run IE and other Windows apps directly atop OS X, but some of the VM software is expensive and you still need a Windows license key, right? Wrong!
Read more »

By William Pearson - Mac OS, Tips & Tricks - 473 Comments

How to Find the IP Address of an iPhone or iPad in iOS

Sep 3, 2011 - 12 Comments

Finding an IP address of an iPhone, iPad, or iPod touch

You may find yourself needing to know what the IP address of an iPhone, iPad, or iOS device is. Fortunately getting IP address info is quite easy, and getting an iPhone, iPod touch, or iPads IP address is fairly straight forward, with the instructions being the same for basically all versions of iOS and iPadOS.

Here is what you’ll want to do to find the IP address details in on iPhone and iPad:
Read more »

By William Pearson - iPad, iPhone, Tips & Tricks - 12 Comments

Mac Setups: Mac Mini and an iPad 2

Sep 3, 2011 - 3 Comments

Mac Mini and an iPad 2

Digging through some of our reader Mac setup submissions, I realized we hadn’t posted a Mac Mini in a while, so here’s one to fill that gap. It’s a 2.6 GHz Core 2 Duo Mac Mini with 4GB of RAM and a 500GB hard drive attached to an external 23″ Acer display, alongside an iPad 2. Elsewhere is an iPhone 4, iPod Shuffle, Apple Remote, and of course the wireless keyboard and Magic Trackpad.

Great Mac setup, thanks to Ed for sending this in a while back!

Feel free to submit your own Mac setup to: osxdailycom@gmail.com

By William Pearson - Mac Setups - 3 Comments

Amazon Tablet Specs Revealed, Costs $199, Release Due in November

Sep 2, 2011 - 12 Comments

Amazon Tablet, the Amazon Kindle

Update: Amazon launched the $199 Amazon Kindle Fire, the tech specs are better than expected and you can read more here.

Another iPad competitor is about to enter the stage this holiday season, this time from none other than Amazon. Apparently it’ll just be called “Amazon Kindle”, and while the name isn’t too groundbreaking the preliminary info and specs of the prototype that TechCrunch’s MG Siegler used are quite interesting:

  • 7″ touch screen display
  • Exterior looks like a Blackberry Playbook (no images have surfaced yet)
  • 6GB of internal storage
  • Single Core CPU
  • Wi-Fi equipped
  • Micro-USB port
  • Dual speakers
  • Runs custom forked build of Android OS
  • Includes a WebKit based web browser, Cover Flow-like user interface to flip through content, a Dock for apps and favorite items
  • Integrated Amazon access to Amazon Store, Kindle books, music through Amazon Cloud Player, video streaming, and Amazon’s Android Appstore
  • Free Amazon Prime account with purchase
  • $250 price point

A few other interesting notes from the TechCrunch scoop: a second 10″ model will probably come out next year in early 2012, possibly with a dual core CPU and some other expanded features, there may be an SD card slot, and Amazon apparently isn’t working with Google whatsoever on the device, despite the fact that it runs a variation of the Android OS and all Android apps will run on the hardware:

Google’s Android Market is nowhere to be found. In fact, no Google app is anywhere to be found. This is Android fully forked. My understanding is that the Kindle OS was built on top of some version of Android prior to 2.2. And Amazon will keep building on top of that of that over time. In other words, this won’t be getting “Honeycomb” or “Ice Cream Sandwich” — or if it does, users will never know it because that will only be the underpinnings of the OS. Any visual changes will be all Amazon.

I’m a big fan of the iPad and of the Kindle, so I’m pretty interested to see what Amazon puts out and how well it runs, and the $250 price point with free Amazon Prime access will be really compelling to a lot of people. Amazon could really be onto something here, but the big question is if they will succeed where so many others have failed in the fight to compete with Apple’s runaway hit, the iPad.

By Matt Chan - iPad, News - 12 Comments

Redsn0w 0.9.8b7 Makes Jailbreaking 4.3.5 Easier, and Works on iOS 5 Beta 7

Sep 2, 2011 - 3 Comments

redsn0w 0.9.8 b7 supports iOS 4.3.5 and iOS 5 beta 6 & 7

For those that follow along with all the jailbreak stuff and rely on third party Cydia tweaks, the iPhone Dev Team has released redsn0w 0.9.8b7 which is aimed at making the existing iOS 4.3.5 jailbreak easier, but also adding support for jailbreaking iOS 5 beta 6 and beta 7.

What’s the advantage to using redsn0w 0.9.8b7? For 4.3.5 users, you can now perform a tethered jailbreak simply by pointing at the iOS 4.3.5 IPSW rather than 4.3.4. Other than that, the incremental release is primarily aimed at iOS and Cydia devs who are looking to update their apps and tweaks for the latest iOS 5 beta, and the latest beta 7 users still need to point at beta 6 IPSW.

If you’re already jailbroken there isn’t any reason to use this version of redsn0w over past versions.

Download Redsn0w 0.9.8b7

As usual with redsn0w, you need the appropriate iOS IPSW file for your iPhone, iPad, or iPod touch – either iOS 4.3.5 or iOS 5 beta, and then just follow the simple in-app instructions.

Not much else has changed with the new release, and the jailbreak is tethered, meaning you need to connect the iOS device to a computer and boot the hardware with the assistance of the application.

By Matt Chan - iPad, iPhone - 3 Comments

Use Any Font in the Mac OS X Terminal

Sep 2, 2011 - 6 Comments

Terminal The Terminal in modern versions of Mac OS X enforces a new monospacing character width standard, which in laymen terms means you no longer have to use monospace fonts in the Terminal. That means you can now use any font you want, even Comic Sans like the screenshot shows down below (hooray?).

Read more »

By William Pearson - Command Line, Mac OS, Tips & Tricks - 6 Comments

Subscribe to OSXDaily

Subscribe to RSS Subscribe to Twitter Feed Follow on Facebook Subscribe to eMail Updates

Tips & Tricks

News

iPhone / iPad

Mac

Troubleshooting

Shop on Amazon to help support this site