Mac tips

Since I obtained a MacBook Pro in 2012, I have been accumulating various tips and tricks to customize the environment. I thought it would be appropriate to share some of these with readers. If you are aware of others and would like them included, please place your thoughts in the comments section. I tried to arrange these in a somewhat logical order.

Bootcamp:

I use both Bootcamp and VirtualBox on my MacBook. Although I like the ability to work with virtual environments, there are times I need access to Windows specific programs and need to run them in a non-virtual mode. Enter Bootcamp. Once you have this installed, you can boot (hold the Option key while booting) and you can run Windows on your Mac. One of the nice features is that you have access to the actual data from within the Mac environment (in the event you want to copy a specific file you have been working on).  The only downside is that you have to restart your computer to use Windows 7 (or return to Mountain Lion).

GateKeeper:

I love it when operating systems protect you from yourself. Yep, that was dripping with cynicism. Whether it is the User Account Control (first introduced in Vista) or Gatekeeper with Mountain Lion. Grumble. The concept is fine – only allow tested apps form the AppStore to be installed on your computer. Unfortunately, there are many times when I want to try out something and find it on a website. By default, GateKeeper will prevent you from installing non-trusted apps. Hold the Option key down when installing to get past this.

Login Window customization:

For example, if you want to include a text string on the login page (perhaps indicating that you will pay a reward if the computer is found and returned intact), you can update one of the system files. Specifically change the contents of /Library/Preferences/com.apple.loginwindow. This file is based on XML and the following command will insert these lines of XML:

<key>LoginwindowText</key>
<string>Whatever you want</string>

Open a terminal session and enter the following (you will need the root password to accomplish this):

sudo defaults write /Library/Preferences/com.apple.loginwindow LoginwindowText “whatever you want”

Obviously, you might want to make a backup of this file before making any changes. The results will look like the following…

Modified Mac Login Screen

 

Mouse Locator:

How many times are you in a presentation and you want to point out something with the cursor. Of course, the cursor is small and not often readily visible to a large audience. Enter Mouse Locator. Visit http://www.2point5fish.com/ and download the application. You can then activate it within System Preferences. You can specify the PNG file you want to use to enhance the typical mouse cursor. I used a default finger pointing. You see this in the screen capture below.

Mouse Locator Preferences

Open With (duplicate entries)

I noted that as I installed new files and updated applications, I kept getting more and more entries in my Open With list on my Mac. For example, to open a simple .html file, I ended up with a list like the following:

Duplicate Entries on Open With

Ouch – this became quite painful to scroll through. I found that if I open a terminal session and enter the following command, it will remove all but the most recent applications from the list. I recommend just copying and pasting this line (rather than trying to retype it). As always, I take no responsibility for potential problems if you do this (your mileage may vary and you did find this on the Internet and you can’t trust everything you read on the Internet).

/System/Library/Frameworks/CoreServices.framework/Frameworks/LaunchServices.framework/Support/lsregister -kill -r -domain local -domain system -domain user

That worked for me (did I say you should only do the above at your own risk). The resulting list is now much more manageable (see below).

Fewer Duplicate Entries in Open with

Zoom In/ Out

For some reason, this feature was deactivated in OS X Mountain Lion. Open System Preferences and go to the Accessibility icon. Modify the panel as shown below. Personally, I find that I use Ctrl + mouse/ trackpad move up or down (to zoom or shrink) the most.

Accessibility Zoom feature

Ok, these are some of the enhancements I have found in the past months. What other tips and tricks do you prefer? Please include them in the comments below.

6 thoughts on “Mac tips”

  1. These are some good tips Mark. I’m definitely going to use a few of these.

    Mind if I add a few of my own helpful discoveries too?

    Alfred + Powerpack – Replaces Spotlight with something useful and ads a few other much used system enhancements.

    Divvy – Coming from Windows, I couldn’t live with out Divvy. With a few shortcuts I can now dock applications to half screen left/right, full screen (plus a whole lot of combinations Windows couldn’t do)

    Make Bash pretty – I don’t remember the original site I got this suggestion so I’ll just post the code. Add this to your .bash_profile

    ##################################################
    # Fancy PWD display function
    ##################################################
    # The home directory (HOME) is replaced with a ~
    # The last pwdmaxlen characters of the PWD are displayed
    # Leading partial directory names are striped off
    # /home/me/stuff -> ~/stuff if USER=me
    # /usr/share/big_dir_name -> ../share/big_dir_name if pwdmaxlen=20
    ##################################################
    bash_prompt_command() {
    # How many characters of the $PWD should be kept
    local pwdmaxlen=25
    # Indicate that there has been dir truncation
    local trunc_symbol=".."
    local dir=${PWD##*/}
    pwdmaxlen=$(( ( pwdmaxlen < ${#dir} ) ? ${#dir} : pwdmaxlen ))
    NEW_PWD=${PWD/$HOME/~}
    local pwdoffset=$(( ${#NEW_PWD} - pwdmaxlen ))
    if [ ${pwdoffset} -gt "0" ]
    then
    NEW_PWD=${NEW_PWD:$pwdoffset:$pwdmaxlen}
    NEW_PWD=${trunc_symbol}/${NEW_PWD#*/}
    fi
    }
    #
    bash_prompt() {
    local NONE='\[33[0m\]' # unsets color to term's fg color

    # regular colors
    local K='\[33[0;30m\]' # black
    local R='\[33[0;31m\]' # red
    local G='\[33[0;32m\]' # green
    local Y='\[33[0;33m\]' # yellow
    local B='\[33[0;34m\]' # blue
    local M='\[33[0;35m\]' # magenta
    local C='\[33[0;36m\]' # cyan
    local W='\[33[0;37m\]' # white

    # empahsized (bolded) colors
    local EMK='\[33[1;30m\]'
    local EMR='\[33[1;31m\]'
    local EMG='\[33[1;32m\]'
    local EMY='\[33[1;33m\]'
    local EMB='\[33[1;34m\]'
    local EMM='\[33[1;35m\]'
    local EMC='\[33[1;36m\]'
    local EMW='\[33[1;37m\]'

    # background colors
    local BGK='\[33[40m\]'
    local BGR='\[33[41m\]'
    local BGG='\[33[42m\]'
    local BGY='\[33[43m\]'
    local BGB='\[33[44m\]'
    local BGM='\[33[45m\]'
    local BGC='\[33[46m\]'
    local BGW='\[33[47m\]'

    local UC=$C # user's color
    [ $UID -eq "0" ] && UC=$R # root's color

    #PROMPT_COMMAND='echo -ne "33]0;${USER}@${HOSTNAME}: ${PWD}07"'
    #PS1="${EMK}[${UC}\u${EMR}@${UC}\h ${EMB}\${NEW_PWD}${EMK}]${UC}\\$ ${NONE}"
    PS1="${W}[\t${W}] ${Y}[${R}\u${R}@${R}\h ${EMB}\${NEW_PWD}${Y}]${W}\\$ ${NONE}"
    }
    #
    PROMPT_COMMAND=bash_prompt_command
    bash_prompt
    unset bash_prompt

  2. Actually, Mouse Locator DOES work under 10.8.x, but you have to enable it every time you boot the computer. Sadly, 2point5fish seem to have fallen off the planet, and it’s not open source, so I can’t pick up maintaining it myself (otherwise I would have, trust me – I loved that app).

    An alternative would be MousePose, which is $4.99 via the app store. With a keystroke, it highlights your mouse, dimming the area surrounding it. You’ve probably seen this effect in many screencasts.

    Here are a couple of other utilities I can’t live without (in addition to those already mentioned in this post and its comments):

    QuickSilver – with a configurable keystroke, I’m able to type the name of the app I want to launch or the contact/email/whatever indexable item I want to find.

    BetterTouchTool – allows you to not only configure custom touchpad gestures, but also keyboard shortcuts for many things; I use gestures to lock my screen, short cuts to move windows between screens or to maximize to the side/top/bottom/third/corner of the screen to tile multiple windows, and many more – this works really well with Divvy, too.

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Social media & sharing icons powered by UltimatelySocial