Mac OS X: Utilities and solutions

I used to work with a Windows XP computer. I'm now using a Mac and here are some of the useful tools I found to be able to do pretty much what I used to do on my XP machine.

Multiple desktops?

Want to have multiple desktops? Wondering where Apple decided to hide Spaces? Looking to add more Spaces to Mission Control? First click on the Mission Control app. Then go to the top right, and click the "+" button. Easy to do, yet hard to find.

Remote access to your Mac

There are so many ways to remotely access your Mac that it is hard to select which is best. The default Apple Screen Share (through Back to my mac) is the one I found most effective (much more responsive than other VNC servers).

If ScreenShare / Back to my Mac does not suits your needs, you can also try TeamViewer, LogMeIn, Screens, Splashtop and the wide range of VNC servers out there such as JollysFastVNC.

How to select which OS to boot (bootcamp)

Hold the Alt key before turning the computer on.

How to use the same MS Windows image to boot both in bootcamp and VMWare Fusion

See: http://kb.vmware.com/selfservice/microsites/search.do?language=en_US&cmd=displayKC&externalId=1014618

http://kb.vmware.com/selfservice/microsites/search.do?language=en_US&cmd=displayKC&externalId=1003426

Screen capture (Print Screen)

Command-Shift-3: screen capture, entire screen

Command-Shift-4: screen capture, crosshair cursor (you can select the rectangle of the screen to capture)

Control-Command-Shift-3 (or 4): as the two previous, but puts the result in the clipboard

Function keys

Accessing the function keys (while in a remote desktop to a Microsoft Windows XP machine for example), use fn-function key. Fn is typically found below the f13 key on a keyboard with numeric keypad.

Tab Key behavior in dialogs

How to change the tab and space keys behavior such that in dialogs tab switches between buttons and space activates the current button? Go to Preferences, Keyboard, Keyboard Shortcuts, Full Keyboard Access, select All controls.

Clock displays the wrong time

The clock is off by a couple of hours every time you reboot. This is because each time you adjust the time, Mac OS X does not change the system clock. If you use Bootcamp, Windows does change the system clock. To get the time correctly on your Mac, you need to try a couple of time zones until you find the one that fits your system clock. Perhaps you could also trick Mac OS X by changing the time in Windows to get the wanted system time so that when it is interpreted by Mac OS X it is not off.

Show the desktop

Want to minimize all windows in order to see the desktop? Simply enable Exposé (System preferences).

Windows remote desktop applications

You can try this open source software: CoRD: Simple RDP Remote Desktop.

Project software

Something that could replace Microsoft Project on Mac OS X: GantProject. It is free and OpenSource.

HTML Editor

An HTML editor for Mac OS X: Nvu. It is free.

Disk space usage

Want to know which files take the most space on your disk or directory? Want to know which files or folders take the most space on your disk? Something like WinDirStat? Use Disk Inventory X, JDiskReport or GrandPerspective.

Clean mighty mouse scroll ball

Your mighty mouse is scrolling in only one direction? There are a few things to try. First, holding the mouse upside down and rolling the scroll ball. Second, pushing hard on the scroll ball while rolling it in every directions. Third, blowing compressed air in the mouse (possibly while trying the first two approaches or in alternance).

Createl a virtual machine from your PC

While VMWare is runing on the target machine, go to the file menu and you will see an option to migrate your PC.

Subversion

There are several ways to use subversion on MacOSX. SCPlugin provides both a user interface in Finder and svn at the command line. Through Fink, it is also possible to install svn for command line use. SvnX also provides a user interface for working with subversion.

French Canadian Keyboard (not CSA, Clavier Canadien Français)

To get the kind of french canadian keyboard that you can get on Windows (accent, then letter), go to this link: http://mac.i-manu.com/french-canadian-keyboard-layout-clavier-canadien-francais/macosx_keyboard_cf/

Unix tools

MacPorts is a nice tool to install Linux/Unix applications. You need to work at the command line. Launch "sudo port" (needs to run with admin privileges). If your account does not have admin privileges, first run "su <admin account name>".

Frequently used commands:

search <tool you are looking for>

install <found package>

selfupdate (this updates your database of packages and versions)

upgrade outdated (this upgrades packages for which a new version is available)

Fink and its UI FinkCommander also allow to install several Linux applications. First install Fink. Then install FinkCommander (nice User interface). May have to change preferences of FinkCommander to use a specific version of Perl (FinkCommander:Preferences:Path:Path to Perl by entering the value /usr/bin/perl5.8.9).

Windows Media Files

To play wmv files, use Windows Media Components for QuickTime or VLC

Text editor (C++, LaTeX, Python, Java, Text, etc.)

Emacs is quite nice, and on MacOSX you can use Aquamacs. Aquamacs can also do spell checking with cocoAspell. It is also possible to download dictionnaries from OpenOffice: http://wiki.services.openoffice.org/wiki/Dictionaries

File compare tool

FileMerge: It comes with XCode, look into /Applications/Xcode.app/Contents/Applications/FileMerge.app. Meld and DiffMerge are available on MacOSX and pretty much do all of what Winmerge does on MS Windows.

Launch an application in a Terminal (Command line)

There are a couple of ways to launch an application in a terminal (command line). Let's say you want to launch Safari:

    • open /Applications/Safari.app

    • /Applications/Safari.app/Contents/MacOS/Safari

When an application needs to be launched with admin privileges, simply add sudo in front of the command.

To recreate a wifi connection

Typically, MacOSX is very good at handling wifi connections. But when a change is made to a certificate, it is sometimes required to remove the network from the know networks and start from scratch. Go to System Preferences, Network, Unlock if needed (the lock icon at the bottom left). Click Advanced..., select the AirPort tab, in the list of Preferred Networks, select the network you want to get rid of and click the "-" sign. Then, you might have to do some aditionnal steps to remove the credentials and certificates associated with the network. Go to the 802.1X tab, select the saved items and again use the "-" sign to remove it.

Airport reported as inactive

To activate airport, go to System Preferences, Network, select AirPort on the list of services on the left, click on the gears icon at the bottom of the list, select Make Service Active.

Default application (Open with)

Ever launched the wrong application, Adobe Reader instead of Preview or worst VMWare, when trying to open a specific file type? It is easy to change the default application. Select a file of this specific type in Finder; Menu File, Get Info, look for the "Open with:" section, select the desired application, click the Change All... button.

7-Zip

Extract with full path:

7z x <file>.7z

Read and Write NTFS volumes

Use NTSF 3G.

Modify the default shell options

Edit the .profile file in your home directory and add commands such as:

export EDITOR=emacs

alias l="ls -la"

export PATH=${PATH}:~/bin

Boot loader

rEFIt is a nice boot loader that allows to boot several OS. To change the delay before the default OS loads, edit the /efi/refit/refit.conf file and look for the "timeout" entry where it is possible to specify the number of seconds before the OS is loaded. It might be necessary to run /efi/refit/enable_always.sh command to enable the new options.

PDF printer

If you need to print to a PDF printer, use CUPS-PDF. Various settings for the output file can be adjusted through the /etc/cups/cups-pdf.conf file.

Starting with MacOSX 10.11 (El Capitan), CUPS-PDF no longer works. An alternative is PDFWriter. When installing the printer, for the "Use:" field, you need to manually enter "/Library/Printers/Lisanet/PDFwriter/pdfwriter.ppd" by selecting "Other...".

Per application language setting

Ever wanted or needed to have different applications open up in different languages? Manually switching languages over and over again in the Preferences, Language & Text, Language is getting you nuts? Well, locate the app that you want to change in ~/Library/Preferences/, it should look something like com.adobe.Acrobat.Pro.plist. Then in a terminal, enter this:

defaults write com.adobe.Acrobat.Pro AppleLanguages '("fr")'

The language could be something like de, en, en-US, fr, fr-FR, etc.

Finder Open With menu

The Finder Open With menu can become populated with duplicate and erroneous entries. To clean it up, Launch Services needs to clean up its database. Run this command:

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

After that, you either need to logout and login again or kill Finder so that it updates itself with the new database. To avoid logging out, enter:

killall Finder

How to disable browser Apple magic mouse swipe left / right gesture?

Ever found it annoying that while filling a form in Chrome or other browser you end up touching your mouse and reverting to the previous page? Well, this MacOSX swipe feature of the magic mouse can be disabled. First, open a Terminal and locate the app that you want to change in ~/Library/Preferences/, it should look something like com.google.Chrome.plist. Then, enter this:

defaults write com.google.Chrome AppleEnableSwipeNavigateWithScrolls -bool FALSE

The feature can also be enabled by changing FALSE for TRUE.

Slow time machine or slow disk access

Sometimes, Spotlight indexing stalls and can slow down time machine backups to extremely slow backup rate (extremely long backup time). To solve the time machine issue, disable Spotlight indexing by adding your disk(s) in the privacy section. This prevents Spotlight from indexing these disks. When your time machine backup is finished, try re-enabling indexing on your disk(s).

Securely delete files on a USB disk

Command line:

rm -P <file to delete>

Running an app downloaded from the internet on a USB disk

If you download an app and install in on a USB disk instead of the Applications folder, when you run it, you will get a message that looks like "is damaged and can't be opened you should move it to the trash". This is related to the fact that MacOS marked the file with special attributes (flags for file downloaded from the internet). To remove these flags, use a superuser account and run:

sudo xattr -cr <the .app file you installed on your USB disk>

Encrypt files

Using ports, install gpg2. Then at the command line:

gpg2 -c <file to encrypt>

You will then be prompted for the password.