Bristle Software Mac Tips

This page is offered as a service of Bristle Software, Inc.  New tips are sent to an associated mailing list when they are posted here.  Please send comments, corrections, any tips you'd like to contribute, or requests to be added to the mailing list, to tips@bristle.com.

Table of Contents:

  1. Moving to Mac
    1. Getting Started
    2. Recommended Software
  2. Mac Shortcut Keys
  3. Dock
    1. Keep in Dock
    2. Open at Login
    3. Lock the Dock
    4. Lock the Current Items into the Dock
  4. Finder
    1. Show All Files in Finder (including dot files)
  5. Activity Monitor
    1. Intro to Activity Monitor
    2. Activity Monitor Dock Icon as a CPU Meter
  6. Terminal
    1. Intro to Terminal
    2. Unix shells and commands
    3. Open a file
    4. Open a URL

Details of Tips:

  1. Moving to Mac

    1. Getting Started

      Original Version: 8/27/2009
      Last Updated: 8/27/2009

      Moving to Mac from Windows or Linux is easy!

      I made the move a couple months ago, and I love it.  Everything just works.  All the time!  This is how computers are supposed to work.  As a user, everything works the way I'd expect.  And as a programmer, all of my programs work the same, and all of the tools I need are available for free, and work the same as on Windows and Linux.

      Three weeks ago, I also moved my 70-year-old mother from Windows to Mac.  No problem.  I had set her up years ago to use Firefox and Thunderbird on Windows, so she now uses them on Mac.  I moved her from MS Office to OpenOffice.org easily.  Her Excel spreadsheets and Word docs all work fine.  I downloaded the free Flip4Mac so she can view Windows Media Player files in QuickTime.  I was even able to go to the Apple download site and find free versions of the games she likes:  Spider Solitaire, Bridge, etc.

      So how expensive was it?  She bought a Mac Mini with no monitor, no mouse or keyboard, etc.  Also bought a small display adapter cord so we could plug in the 20-inch LCD monitor she'd been using on her Windows PC.  Works fine.  Also plugged in her existing Windows USB wireless keyboard and mouse.  Works fine.  Installed her existing USB printer/scanner/copier.  Printer works fine, but scanner doesn't.  No problem -- when she bought the Mac, she got a free-after-rebate printer/scanner/copier anyhow, so we used that one instead.  Total cost: $620.  (OK, actually we bought her the upgraded Mac Mini for $800 instead of $600, and the 3-year extended warranty for an additional $150, but still the total was only $970.)

      She's had no trouble so far.  The basic Mac interface for managing files (Finder) is close enough to Windows Explorer (and Linux KDE, Gnome, etc.) that there's no learning curve.  The built-in search (Spotlight) is fast, intuitive, and well-integrated -- MUCH better than Windows Search, more like Google Desktop.  No need for Adobe Acrobat reader -- "Preview" does it.  "Activity Monitor" is like Windows "Task Manager".  Obvious things happen when you plug in USB drives and such.  "Time Machine" does automatic backups.

      Many of the shortcut keys are even the same as Windows, except it's the Mac "Command" key sometimes, instead of the Ctrl key or the Windows "Alt" key (which are both also on the Mac keyboard).  Plus there are lots of extra shortcuts.  For example:

      Cmd-Tab Next window
      Cmd-A Select All
      Shift-Arrow Extend selection
      Cmd-C Copy
      Cmd-V Paste
      Cmd-X Cut
      Cmd-F Find
      Cmd-G Find Next
      Cmd-Shift-G Find Previous
      Cmd-E Find selected text
      Cmd-Z Undo
      Cmd-Shift-Z Redo
      Cmd-S Save
      Cmd-P Print
      Cmd-N New


      Connecting to Windows file shares on a LAN is automatic.  I copied all of her Thunderbird mail folders, address books and message filters directly from Windows to Mac and Thunderbird picked them up automatically. 

      If you're a Java programmer with Linux experience, you'll appreciate the fact that when you open a Terminal window, the Mac OS X command line is really BSD Unix, so all of your aliases, scripts, etc. still work.  Furthermore, Java works fine and comes pre-installed (versions 1.3.1, 1.4.2, 1.5.0, and 1.6.0).  You can download and run Eclipse, Tomcat, MySQL, etc., w/no problem.  Download the free Aquamacs Emacs, which is compatible with, but better than, regular GNU Emacs on Linux or Windows.  All of my Java and MySQL code works identically on Mac as on Windows and Linux, both regular apps and Tomcat-hosted Web apps.  No need to even re-compile, since it's Java.  My 22 years worth of Unix shell scripts all work fine.

      My biggest point of pain has been re-writing 17 years worth of Windows batch files into Unix shell scripts.  Easy, since the Unix scripting languages are so much more powerful and expressive than Windows batch files, so they've all gotten shorter, with more features and better error handling, but it takes time to do them all.

      Other software:

      • I bought DeltaWalker for $79 as a Windiff replacement.  It has lots of features that Windiff was missing -- compare Word, Excel, and PDF files, edit files being compared, etc.  Had some glitches when I first started using it, but the support team has been very responsive and quickly fixed them all for me.
      • Download the free "Microsoft Remote Desktop Connection Client for Mac 2" from:
            http://www.microsoft.com/downloads/details.aspx?familyid=803F9438-8DF3-490F-92C6-0E0F92787DB8
        if you want to be able to see and interact with your Windows desktops in a Mac window.
      • I'm currently evaluating WYSIWYG HTML editors.  Amaya and KompoZer seem the best so far, but neither is perfect.  But then my old copy of MS Front Page 2000 was pretty bad too.

      --Fred

    2. Recommended Software

      Original Version: 9/11/2008
      Last Updated: 1/19/2014

      With Mac OS X, you get the following software pre-installed:

      • Basic OS stuff
        • Desktop (like Windows desktop, Linux KDE, Gnome, etc.)
        • Dock (like Windows Task Bar)
        • Finder (like Windows Explorer ("My Computer"), Linux KDE, Gnome, etc.)
        • Spotlight (like Google Desktop Search, much better than Windows Search)
        • Dashboard (calculator, calendar, clock, weather, Sticky notes, and other widgets)
        • System Preferences (like Windows Control Panel)
        • Activity Monitor (like Windows Task Manager)
        • Time Machine (very slick and easy-to-use backup software)
        • Spaces (multiple virtual desktops)
        • Expose (much better than Windows "Show Desktop")
        • Terminal (like Windows Command Prompt, Unix xterm, etc.)

      • Viewers
        • Safari (Web browser)
        • Preview (can view PDF files, MS Office files, view/edit image files, etc.)
        • QuickTime (audio/video media player)
        • iTunes (play music, manage music collection)
        • Front Row (full screen movie player)

      • Productivity/Communication
        • TextEdit (like Windows Notepad, can also edit Word docs)
        • iCal (calendar)
        • iChat (text/voice/video chat)
        • Address Book (not recommended, I prefer Thunderbird)
        • Mail (not recommended, I prefer Thunderbird)
        • Calculator, Dictionary, Games, Gadgets, etc.

      • Media creation/editing
        • Photo Booth (take and edit pictures with the laptop's camera)
        • iDVD (CD/DVD reader/burner)
        • iMovie (create/edit movies)
        • iPhoto (create/edit photo albums)
        • iWeb (create/edit Web pages, I prefer Dreamweaver)
        • GarageBand (create/edit music)

      • Networking
        • Sharing (file sharing, desktop sharing, device sharing, remote login, etc. to other Macs and Unix/Linux)
          • Art Alexion warns that VNC has problems in Mac OS X 10.7 (Lion)
        • Samba (file sharing, device sharing with networked Windows computers)
          • Art Alexion warns that Samba is replaced with a different Apple product in Mac OS X 10.7 (Lion)
        • AirPort (wireless LAN)
        • BlueTooth (supports wireless keyboard, mouse, etc.)
        • Security (firewall enabled by default, disk encryption disabled by default)
      •  
      • Unix (Mac OS X is really BSD Unix, so you have all of the standard Unix shells and commands, including X Windows)

      • Java SE 2, 5, and 6


      Here is some additional software that I recommend.  I'm using almost all of this, and almost all of it is FOSS (free open source software).  Exceptions are noted.

      • Viewers
        • Firefox (Web browser)
        • Chrome (Web browser)
        • Flip4Mac (allows QuickTime to play Windows *.wmv files)
        • Adobe Flash (view Flash *.swf files in Web browsers, may get installed automatically with the browser)
        • Adobe Reader (native "Preview" is very good, but not perfect)
          • On the other hand, Preview is better in some ways.  Art Alexion points out that Preview selects multi-column text one column at a time, not both columns at one, like Adobe Reader does.  Great tip!  Thanks, Art!

      • Productivity/Communications
        • LibreOffice (like Microsoft Office -- operates on Word, Excel, PowerPoint files, was OpenOffice)
        • Thunderbird (much better than Microsoft Outlook and you can directly copy your old Thunderbird address book, mail folders, etc., from your old Windows box)
        • DropBox (automatic backups to the Cloud, and file synchronization across Macs, Windows, Linux, Android devices, iPhone, iPad, etc., also useful for selectively sharing files/folders with other people)
        • join.me (desktop sharing, teleconference, up to 250 people connected at once, like WebEx or GoToMeeting but free, requires no install to view the presenter's desktop, and the presenter's install can be temporary, also offers free teleconference using regular phones)
        • Skype (text/voice/video chat where iChat is not available, like to non-Mac computers and to regular telephones)
        • DeltaWalker -- $80 (compare/merge/search/edit text files and directory trees, better than FileMerge, much better than WinDiff, can also operate on Microsoft Word and Excel files)

      • Media creation/editing
        • Dreamweaver -- free 30 day trial, then $400 (HTML WYSIWYG editor, much better than Front Page, KompoZer, Amaya, RapidWeaver, iWeb, etc.)
        • GIMP (image editing, like Photoshop)

      • Networking
        • PdaNet (tethering -- connect your Mac to the Internet via your Android phone)
        • Chicken of the VNC (allows you to see and interact with a remote desktop: Mac, Windows, Linux etc., not using it yet, but I hear good things)
        • Microsoft Remote Desktop Connection Client for Mac (allows you to see and interact with a remote Windows desktop in a Mac window)
        • Fugu (FTP GUI, like CyberDuck, may be better/worse)

      • Mac-specific
        • PlistEdit Pro (edit Mac "property lists" which unfortunately are a proprietary binary format more like the disastrous Windows registry than the regular text config files used by all the standard Unix parts of Mac OS X)

      • Programming
        • Aquamacs (emacs text editor well integrated w/Mac)
        • Firebug (JavaScript debugger plugin to Firefox)
          • FireFinder (plugin to Firebug, helps debug CSS and XPath selectors of HTML elements)
          • FireQuery (plugin to Firebug, helps debug jQuery events)
        • MySQL (SQL database)
        • PostgreSQL (SQL database, not using it but I hear good things)
        • MongoDB (NoSQL database)
        • ElasticSearch (full-text search engine)
        • Amazon EC2 command-line tools (manage AWS EC2 servers)
        • Git (version control)
          • Also, EGit plugin for Eclipse
          • Also GitX (really good for reviewing changes, committing pieces of files, etc.)
        • Java Programming
          • Tomcat (Java servlet container)
          • Java EE (Java Enterprise Edition)
          • GlassFish (Java EE container)
          • Eclipse (Java IDE)
          • STS -- SpringSource Tool Suite (Enhanced version of Eclipse w/better Grails support)
          • NetBeans (Java IDE)
          • JUnit (Java testing)
          • Groovy/Grails Programming
            • Groovy (Ruby-like language that runs on Java JVM)
              • Also Groovy-Eclipse Plugin for Eclipse
            • Grails (Java version of Ruby on Rails)
              • Also Grails Eclipse Plugin
              • Also Grails Plugin for Jersey JAX-RS
          • Android Programming
            • Android SDK (software development kit for Android development, generates scaffolding, includes Java-to-Dalvik bytecode converter, APK generator, software to install apps on an Android device via USB cable, Android emulator so you can test your app w/o owning an Android device, etc.)
            • Eclipse ADT (Android Development Tools plugin for Eclipse, includes graphical screen and resource editors, integrates w/Android SDK software to install/run/debug apps on an Android device via USB cable or on the Android emulator, etc.)
        • Apple Programming (Mac, iPhone, iPad, etc.)
          • Apple Developer Tools (Xcode, FileMerge, etc., not installed by default, but they are on the Snow Leopard install disks)

      Recommendations from other people:

      • Viewers
        • Skim (PDF files)
          • Dave Weiss
        • VLC (like QuickTime)
          • Art Alexion
      • Productivity/Communications
        • NeoOffice (version of OpenOffice well integrated w/Mac)
          • Mike Hoffman
          • Art Alexion
        • iMessage (text messages)
          • Dave Weiss
        • Jotz (note pad)
          • Dave Weiss
        • Unison -- $20 (newgroup reader)
          • Gary Hayenga
      • Media creation/editing
        • GraphicConverter -- $20 (image editing)
          • Gary Hayenga
        • Seashore (image editing)
          • Art Alexion
      • Networking
        • Cord (like Microsoft Remote Desktop Connection Client)
          • Art Alexion
      • Mac-specific
      • Programming
        • BBEdit -- $50 (text and HTML editing)
          • Dave Weiss
          • Gary Hayenga
        • TextWrangler (free stripped-down version of BBEdit)
          • Gary Hayenga
        • TextMate (text and HTML editing)
          • Kris Molendyke
        • MySQL Workbench (MySQL client)
          • Garrett Baird
        • Sequel Pro (MySQL client)
          • Gary Hayenga
        • MAMP (manages Apache, MySQL and PHP)
          • Gary Hayenga
        • Java Programming
          • Groovy/Grails Programming
          • Android Programming
        • Python Programming
          • pythonbrew (Manage multiple Python environments)
            • Brian Clapper
            • Deprecated in favor of pyenv
            • Uses virtualenv behind the scenes
        • Apple Programming (Mac, iPhone, iPad, etc.)
      • Shell (Command Line)
        • direnv (Change environment each time you cd)
          • Brian Clapper
        • autojump (CDPATH on steroids)
          • Brian Clapper

      Did I miss any of your favorites? Let me know.

      --Fred

  2. Mac Shortcut Keys

    Original Version: 6/20/2010
    Last Updated: 9/30/2018

    Here is a list of some of the more useful shortcut keys for the Mac:


    Did I miss any good ones?  Let me know.  Thanks to the following for their contributions:
        Brian Clapper
        Chris Hunter
        Gary Leshner
        Matt Brophy
        Greg Yeutter

    --Fred

  3. Dock

    1. Keep in Dock

      Original Version: 1/9/2012
      Last Updated: 1/17/2012

      Tired of going to Spotlight all the time to launch things?  Put your favorites in the Dock for easy access.

      Once you've launched an app, it appears in the Dock, but only as long as it's still running.  To keep it there permanently, right click its Dock icon and choose Options | Keep in Dock.

      [1/17/2012 Update]
      Thanks to Amul Shah for reminding me to mention that Cmd-Space is a keyboard shortcut for Spotlight.

      --Fred

    2. Open at Login

      Original Version: 1/9/2012
      Last Updated: 1/9/2012

      Want a certain app to run automatically each time you login to your Mac?

      Right click its Dock icon and choose Options | Open at Login.

      --Fred

    3. Lock the Dock

      Original Version: 1/12/2012
      Last Updated: 1/12/2012

      Do you accidentally drag things out of the dock and lose them?

      It's very easy to drag instead of click, when you're moving fast and don't release the mouse button quick enough.  This drags the item out of the dock, and it vanishes in a puff of smoke.  Bummer!   Almost never what I wanted to do, and sometimes I don't even notice till much later, when I wonder where the dock item went.

      Even worse, family members and other Mac users do this on their Macs and have to ask me to fix it for them, by finding the application in the Applications folder or the Applications/Utilities folder, or wherever, and putting it back in the dock as described in Keep in Dock.  My father-in-law used to do that all the time, and would just suffer without the app until the next time I visited.

      A simple answer is to lock the dock so that nothing can be dragged from it.

      Go to a Terminal Window, as described in Terminal Intro and execute the commands:

      % defaults write com.apple.dock contents-immutable -bool true
      % killall Dock

      This changes the default setting for Dock, and restarts Dock so that it starts using the new setting.

      For more info, see:
             http://forums.macrumors.com/showthread.php?t=1018274

      This worked perfectly for my father-in-law, but for myself, I found a better way.  See Lock the Current Items into the Dock.

      --Fred

    4. Lock the Current Items into the Dock

      Original Version: 1/12/2012
      Last Updated: 1/17/2012

      The technique described at Lock the Dock is overkill in some cases.

      It prevents you from being able to making any change to the Dock items. This has good effects, like preventing you from:

      • Accidentally dragging a Dock icon to the desktop and having it vanish in a puff of smoke.

      However, it also has effects that you may not want, like preventing you from:

      • Intentionally dragging a Dock item to the trashcan to delete it.
      • Right-clicking on a Dock item and choosing Options | Remove from Dock.

      Also, it has effects that I definitely did not want, like preventing you from:

      • Dragging items within the Dock to rearrange them.

      Personally, I like to be able to rearrange the items in the Dock, especially the transient items that represent currently "minimized" windows.  I sometimes treat the Dock as a stack of tasks that I have to complete, and the order is important to me.  So, I wanted a less extreme way to lock items into the Dock.

      I used the command:

      % defaults read | less

      to see the rest of the default settings, but didn't see anything promising.  This is not a complete set of possibilities anyhow, because it only shows the options that have a default value set, not any other options that are not currently set.  Not really the full list I was looking for.

      Then I checked the Web pages:
           http://secrets.blacktree.com/?showapp=com.apple.dock
           http://secrets.blacktree.com/?show=all
      which show long lists of options, but still nothing that looked promising.

      Then I found:
           http://reviews.cnet.com/8301-13727_7-10330074-263.html
      which describes the (risky) process of directly editing the binary Mac "property list" file for the Dock:
           ~/Library/Preferences/com.apple.dock.plist

      I tried this, but couldn't get it to work, whether editing via emacs or (as it recommends) via TextEdit, and whether or not I deleted the cached file ~/Library/Preferences/com.apple.dock.db.

      Finally, I downloaded and installed PListEdit Pro 1.5, from:
           http://www.apple.com/downloads/macosx/development_tools/plisteditpro.html
      and used it to edit the same file:
           ~/Library/Preferences/com.apple.dock.plist

      Worked perfectly!  So, I paid the $29.95 nagware license.

      Here's what I did:

      • Put into the Dock all of the items I wanted to lock there, and only those items.
      • Used PListEdit Pro to edit the plist file, renaming "persistent-apps" to "static-apps".
      • % killall Dock

      Now I get the desired effects:

      • Can try to drag an item out of the Dock, but no cloud appears and it doesn't delete.
      • Can drag to rearrange items in the Dock.

      and the undesired, but acceptable, effects:

      • Can try to drag to the trash can but it is greyed out and doesn't delete.
      • Can not right-click | Options | Remove from Dock
      • Can do all of the above for subsequently added icons, just not for the ones that were there when I edited the plist file.  This is because the newly added ones are added to a newly created "persistent-apps" section, not to my manually created "static-apps" section.

      Not ideal, but close enough for now.  Any suggestions to make it better?  Especially, any easy way to move future persistent-apps entries to the static-apps list?

      [1/17/2012 Update]
      Thanks to Jason DiPrinzio for reminding me that the free Mac development tools include a property list editor, so you don't really need PListEdit Pro.  At the time that I solved this problem, a couple years ago, I hadn't yet installed the dev tools.  They are a paid download from Apple, or a free install from your Mac OS X install disks.

      --Fred

  4. Finder

    1. Show All Files in Finder (including dot files)

      Original Version: 1/8/2012
      Last Updated: 1/12/2012

      Want Finder to show you all files instead of skipping those that start with a dot (".")?

      Go to a Terminal Window, as described in Terminal Intro and execute the commands:

      % defaults write com.apple.finder AppleShowAllFiles TRUE
      % killall Finder

      This changes the default setting for Finder, and restarts Finder so that it starts using the new setting.

      [1/12/2012 Update]
      Thanks to Vadim Storozhuk for sending me a shell script that toggles this setting on and off. This is particularly handy because showing the dot files causes .DS_Store to appear on the Mac desktop, so you may not always want the setting to be true.  See:


      --Fred

  5. Activity Monitor

    1. Intro to Activity Monitor

      Original Version: 1/9/2012
      Last Updated: 1/9/2012

      Activity Monitor is a built-in Mac utility to show you what is currently happening on your Mac.  It is very similar to the Unix/Linux top command and the Windows Task Manager.

      It shows some overall system-wide values like:  CPU usage, Memory (RAM) usage, Disk Activity, Disk usage, and Network traffic.   It also shows a list of all currently running processes, with columns for process id, process name, username, percent of CPU, total CPU usage since it started, number of threads, physical and virtual memory being used, etc.  You can use the View menu to change which columns are shown, how often the data is updated, etc.

      You can also use Activity Monitor to inspect, sample, and kill processes.

      Activity Monitor is not in the standard Applications folder.  It is in the Utilities subfolder of Applications.  However, you don't have to know that to launch it.  Click on the Spotlight icon (the magnifying glass at the top right of the screen), type "Activity Monitor" and hit Enter.

      You may want to keep Activity Monitor in your Dock, as described in Keep in Dock.

      --Fred

    2. Activity Monitor Dock Icon as a CPU Meter

      Original Version: 1/9/2012
      Last Updated: 1/9/2012

      Want a way to see the current CPU usage of your Mac at a glance?  Or a graph of the recent CPU usage?  Or the current memory usage, or disk activity, or network traffic?

      Launch Activity Monitor as described in Intro to Activity Monitor and keep it on the dock as described in Keep in Dock.  Then right click its Dock icon and choose Dock Icon to see the list of things you can have it show in the Dock icon.  If you find this useful enough, you may also want to set it to automatically start at login as described in Open at Login.

      If you don't want it in the Dock, you can also use the right-click menu of the Dock icon to create a small free-floating window that shows CPU usage or history.

      --Fred

  6. Terminal

    1. Intro to Terminal

      Original Version: 1/8/2012
      Last Updated: 8/2/2018

      Tired of pointing and clicking all the time?  If you're a Mac power user, you'll often prefer the command line interface offered by the Terminal window.

      To open a Terminal window, click on the Spotlight icon (the magnifying glass at the top right of the screen), type "Terminal" and hit Enter.  A new window will open, running the Unix bash shell, where you can type commands.  To get an idea of what is possible here, see:


      You may want to keep Terminal in your Dock, as described in Keep in Dock.

      [1/17/2012 Update]
      Thanks to Amul Shah for reminding me to mention that Cmd-Space is a keyboard shortcut for Spotlight.

      [8/2/2018 Update]
      Thanks to Bob Shank for telling me the above link to my Unix Tips page was broken.

      --Fred

    2. Unix shells and commands

      Original Version: 1/29/2021
      Last Updated: 1/29/2021

      Since Mac OS X and the newer macOS are both based on BSD Unix, pretty much everything described here for Unix/Linux also applies to Mac:

      http://bristle.com/Tips/Unix.htm

      On Mac OS X, the default shell is bash.  On macOS, the default shell is zsh.  But in both cases all other shells work fine also, and you can change the default to any shell you like.  The same is true for pretty much all commands, redirection techniques, shell scripts, etc.  So, be sure to read the tips at that page also.

      In fact, as described in Getting Started, one of the best things about moving to Mac from Windows was that all of my decades-old shell scripts and aliases started working again.

      --Fred

    3. Open a file

      Original Version: 1/29/2021
      Last Updated: 1/29/2021

      Want a way to launch the default app for a file, the same as double-clicking the file with the mouse, but done from the command line or a shell script instead?

      Use the open command.  For example, the command:

          open Document1.doc

      launches LibreOffice, Apple Pages or Microsoft Word, whichever one is the program associated with ".doc" files on your computer.

      For more info on the open command, type:

          man open

      You can do the same thing in Windows and Unix/Linux.  See:

      Windows: Open a file
      Unix/Linux: Open a file

      --Fred

    4. Open a URL

      Original Version: 1/29/2021
      Last Updated: 1/29/2021

      Want a way to launch the default app for a URL, the same as clicking the URL with the mouse, but done from the command line or a shell script instead?

      Use the open command.  For example, the command:

          open mailto:tips@bristle.com

      launches your mail program (Thunderbird, Eudora, Apple Mail, etc.) and fills in my e-mail address in a blank message.  All you have to do is type in the rest of the message and hit Send.  Similarly, you can open your default Web browser (Chrome, Firefox, Safari, etc.) at a specific Web page via:

          open http://bristle.com

      For more info on the open command, type:

          man open

      You can do the same thing in Windows and Unix/Linux.  See:

      Windows: Open a URL
      Unix/Linux: Open a URL

      --Fred

©Copyright 2007-2021, Bristle Software, Inc.  All rights reserved.