Mac OS X – how to update /etc/hosts

Way back in the good old days of Linux and Windows it was much easier to update my hosts file. There it was, /etc/hosts or C:\windows\hosts, edit, save and the change becomes active.

MacOS X is a little more complicated. Once you update /etc/hosts you’ll have to update the Netinfo Database. That’s why I’m blogging this so I’ll remember it. This page documents the steps required but the important command is this one:

sudo niload -v -m hosts . < /etc/hosts

There is a GUI but it’s a little clunky and duplicating an existing entry isn’t the most elegant method of adding a new one. Especially when a warning dialog pops up!

Thanks Barry for suggesting a similar fix while I was in SF and getting used to my new laptop! 🙂

Apple Linux Open-Source

More Linux eye candy: CGWD Themes

If you’ve seen my desktop machine at home you’ll realise I’m a big fan of the Xgl and compiz stuff and now thanks to a Linux Journal article I’ve discovered the CGWD Themer.

Installing it in Ubuntu is as easy as adding a new site to your apt-get repository list and firing up apt-get in the usual way and grabbing the binaries from their repository. Then either launch it from the command line using the command “gcompizthemer” or go to System->Preferences where a new menu item called “CGWD Themer” can be found. The themer does nice things to the borders of and bars of your windows. I love the glow of the min/max/close buttons that spills over the side of the window!
Oh, and just because I bought a Mac laptop doesn’t mean I’m abandoning Linux. I fell in love with my Gnome+Xgl desktop once again when I came home from San Francisco!

Later – two articles features on digg and delicious which might be of interest:

  1. An Overview of modern fancy Unix desktops – good summary of the competing technologies that make the 3d and special visual effects possible
  2. The Linux Desktop Myth – a long essay on one man’s experience with switching to Linux and GPLed software.
  3. Suse Compiz page – has lots more info and lists all the options and configurable bits! (via)

The Pigs, they are a flying

The impossible has happened. When you're outside over the next few days watch the skies. If you looks carefully you may see pigs flying through the air! Why? My Apple MacBook arrived yesterday and I'm playing with it now. After some initial problems with my Linksys WRT54G wireless router I got the laptop online using the neat "network setup assistant". Soon Firefox and Thunderbird were downloaded and now I'm trying to figure out how to migrate my email from Linux to the Mac Thunderbird. Hopefully it's as easy as copying over the data folder.

Despite myself, I am impressed. It's going with me to San Francisco so I'm going to have a busy few days installing Apache, PHP, MySQL, Subversion and whatever else I can find to amuse myself on a long trip!

Now, where are all those Unix tools hidden?

Update – writing in Mac Flock, ripping a DVD with Mac Ripper, iTerm, VLC, Samba on my Linux box allows me to browse my mp3, movie and photo collections, from the living room! Bottom of the machine is very warm. No need for central heating this winter!

iPhoto likes to do it's own thing with my photos. Not sure if I'm comfortable with that but I'll give it a go. I knew the DOOM Collector's Edition I bought a few years ago would come in handy! PrBoom works a treat, but avoid the 2.4.3 release. The "Launch" button is greyed out no matter what WAD file you throw at it. 2.4.2 works fine though.

XAMPP for Mac OS X is downloading now. Like the well known version of Windows, this is an installer bundled with Apache, PHP, MySQL and PHP. Along with Vim and Subversion I should have a complete dev environment for the long wait in the airport tomorrow! Later – I spoke too soon, XAMPP doesn't work on Intel Macs yet. I'm going to give MAMP a go now.

Later still! Lots of tips for new users switching from Windows to Mac on this page. Podz saw it on the top posts list! I still don't know how to switch between Flock windows. ALT-TAB switches between applications only. Anyone know how?

Apple Linux

Squeakland – computing for kids

Niall, who should know, says Squeakland is “incredible”. I haven’t tried it myself, but it’s described as “media authoring tool” and is available for Windows, Mac OS, Linux and Unix! Check the “What is Squek?” page for more.

30 years ago this was a fantasy about how children would learn science and math some day on their own notebook personal “Dynabooks”. After many years of building and testing these ideas, today this scenario is real.

Apple Movies

The PC and the Mac – a love story

Here’s a cute animation. The love story of an office PC and a Mac!