Results tagged “mac” from KPAO

My main productivity tool is a MacBook, but I develop and deploy software for Linux (64-bit Ubuntu GNU/Linux to be exact). With the release of the free and open source VirtualBox 1.2, I can now run a 64-bit guest OS on my Mac, so I now have everything needed to develop 64-bit Linux applications comfortably on my Mac. In my situation, I want to use Mac OS X as the host of my development environment. My source code lives on my Mac volume -- local Mac OS X tools work well with it. TextMate works, svn, and Time Machine for backup, and so on. For much of what I do, that suffices. But our deployment platform is 64-bit Ubuntu Linux. I want to do some compiling, debugging, unit testing, etc. under an environment that is as close to production as possible.

To get everything setup, I installed the "minimal virtual machine" from the Ubuntu 8.10 server CD image into an new VirtualBox VM. Once booted, be sure to instal ssh (it's not installed by default on the VM image).

By default this OS sits behind a NAT -- it can see the network, but the "outside net", including the host mac, can't connect to internal service. To fix that, from the Mac OS X terminal do this:

$ VBoxManage setextradata "Ubuntu64" \
  "VBoxInternal/Devices/e1000/0/LUN#0/Config/guestssh/Protocol" TCP
$ VBoxManage setextradata "Ubuntu64" \
  "VBoxInternal/Devices/e1000/0/LUN#0/Config/guestssh/HostPort" 2222
$ VBoxManage setextradata "Ubuntu64" \
  "VBoxInternal/Devices/e1000/0/LUN#0/Config/guestssh/GuestPort" 22

This forwards the mac's localhost interface, port 2222 to the VM's SSH service. This assumes you called your VM "Ubuntu64" and that it's configured to use the "e1000" network interface, which is the default. Also, let's assume that the Mac OS X user is called "macuser"; Linux user is "linuxuser".

Check you settings with:

$ VBoxManage getextradata "Ubuntu64" enumerate

Now restart the VM instance, and then ssh into the VM.

$ ssh -p 2222 linuxuser@localhost

(I put this in a Mac OS-side shell script, and also add a variety of port-forwarding commands to connect to Linux hosted services -- that's left as an exercise for the reader).

From my Linux VM (accessed from the ssh session in the Mac Terminal) I mount my work environment with sshsf. First install sshfs, and add the user to the fuse group. For my needs, I also want the linux "root" user to access the sshfs-mounted file system. SSH needs to be enabled on the Mac OS side for this to work. To do this, turn on "Remote Login" under the "Sharing" panel in the Mac OX X System Preferences application. Then ssh into the linux VM:

$ ssh -p 2222 linuxuser@localhost

(enter your password, and now you're in the Linux VM)

$ sudo apt-get install sshfs
$ sudo addgroup linuxuser fuse

Log out and log back in at this point to enable the group membership. Then edit /etc/fuse.conf and uncomment "user_allow_other".

Now we map the Mac OS "work" directory into Linux. From Linux:

$ sshfs macuser@10.0.2.2:/Users/macuser/work /home/linuxuser/work -o uid=1000 -o gid=1000 -o allow_root

this assumes that "linuxuser" has UID/GID's of 1000, which is typical for the first user on Ubuntu. Note also that "10.0.2.2" is the address of the Mac OS interface on the other side of the VM's NAT. I put this in a Linux-side shell script, and run it automatically on login.

From this point, changes to "~/work" on either side effect the same files. Editing on the Mac in TextMate is speedy, and "make" on Linux works as expected and produces amd64 binaries.

Answers to questions:
  • Q: Why not just have the source files live in the Linux VM, and then mount them into the Mac OS file system via NFS, SMB, SSHFS or something? A: I used to do this, but I want my files to live in Mac OS -- that's where I generally "live", and all of my tools like TextMate, TimeMachine, etc. run there. Also, I'm more leery about having my important files live inside a virtual disk.
  • Q: Why not use svn, git, or rsync, etc. to push changes between environments? A: That can work, but then changes have to be explicitly checked in or at least pushed / pulled between environments. I don't want to track this (or bother other with my check-ins). I also want to be able to edit the same files under either os (e.g. a quick vi under Linux), and not have to think about what changed where.

MacBook better than MacBook Pro

|
macbook-white.jpgI just switched over from my MacBook Pro work computer to a new MacBook I personally bought to replace it. It's the older model in white, which I got brand new from Best Buy for the low price of $850. (Thanks DealMac!) And after using it for a few hours, I'm convinced this is the better of the two computers.

I really like the look and feel of the white plastic better than the metal and plastic on the Pro. After a year's worth of wear and tear, the Pro is starting to come apart at the seams. The latch to close and open the computer isn't working as well as it used to. Plus the keyboard and the trackpad on the MacBook feel so much nicer.

It does have a smaller screen, but I can deal with that. I'll hook it up to an external monitor when I need more real estate. The built-in one works fine for basic web and communications tasks.

And the other thing that's better about the MacBook: the design for upgradability. I recently went through this horrendous process to upgrade the hard drive in my Pro. I had to remove 23 screws some philips, some torx. (Why not choose one and use it everywhere, Apple?) I also had to remove the battery, a faceplace, RAM, keyboard, and a stablizing bracket before finally getting to the hard drive itself. nd even then, I had to carefully unplug the data connector and sliding the hard drive out sideways being careful not to damage the fragile data ribbon spanning the top of the hard drive.

Contrast this with the steps to remove a MacBook hard drive: remove the battery, remove 3 screws and a faceplate, pull the tab on the hard drive.

It feels like Apple had their A team on the low-end model, and their B team on the higher-end one. I wonder if that's still the case with the new line of laptops they just released? At any rate, I love my new MacBook, and actually prefer the styling to that of the new one.

If you want to get one, Amazon has them for $944.
Bill Gates used to have a corporate vision: "information at your fingertips".  With LaunchBar that future is here.  This is far and away my A-number-1 mac productivity tip and I've passed it along to the many PC migrants who have asked me for Mac advice.

With LaunchBar, here is what I can do from anywhere, at any time:
  • Open an app, document or a project folder: cmd-space, then type a few of letters of the item to open, then press return
  • You can navigate up and down the folder hierarchy.  For example: type in an abbreviation to get to a project folder, then use the arrow keys to get to a particular document within the folder.
  • Open a recently used app: "cmd-space ps space" reveals, for example, a list of recently opened Photoshop files.  Arrow down and pick one to open it.

You can directly access the Mac Address Book and Mail:
  • Look up David Cortright in the address book: "cmd-space cortr return"
  • Start a new email to David Creemer: "cmd-space creem shift-return"
Accessing websites is fast:
  • Get to any browser bookmark*: "cmd-space nyt" to get to nytimes.com.
  • Open a URL : "cmd-space cmd-l productvision.org"  There is no need to have a browser open or frontmost.
Launchbar has search templates, so you can get straight to the search results.  Here are some searches do all the time:
  • Look up something in Google: "cmd-space g product vision"
  • Look up something in Wikipedia: "cmd-space w bill maher"
  • Look up an address in Google Maps: "cmd-space gm 123 Sesame 32177"
  • Look up a store in Google Maps: "cmd-space gm pizza 94114"
  • Search for a product in Amazon: "cmd-space am nikon d90"
  • Look up a movie in Rotten Tomatoes: "cmd-space rt religulous"
  • Look up a movie in Netflix: "cmd-space nfs the closer"
  • Look up something in Yahoo Answers: "cmd-space ya remove bubble gum"
You can do this from anywhere, at any time.  You don't have to switch apps and you don't have to take your fingers off the keyboard. 

Recently, in The Mother of All Search Functions David Pogue wrote about how you can use Google's I'm Feeling Lucky to find things so much quicker.  That is great, except you have to find your way to the Google home page, which can take a few steps.  With LaunchBar you can kick it up a notch and find things through I Feel Lucky anywhere, anytime.  To use Pogue's examples:
  • Get straight to a product page in Amazon:  "cmd-space gl amazon freakonomics"
  • Find something on ebay: "cmd-space gl ebay delft figurine"
  • Look up a word in the dictionary Define.com: "cmd-space gl define ersatz"
  • Look up someone in Facebook: "cmd-space gl facebook amy pomeroy"
Using I Feel Lucky in conjunction with LaunchBar bypasses the search results page and takes you straight to the destination page.  This is a good choice if you have a reasonable belief that a definitive page should exist out there.

There are other solutions that do bits and pieces of what LaunchBar does.

FireFox 3 has its awesome bar, which lets you do some of LaunchBar's tricks within the URL line.  It's a big step forward, but still not in the same league as LaunchBar.  But it's not smart about the abbreviations, and you must first be in Firefox, in the address bar.  Having LaunchBar globally accessible saves you these little steps a hundred times a day.

MacOS has Spotlight to launch docs, which was apparently inspired in part by LaunchBar.  But it doesn't learn your shortcuts and it's only for finding stuff on your hard drive.

There are other tools on the Mac, some free (Butler and Quicksilver).  I have tried them extensively, and they are not bad.  But when you are shooting for maximum productivity, I have found that it's not worth scrimping.  LaunchBar is the professional's tool.

A key feature that distinguishes LaunchBar from the competition is that you don't have to explicitly pre-program the shortcuts.  Just use what feels natural and automatic.  To get to nytimes.com, just type any reasonable subset from the string... nyt, ny, times, pick the correct match from the disambiguation menu.  It'll quickly learn to associate the destination with the shortcuts you typically use.  You train it just by using it, not by going into a configuration UI. 

And you don't have to be consistent.  Use "nyti" one day and "ny" the next.  It'll learn your habits after a couple of tries.  This means you don't have to memorize shortcuts you haven't used in a while.

If you use a Mac as your main productivity computer, you really owe it to yourself to get a hold of LaunchBar.   Opening and finding things does not get much faster.  It's Information at your fingertips.

(*Caveat: Firefox 3's new bookmarking system is not yet supported in LaunchBar, but will be in an upcoming version.  In the meantime there is a good workaround.)

55 GB is not enough

|
startup-disk-almost-full.pngWhen did it come to this? My Mac told me this morning that I was almost out of disk space. Entourage quit, telling me to not bother opening it until more space is available. This is just crazy. Since when is 55GB not enough?

I don't even have movies or much music on this computer, since it's my work laptop. Adobe CS3 takes a lot no doubt, and I found a ton of cruft in the Developer directory that I will never use. (I kept XCode, though. It's a really amazing text editor for code, and it's free!)

The sad thing is after all of my work, I still have just under 3 GB free. I guess I'll have to shuttle more stuff over to my Windows partition. And it might come down to a repartition. Or maybe I should just upgrade my computer...

BusySync: Awesome

|
A couple of months ago I bought two licenses of BusySync from BusyMac. This product works BusySync.pngperfectly and invisibly -- which is just how it should. It makes me happy. Let me explain a bit -- My wife and I each have a Mac at home, and each have our own busy schedules. There are many appointments that we need to share (especially related to the kids). We each use Mac OS X iSync to synchronize our calendars to our phones (both Nokia S60). At work, I use Linux.

For $40 (two licenses), BusySync lets me share parts of my calendar with my wife and vice-versa. She can see parts of my calendar and I can see hers. Some parts are shared read-only, some read-write. In addition, my calendar is automatically synchronized to and from my Google Calendar. Every few days I use iSync at home to make sure my phone calendar is up to date.

All this multi-directional read/write synchronization may sounds complex, but setting it up was actually easier and took less time than writing this description -- it just works. The end result is that I now have complete read/write access to my calendar on my phone, home mac, and at work (via Google Calendar). In addition my wife and I can keep tabs on each other (heh) and add appointments that are instantly shared.

(Note: I have not yet tried the Evolution plugin for Google Calendar. If this works, then I might be able to have synchronized on/offline access to my calendar via a nice application on my Linux EeePC).


So I've made the switch back to Mac OS from Windows. When I started my new job six months ago, I had this day already in mind, which is why I got a MacBook Pro as my laptop and have been running Windows under Boot Camp until now. The thing that drove me to switch now was the inevitable decay of performance and stability of the Windows OS finally reached a breaking point.

All new computers start off with great performance. Just the core stuff installed. No wear and tear from use yet. But then you start to use it. You install software. You upgrade. The OS auto-updates itself, and so do some of your applications. You try out some things, uninstall them. Or maybe you don't; you just don't use them anymore. Then weird stuff starts to happen. Some apps don't work right. You have to reinstall them. Sometimes they lock up or crash. Eventually the machine itself won't shut down properly, or locks up or crashes. And there's nothing you can do but wipe the hard drive and start over with a fresh install of the OS.

Windows had gotten there for me. Booting up literally took 10 minutes before the system was responsive enough for me to use. Outlook refused to start up or shut down properly. I got errors on launch, and had to force quit every time. Yahoo! Desktop Search would freeze the machine on shut down every time; I had to force quit. About half the time I'd just end up forcing the machine to power off by holding down the power switch for 5 seconds. I spent far too long having Windows diagnostics check my disk for damage on boot.

Some days I would get home from the office, pull my laptop out of the case and the fan would be spinning like a centrifuge and the case was as hot as molten lava. Yes, the laptop had failed to go to sleep. Again. Despite the top being closed and the heat sink in the keyboard reflected back to the circuitry by the screen. And every now and then, the power manager would take over the computer, using 100% of the CPU. the only way out was to remove the battery and operate on AC power only. To reset things, I'd have to boot into Mac OS, and then back to Windows. There's another 15 minutes of my life I'll never get back.

I suspect I'll have issues with Mac OS too. Things are great so far. But of course they are; it's a fresh OS install. I've just started to put my favorite software on it. QuickSilver. OmniGraffle. Firefox 3 beta. Parallels Desktop (to run that piece of crap Windows in the background). I give it a few months before the first problems surface. Then maybe another few before they get really annoying.  Six months seems to be the half-life of a Windows install. Mac OS might take a bit longer, but I've no doubt it will succumb too. And that's when I'll become a luddite. Or maybe I'll just upgrade to a new laptop.

Until then, I'm enjoying it. I shut the lid, and the computer's asleep. I open the lid, and it's ready to go and even already connected to the wireless network after I sign in! It auto-detects my second display, and even rotates it to portrait mode without a separate driver. And it recognizes all my USB devices, even after several dockings and un-dockings. It's the little things. :-)

The End of the Age of Windows (?)

|
I took a quick look at the Amazon.com bestseller list for the computers category (as of today). Of the top 25, one is a warantee, so I'll ignore that for a moment. Six items are Macs -- including the top selling MacBook, two are Asus Eee PC's and two others are Nokia Internet Tablets. That's 10 of 24 (or a bit more than 40%) that do not run any flavor of Microsoft Windows. It's not quite half, but I think it's sufficient to officially declare that we are at the end of The Windows Age.


Beautiful BSOD

|
The Mac is so much better than Windows.  Look at this gorgeous Windows XP blue screen of death.   The deep, rich blue, the graduated drop shadow.  Truly a thing of beauty.  
blue-screen-of-death.gif
My only suggestion to Microsoft would be to increase the left margin a bit.  The text is a bit cramped there and some added bluespace would make the layout breathe a bit more.  (Maybe they've fixed this issue in Vista.)

Tags