All posts

TipsForLinuxSwitchers

Originally published on macresearch.org, around 2006. Reproduced from the author's archive; some links may no longer resolve.

A Few Tips for Linux Switchers

A new co-worker of mine recently asked me a few questions about interacting with his new Mac. He is a Linux user, and is having to adapt to the preference we have in my research group for Macs. This got me thinking: there must be quite a few scientists that have been brought up on Linux or Unix and have either been forced into using Mac OS X, or have chosen that path themselves. Apple has plenty of information for Windows switchers, but Linux switchers seem to be a bit neglected, so I thought I would offer a few tips that may help ease the transition, and challenge others to contribute their tips in the comments.

Navigating Windows

Most switchers figure out pretty quick that you can switch between applications using the Command-Tab key combination. This is different to other OSes, like Windows, which are not application centric like Mac OS X, but are document centric. However, many users don’t seem to realize that you can also easily switch between documents within a single application (eg Terminal windows) using the key combination Command-` (backtick). This can save you a lot of fiddling with the mouse.

Most Linux switchers mourn the absence of virtual desktops on Mac. Apple must have been listening, because they have decided to include this functionality in Leopard (link no longer available). But Mac users have long gone without virtual desktops, and have other ways to deal with the complexity of a multitude of open windows. Here are just a few.

Where virtual desktops solve the problem of windows hiding behind other windows by effectively increasing your working space, Expose addresses the same problem by dynamically resizing windows on a single desktop. It’s worth taking a little time to get used to the keyboard shortcuts (F9 for all windows; F10 for application windows; and F11 for Desktop), but also to configure some corners of your desktop to activate Expose. You can do this in the ‘Dashboard & Expose’ pane of System Preferences. This can be very useful when you are using the mouse: just flick your cursor into a corner, and Expose does the rest.

It should be noted that the application-centricity of Mac OS X partially compensates for a standard usage of virtual desktops. Many users configure a separate desktop for each application, because most OSes are document-centric, and don’t allow users to call a whole application to the front. Mac OS X is different: If you click a dock icon, all windows belonging to the application are called to the front, similar to if you had changed to another virtual desktop. The same happens when you Command-Tab through your apps. And if you don’t like the clutter of other apps in the background, just hide them all with Command-Alt-H.

As a switcher, it would be worth your while to give the Mac-way a reasonable chance, before returning to old patterns, but if you can’t, there are good packages available for virtual desktops, like

Launching Applications

A Linux user will often launch an app from the command line. You can do this on Mac OS X too (try open /Applications/Safari.app), but you are better offer using a launcher. Actually, you already have a simple launcher in the form of Spotlight. Just press Command-space to activate the Spotlight prompt, wait until the Safari app appears in the list, press the down arrow, return, and voila!

OK, so that isn’t the greatest user experience imaginable. A much better experience can be had by downloading the Quicksilver (link no longer available) application. It is much faster, and much more powerful. You can do just about anything via Quicksilver — it’s a bit like a GUI version of the command line.

Remote Login

Remote login is an important part of any Linux/Unix user’s arsenal, and Mac OS X provides SSH command line tools for this purpose. If you login to other machines a lot, it is nice to setup an SSH Agent so that you don’t have to keep typing your passwords in. The only problem is, usually an ssh-agent will only work for processes started in the shell in which the agent is running.

There are a few apps on the Mac that can help here, by running an agent for all user processes, and integrating with the keychain so that you don’t ever have to type your password/passphrase to login again. My favorite app in this category is appropriately named SSH Agent (link no longer available). If you do a lot of logging in and out, this comes highly recommended.

Terminals

If you do anything at all on the command-line, and 99% of Linux users do, you need a terminal application. Mac OS X ships with Terminal, which maybe more powerful than you think. For example, you can save Terminal settings in a .term file, so that you can quickly connect to a remote host with a nice color scheme directly from the Dock or File menu of the Terminal app. Just setup a window the way you like it, and choose Save from the File menu. Enter any command you want to execute at initiation, such as a remote login, and you are away. You can even save multiple windows in one file, so that all your remote sessions are started automatically when you open the .term file.

Editors

Every Linux user has a favorite text editor. Holy wars have been fought over vi and emacs, and both are available on Mac OS X, of course. But it is well worth taking a look at TextMate, which is a Mac text editor that integrates beautifully with Unix traditions. It supports all your favorite scripting languages, and is designed to allow users to easily extend its functionality. After using TextMate, you may conclude that neither vi nor emacs is truly divine.

Finding Software

When you first move to a new platform, it is sometimes difficult to know where to find software. One of the best places to locate applications for the Mac is VersionTracker (link no longer available). If you are looking for command-line tools or X-Windows applications, your best bets are package managers like Fink (link no longer available) and a href=”http://www.macports.org/”>MacPorts (formerly DarwinPorts).

Developer Tools

One difference between Mac OS X and Linux is that Mac OS X is primarily targeted at consumers, and doesn’t install developer tools like compilers standard. Luckily, you just need to install the developer tools separately from a Mac OS X Install CD, or sign up as an Online Developer at Apple (free) to download the latest tools./p>