Activate “Open folder in Terminal” for Finder in Mac OS X

From Linux distributions I was used to have a context menu entry within file browsers which opened a terminal at the current folder. In standard configuration Mac OS X’s Finder does not provide this functionality. However, the service exists and it just has to be activated.

In order to activate this service open the following screen in System Preferences:

System Preferences > Keyboard > Shortcuts > Services

Two options can be activated:

  • New Terminal at Folder
  • New Terminal Tab at Folder

Afterwards the service is available within folder context menus.

"Open terminal at folder" option
“Open terminal at folder” option

Deactivating automatic updates in Mac OS X 10.9.4

Recently I had some problems staying under my monthly mobile bandwidth cap. One reason being an increased travel and tethering time. Although working on an up to date system is preferable most of the time, I started to turn off automatic updates on my Mac while working using my mobile connection.

The automatic update settings can be found under System Preferences -> App Store.

App Store Settings
App Store Settings

When traveling you can uncheck all but the “Automatically check for updates” check box. That way you get notified if new updates are available and can set yourself a reminder to update your system when a landline connection is available.

Automatic update settings
Automatic update settings

Working with XMind and iThoughts using Google Drive as file share

In my daily work I like to create mind maps for many tasks, such as meeting minutes or brainstorming before starting a new task. For my mind maps I use XMind on my Mac and iThoughts on my iPad. Of course there is the requirement to share mind maps between my devices. Therefore, I had a look into both products in order to find a way to work with my mind maps on both devices.

In general, I use Google Drive as my cloud provider and did not want to install additional software on my Mac. Unfortunately, iThoughts does not support Google Drive syncing at the moment. However, you can send your mind maps to other apps and the Google Drive App is one of those you can choose. After trying around a little bit I developed a small workflow that seems to work and I am going to describe it in this blog post.

The following steps will be executed in the workflow description:

  1. Create a mind map in iThoughts on the iPad
  2. Upload mind map to Google Drive
  3. Open mind map from Google Drive Folder using XMind
  4. Edit mind map in XMind
  5. Save mind map to Google Drive
  6. Open edited mind map in iThoughts

Workflow by example

First of all create a new mind map in iThoughts:

Edit mind map
Edit mind map

Afterwards it has to be sent to Google Drive App in order to upload it to the shared drive:

Send to App
Send to App

The native format for XMind is .xmind, so this file type and Open in Google Drive have to be selected:

Send to Google Drive
Send to Google Drive

Afterwards Google Drive App should open and ask for permission to upload the file. As soon as permissions are provided the upload should start:

Uploading file
Uploading file

After the upload is finished the mind map should be stored in Google Drive folder and it can be opened using XMind:

Mind map opened in XMind
Mind map opened in XMind

Now it is time to make some more changes in XMind:

Edited mind Map
Edited mind map

Afterwards the mind map has to be saved to Google Drive again. If Google Drive Mac App and its Google Drive Folder are used the mind map just has to be saved in XMind and it gets uploaded. Another possibility would be to upload the new version using the Google Drive website.

Next step is to open the mind map in iThoughts, therefore the iPad Google Drive App has to be opened, the file selected and send to iThoughts:

Open file in iThoughts
Open file in iThoughts

Here a problem within the workflow was encountered. If the mind map is sent to iThoughts and its name includes spaces they get removed. In the case described the mind map was called “Google Drive Test Map.xmind” but it ended up in iThoughts as “GoogleDriveTestMap”. Therefore, it is a good idea to choose names without spaces.

Finally, the edited mind map can be opened in iThoughts again and it displays the changes made in XMind:

Edited mind map in iThoughts
Edited mind map in iThoughts

Google Drive application and symbolic links

The Google Drive application can be used to sync files stored on your Google Drive with your local file system. When installing the Mac application a folder named “Google Drive” is created and automatically synchronised with your Google Drive in the cloud.

Most likely you do not want to store all data you want to synchronise with your Google Drive within that exact folder in your local file system. Furthermore, you do not want to start storing different file versions in two different locations on your local file system, one in your Google Drive folder and one at the “proper” location according to your file system layout. The first idea when using Unix/Linux file systems would be to store your data where you actually want it to be and create a symbolic link within the Google Drive folder. That way you can work in your file system structure and still have the same version synchronised with your Google Drive. For this you would use the following command:

~> ln -s ~/foo/bar/file ~/Google\ Drive/foo/bar/file

Unfortunately, the Google Drive application is implemented such that it ignores symbolic links. So your data will never be synchronised with your Google Drive using this approach.

Nevertheless, it works the other way around. So if you want to store a file on your Google Drive you should just change your point of view a little bit. In general this means you do not want to store a local file into your Google Drive, you want to store and use a file on your Google Drive locally.

First of all, create the file or folder you want to store on your Google Drive within your Google Drive folder. On my Mac it is located at ~/Google\ Drive. Secondly, just create a symbolic link in you local file system at the appropriate location which references the file/folder within the Google Drive folder:

~> ln -s ~/Google\ Drive/foo/bar/file ~/foo/bar/file

Now changes can be made to the file ~/foo/bar/file and they are directly synchronised with the file stored on your Google Drive.

Max OS X: Create ISO file of directory

A couple of days ago I had to get some files over to a VirtualBox Ubuntu server guest system. I decided to achieve this by mounting an ISO file using the guest’s virtual DVD drive.

Having a strong Linux background, I was happy to find a neat command line solution in order to create an ISO of the directory 😉

hdiutil makehybrid -o ~/path/to/destination.iso ~/path/to/source/folder -iso -joliet

Within this command, replace /path/to/destination and /path/to/source/folder with the source respectively destination path. The last two parameters specify the ISO file system. Of course all available options can be found in the command’s man page 😉

Some Mac OS X shortcuts

Recently I switched most of my IT to Apple products. I was kind of confused when I wanted to start my first programming session on my new MacBook Pro and recognized that some keys like curly brackets or the backslash seemed to be missing on the keyboard layout. I started to test some key combinations and searched on the internet for the proper shortcuts. Here is a list of combinations which at least some people, namely developers, might need at some point:

Alt + Shift + 7: \
Alt + n: ~
Alt + 5: [
Alt + 6: ]
Alt + 7: |
Alt + 8: {
Alt + 9: }

Personally I think the next one is important, as it prints the Apple logo as character (though I doubt that fonts outside the Apple universe have this character 😉 ). Really this is a character everyone needs in daily life…:

Alt + Shift + +

During my search I also found an Apple page which explains many shortcuts:

OS X keyboard shortcuts

I think everyone should find some interesting shortcuts on this page.