Occasionally updated personal site and blog

Monthly Archives: August 2011

Windows switcher’s guide to Mac OS X

One way to measure the return of the Mac: the rising number of friends who have either bought macs, or are toying with the idea of getting one, and are now pestering me with their switcher questions giving me an opportunity to talk about the mac way of doing things.

So here’s my short list of questions I had when switching from Windows to the mac a few years ago (not yet updated for Lion):

Q: Only one mouse button, no right click, seriously?
A: Mac OS X actually supports right clicks in lots of places, by bringing up a useful context menu in lots of places.So how do you make a right-click hapen? Either attach any non-Apple mouse – Mac OS X  will happily use the second mouse button of a plugged-in non-Apple mouse. Alternatively, to “right-click”, you can double-tap (i.e. tap with two fingers at the same time) a macbook trackpad, or hold down the Ctrl key while clicking, or click-and-hold the mouse button.

Q: Where’s the start menu?
A: There is no start menu.

Q: So how do I get to my applications?
Q: The dock has quick launch icons, and shows your running applications (the icons in the dock with a dot “light” under them). If you want to see all installed applications, they can be found in the Applications folder.

Q: How do I install applications?
A: Some few applications (usually the bigger ones like Office or Photoshop) have installers. For those, double-click the installer (which on the Mac is usually called setup.pkg), just like on Windows.
Most applications, though, are simply one big file called SomeApplication.app When installing from a CD, just copy the .app file to your application folder.
Internet downloads come packaged in a .dmg file disk image. Double-click the .dmg to mount the disk image, and drag the .app file inside to your applications folder.Then unmount and trash the .dmg file (the .dmg file is just a download container; launching the .app file straight from within the dmg disk image will not work).
When using Safari, some applications will hide the whole .dmg file process from you, by just dropping an .app file into your downloads folder.
You could theoretically keep the .app file anywhere, but it’s customary, and good practice, to keep them all in the Applications folder.

Q: Where is the uninstaller for an app? How do I delete applications?
A: There is no uninstaller. Simply put the .app file in the trash. Behind the scenes, the .app file is actually a folder that contains all contents of the application, so you can delete everything in one go by just trashing the .app file.

Q: Where’s the task manager? How do I kill a hanging application?
A: The shortcut to show hanging apps is Cmd + Alt + Esc. Alternatively, you can also click-and-hold the app icon in the dock – if it really is hanging, the menu entry “Quit” will change to “Force Quit”. For the unix aficionados, you can also do ps aux and kill -9 in the terminal.

Q: Where is the control panel?
A: It’s called “System preferences”, is launched just like a regular application, and can be found in the applications folder. Alternatively, the apple menu in the menu bar also has an entry to launch System preferences.

Q: How do I go to standby / hibernate?
A: Closing the lid will automatically put your macbook to sleep. There is no explicit hibernate – if you leave it in sleep long enough for the battery to drain, it will automatically go into hibernation.

Q: Where’s my command line?
A: It’s called “Terminal”, and is a regular application found in the applications folder. Many people also like iterm2 as a free, improved replacement for Terminal.

Q: No delete key on the keyboard, wtf?
A: The delete key works like backspace by default. Hold down Fn and press delete to have it delete the current, rather than the last, character. To delete files in the finder, press Cmd + Delete.

Q: I closed an application, and changed to another one, but keyboard shortcuts still activate the old application ?! What happend here?
A: An example of this situation: you close your Mail inbox window, now the Firefox window that was in the background is visible, but hitting Cmd+T brings up Mail’s formatting dialog, instead of a new firefox tab.
The explanation is that unlike Window, OS X does NOT quit an application when you close the last window; it will still be running (as you can see by the dot under it in the dock) and active (as you can see by the fact that its name still apears in the menu bar to the right of the apple icon).
To switch to a background applications, you have to actually click into the window of that application.
Of course, not all applications keep to that, and actually quit as soon as you close their window (usually badly ported windows applications. Or iphoto).

Q: So how do I quit applications? 
A: The quit command is always in the “application menu” (i.e. the menu entry in the menu bar that is labeled with the application’s name).Alternatively, press Cmd + Q, or right-click the dock icon, and choose quit from the pop-up menu.

Q: How do I resize a window?
A: Unlike on Windows, only the bottom-right edge of a window is draggable to resize it. No good reason, just the way it its. The advantage is that you can use all edges to drag, rather than resize, a window.

Q: Why does clicking the green window button not maximize my window?
A: The idea is that the green button will resize the window to the optimal necessary size. In practice, results will be pretty arbitrary, and seldom useful. Just drag the bottom-right corner to resize as needed. Unlike on windows, most apps are not necessarily or even customarily run maximized on the whole screen.

Q: How do I make a screenshot?
Press Alt+Shift+2 for a screenshot of the whole screen, Alt+Shift+3 for the active window, and Alt+Shift+4 for a selectable region. The screenshot will not be put in the clipboard, but land on your desktop as a file called “screenshot <date>.png”.

Q: How do I put apps into the  dock?
A: The easiest way is to start the application, and once it’s running, right-click and choose “Options/Keep in dock”. Alternatively, you can drag an application from the finder to the dock, and drop it there (only on part left of the divider close the the trash can, though – the right half only takes documents or folders)

Q: How do I remove an app from the dock?
A: Simply drag it off the dock, and drop it anywhere else to see it vanish in a puff of smoke.

Q: I want to open <some file type> with <some program> when double-clicking it in the finder!
A: Right-click a file of that type in the finder, choose “Get Info”. In the file properties window that will appear, click on “Open with”. Select a program, and click on “change for all”.

Q: Autostarts: How can I have a program automatically start when my mac is booted? Or keep it from starting automatically?
A: This one is really not intuitive at all: Autostarts are connected to your account, so look in System Preferences /Accounts/Login items.

Q: How to I burn a CD/DVD?
A: For data discs, insert a blank disc, and it will appear in the finder. Drop stuff on it and burn by clicking on the radioactive icon.For audio CDs, use iTunes: make a playlist and right-click on it, select burn to disk.For video DVDs, use iDVD.

Q: My <favorite windows program> does not run on a mac! What can I use instead?
A: A lot of things can be handled with applications that come with your mac:
Default browser: Safari (preinstalled)
Music player: iTunes (preinstalled)
Video player: Quicktime (preinstalled)
Pdf Viewer: Preview  (preinstalled)
DVD Player: DVD Player app (preinstalled)
Messenger/IM: iChat is preinstalled, or adium is a free download that supports all major IM protocols
Digital Photo viewer/editor/library: iphoto (preinstalled)
Email: Apple mail (preinstalled)
Image editor: nothing preinstalled, Acorn has a free trial, with basic functionality keeping working after the trial
Image viewer: QuickLook feature built into OS X:  in the finder, just hit space to view a selected file, go through the directory with cursor keys
File packer like winzip: built into the finder: to zip, right-click one or more selected files, and choose “add to zipfile”. To unzip, simply double-click in finder.

Q: What are some cool Mac-specific programs?
A: Some applications to check out:
Quicksilver (fast program launcher, and does a million things more, free)
iterm (better command line, free)
Transmit (well-respected client for S/FTP, S3 etc)
Textmate (THE programmer’s text editor for the mac), or TextWrangler (free, lite version of the classic BBedit)
Acorn (cheap, easy image editor) or Pixelmator (pretty good Photoshop clone)
Aperture (pro-level photo management, iphoto’s bigger brother)
OmniGraffle (useful like Visio, but neither ugly nor annoying)

Q: Tell me some cool Mac features i should check out!
A: For a start, how about:
Time Machine: automatic versioned backups, super-simple restores
Spotlight: full-disk file search that actually works
Expose: see all your open windows at once
Spaces: virtual desktops

Q: OS X Lion is out, when will you update this guide for Lion?
A: Hey, I just wrote this thing, soon as I get round to it, okthxby

Don’t like Google’s redesign? Greasemonkey to the rescue

So Google redesigned their search homepage, to include a black highlight bar for their other service offerings on top of the page.

I think it looks pretty good, but my girlfriend, who is a more visual person than I am, and has better aesthetic sense too, absolutely hated the fact that she was greeted by an imposing, dark bar on top of every new browser window.

What’s a good boyfriend to do? Never one to turn down an opportunity for geekery, I installed Greasemonkey on Firefox, and whippe up a little script to set a different color.

Here’s the script, if you want it:

// ==UserScript==
// @name           google in farbe statt schwarz
// @namespace      https://elmar.wordpress.com
// @include        google*
// @require       http://ajax.googleapis.com/ajax/libs/jquery/1.2.6/jquery.js
// ==/UserScript==

var lovelyPink = '#A167E4';
$("div #gbx4").css('background-color',lovelyPink);
$("div #gbx3").css('background-color',lovelyPink);

Eh, voila, here’s Google search in a lovely (?) pink:

Google search page with pink top bar

On a less playful note, this kind of thing is also useful to change color of admin interfaces depending on the server’s url. For example, when developing hybris-based online shops, I use a similar script to color the management console green on test servers, and red on production systems.

Couchsurfer’s guide to Munich

After living in Munich for a few years, I’ve collected quite a few favorite spots in Munich. And since I host couchsurfers pretty frequently, I’ve finally made the effort to put together a little booklet collecting some personal recommendations for things to eat, do and see in Munich. With, so far, quite the emphasis on “eat”…

Anyway, I’ve put it up on the “Stuff” page, or download it directly here.