Dedicated to my late brave, beautiful and silly mummy, Debra Ross. I love you mumster.

Skip navigation

Installing Alpine on Mac OS X

Build options available for Alpine in MacPorts
Build options available for Alpine in MacPorts

I’ve been asked by a few people on Twitter how I installed the lightweight Alpine console based email client on my Mac. Alpine of course is the current version of the pine email software that addressed some concerns about licencing. I love Alpine, and the logo reminds me of the classic Altavista :).

As with most free and open source software, by far the easiest way to get it running is just to install it from a package manager. You can go ahead and fetch the source tarball and do the usual ./configure, make, make install and make clean, but it does have several dependencies which in turn have several dependencies. You know what I mean.

MacPorts
For MacPorts, grab yourself the latest version and install just as you would any other Mac software that uses a setup assistant. Once you’re up and running it’s simply a matter of firing up your Terminal.app and entering in # port -v install alpine.

By entering # port variants alpine you can see all the custom options you can set. If you want to compile Alpine with one or more of these custom options, use the same install command above but append the options you want with plus signs. For example, if I wanted password files support I’d enter # port -v install alpine +passfile.

Fink
I haven’t used Fink myself much, but according to their online package manifest it is available.
NetBSD’s pkgsrc
If you use pkgsrc for Mac OS X/Darwin, Alpine can be found in the ./mail/alpine directory in your pkgsrc tree. Once you’re in the right directory, it’s the usual routine of # bmake install clean clean-depends. As with all pkgsrc packages on OS X, remember to use bmake NOT make otherwise it won’t work.

If you’re interested in trying the sophisticated and elegant pkgsrc system on your Mac, I wrote up a tutorial in a previous post you can use to get yourself up and running with it.

Happy emailing!

Preliminary results of NetBSD on a MacBook Pro

MaiHime NetBSD desktop background thingy

After the many troubles I encountered with running FreeBSD, Windows XP and Mac OS X Leopard in a triple boot configuration on my venerable Core Duo MacBook Pro (Brief flirtation with FreeBSD on my MacBook Pro is over) I thought while I had some time this afternoon I’d try using NetBSD instead.

The preliminary result? The experiment was a success! I have NetBSD 4.0.1 booting beautifully alongside Windows XP and Mac OS X Leopard without any of the problems FreeBSD 7.0 seemed to have, such as the persistent and downright bizarre several minute long stalling boot times for the system and for Xorg.

As I’ve said before, NetBSD was the first Unix-like system I really took seriously after only toying around with Red Hat Linux in the late 1990s. I moved all my non-Mac machines over to FreeBSD due to FreeBSD’s better graphics support and its generally higher levels of use which translates into more online documentation and such, but I’ve always had a soft spot for NetBSD.

I feel as though I’m reacquainting myself with an old friend, plus all my experimenting with pkgsrc on Mac OS X (Notes on using NetBSD’s pkgsrc on Mac OS X) means I already know the ins and out of package management on it too. Stay tuned for further developments.

My falling out with Microsoft actually explained

If you’ve read my blog posts with regards to Microsoft here over the last few years, you many be under the impression that I hate them and their products. While I’ve certainly been guilty of perhaps using harsher language when talking about them here and on my show than what the situation warranted, I don’t hate Microsoft, I rather think I’m just disappointed.

The early days

WOW this picture takes me back! I used to see this every day!
WOW this picture takes me back! I used to see this every day!

The fact is despite my current talk about FreeBSD, NetBSD, Slackware Linux and Mac OS X, I only really moved off Microsoft operating systems and software as late as 2003. Our first home computer had MS-DOS and Windows 3.0 with Multimedia Extensions, later Windows 3.1. We had all the Microsoft Home titles such as the beautiful Microsoft Scenes software, Explorapedia and Bookshelf; we had all the Entertainment Packs with such gems as SkiFree and Chip’s Challenge. We bemoaned Microsoft’s removal of Reversi from Windows 3.1 and it’s Minesweeper replacement. Over the years our machines adopted Windows 95 (with Plus!), then 98, then 98 Second Edition. We skipped the Windows Me trainwreck and went to 2000.

I learned how to program using QuickBasic and QPascal. My first attempt at graphical programming was using Visual Basic 5.0. I used the first versions of Microsoft’s .NET framework and learned Visual Basic.NET and C#, even though I went back to Visual C++ 6.0 afterwards without telling anyone ;-). I remember watching VBTV with Chris and Ari and loving it! The Head In The Box! Genius!!!

Suffice to say, the licences did cost us a small fortune to run all this stuff, but we were mostly happy with our machines running such software. I had got an iMac for Christmas back in 2000 but I was decidely underwhelmed by Mac OS 8. A few years previously I had given Red Hat Linux a try but was put off by the user interface; at that point I didn’t understand that the graphical X server was independent of the OS and that I could swap out GNOME with KDE or something else.

The "awakening"

My Windows XP desktop from around 2002
My Windows XP desktop from around 2002

I don’t know exactly when it really started, but I guess around 2002 my opinion of Microsoft software started to change. I got my beloved iBook with Mac OS X around this time. Wanting to relive the glory days of DOS (aka black screens with blinking cursors!) I opened a Terminal window and started learning shell scripting. I actually got quite good at csh before I realised nobody else used it! Later in high school I learned Python and did some Java swing programming because I secretly loved the purple metal interfaces they generated :).

During this time I also picked up my first copy of NetBSD. I didn’t know at the time what the differences were between the different BSDs, or even between Linux and BSD, but the NetBSD installer and documentation looked more friendly to me, plus I read that people on the whole thought the BSDs were more stable and better written than Linux. I installed NetBSD on my now old iMac and got it working. I learned about Xorg, about Unix-like operating system directory structures, about file permissions and so forth. I was using desktop environments but swapping out the default terminals with rxvt and so forth. So forth and so forth.

It was crazy, but within a few years of this starting, by 2004 I was almost exclusively a Mac OS X and NetBSD (later FreeBSD) guy. In 2004 I also got my first proper job writing perl scripts to automate sever admin tasks at a company in Singapore. It irritated me that I couldn’t open a Terminal on my Windows XP box and use it the way I could with BSD and OS X. It also bothered me by that stage that the documents I was saving in Microsoft Office were bloated and non-standards conforming.

At that point I also began to question Microsoft’s direction from a usability standpoint. I didn’t appreciate being treated like a criminal with product activation in Windows XP. The applications in the Microsoft Office suite were getting harder and more complicated to use, not the other way around. Their internet offerings were a joke. As someone looking from the outside of the Windows ecosystem looking in for the first time, I could see so many faults and I was dismayed at how far their previously excellent user interface standards had slipped.

The present


My Xfce desktop on FreeBSD 7.0-Release

Now we fast forward to the present. Windows Vista has been a mess (I know, I’ve had to fix and downgrade my fair share of them for people!), the "ribbon" in Office 2007 with its splattering of silly little icons can’t be turned off (text, why can’t we have text!?). My love of FreeBSD continues to blossom as I find new and exciting things I can do with it. Mac OS X and Apple computers are an absolute pleasure to use.

I’ve only touched on the issues of licensing as well as some of their dubious business practices, because as much as they have also affected my opinion of Microsoft to the general loathing I harbour for them now, what it all boils down to is a simple fact: Microsoft software isn’t nice to use anymore.

The Microsoft I grew up with in the early 90s has long gone, but what I want to know is, what happened? Had I started using Unix-like systems back in the early 90s would my opinion be different? I guess I may never know.


My current Leopard desktop taken a few minutes ago

My HiME NetBSD desktop background whatnot

As I said in my previous post about running NetBSD’s pkgsrc on Mac OS X, I hurriedly created a couple of desktop backgrounds for a fellow student and MacBook Pro user a few months ago who has since moved her entire machine over to NetBSD. It should have probably just stayed on my anime and show blog but I figure it’s tech enough to put here.

ASIDE: While I dabbled in Red Hat Linux 5.x at the time, NetBSD was the first Unix-like operating system I really used. I personally have since moved over to FreeBSD on my desktops, but NetBSD still holds a special place with me. And I am still an avid user of pkgsrc!

The orange flower is a photo I took from my wildflower photoset around Mawson Lakes here in Adelaide, Mai Tokiha is the protagonist from the My-HiME anime series which I have yet to watch but he thinks is trippy, and the logo is of course from the NetBSD Project. This was one of the only combinations of orange things I could find on such short notice; had her presentation been a few weeks later I could have probably created something a bit better!

The resolution is 1440×900, but if you’re a NetBSD desktop user, or a pkgsrc on Mac OS X (or Slackware, or Draco Linux, or…) user on a MacBook it would scale down just fine on 1280×800 too.


Colour version, 1.9MiB PNG


Achromatic version, 1.1MiB PNG

Notes on using NetBSD’s pkgsrc on Mac OS X

pkgsrc on Mac OS X
I’m a kid in a chocolate shop! Look at all this stuff!

While there is an abundance of above average quality applications for Mac OS X, many tend to be more expensive and less feature complete than similar free and open source applications available on Linux, FreeBSD and the like. On Mac OS X we have the fantastic and easy to use MacPorts and Fink package managers, but if you’re really serious about running said software you can’t beat pkgsrc.

The pkgsrc system is the mature, elegant, sophisticated (can you tell I like it yet?) and cross platform package manager developed and used by the folks over at the NetBSD project. It’s also used as the default package manager on DragonFly BSD and Draco GNU/Linux amongst others. I use it on my Macs, my Slackware Linux machine and even on a FreeBSD box, and I love it.

In this post I’ll be describing what I’ve found to be the quickest and simplest way to get it up and running on Mac OS X. There are hundreds of other ways, but I’ve never gone wrong with this.

Case sensitivity!

The only caveat with pkgsrc is that you really need to run it on a case sensitive file system which OS X does not use by default. If reformatting isn’t an option, might I suggest using Leopard’s new Disk Utility to shrink your current boot volume and creating a separate, case sensitive HFS+ volume.

ASIDE: Some of the NetBSD documentation describes creating virtual disk images and running pkgsrc from them if case sensitivity is an issue. While it is technically possible, I wouldn’t recommend it; from experience I’ve found them to be more trouble than they’re worth. If you’d like to give it a go though, the Darwin platform notes on the pkgsrc user guide details the procedure.

Installing pkgsrc

Firstly, open your Terminal, navigate to /usr/ (or your new case sensitive volume you created earlier) and download a pkgsrc snapshot. This may take a while.

% cd /usr/
% sudo env CVS_RSH=ssh cvs -d \
anoncvs@anoncvs.NetBSD.org:/cvsroot checkout pkgsrc

Next, launch the bootstrap procedure which will create the required directories and install the utilities to build the packages:

% cd pkgsrc/bootstrap && sudo ./bootstrap

Congratulations, you now have pkgsrc installed on your Mac! The next step is to modify your shell’s $PATH variable to point to the new binary directories, by default pkgsrc installs software in /usr/pkg. If you use the Tiger and Leopard default bash shell, your PATH line in your .profile should something like this:

export PATH=/usr/pkg/bin:/usr/pkg/sbin:$PATH

You’ll also want to add these lines to make it easier to update your pkgsrc tree:

export CVS_RSH=ssh
export CVSROOT=anoncvs@anoncvs.netbsd.org:/cvsroot


Very quick background I created for a fellow MBP user who started with pkgsrc on their Mac and since moved over entirely to NetBSD, will be the subject of a future post. Mai Tokiha was the only character we could really find who wears lots of orange :).

Using pkgsrc

From this point forward, using pkgsrc is basically the same as using it on any other platform, the only difference is you use the bmake tool instead of make to build packages. If you haven’t used pkgsrc before, below is a very quick crash course using Alpine as an example.

Browsing available packages
You can browse the /usr/pkgsrc/ directory, but the easiest way is to go to http://pkgsrc.se and either search for a specific piece of software, or browse the categories.
Building and installing a package
% cd /usr/pkgsrc/mail/alpine
% sudo bmake install clean clean-depends

Updating your pkgsrc tree
% cd /usr/pkgsrc
% sudo cvs update -dP

That’s enough to get your started; once you’ve got the hang of it dive into the comprehensive and easy to follow pkgsrc guide by Alistair Crooks, Hubert Feyrer and the pkgsrc developers to learn all the cool things you can do with this package manager. I need a Rubenerd Seal of Approval or something :-)

My kingdom for a bigger notebook hard drive

An ominous sign of things to come?
An ominous sign of things to come?

It’s crunch time: alas after months of neglect and with so many assignments and projects active and being worked on at any one time, my internal 149 gibibyte (aka 160 gigabyte) hard drive has finally been maxed out. Bummer!

Having used Windows, Linux, FreeBSD, NetBSD and Mac OS X on computers with drives that are nearing breaking point, I do appreciate how incredibly stable the BSDs and Mac are under capacity stress. By comparison the general wisdom with Windows (at least when I still exclusively used it before 2003) was that you must reserve at least 10% of your drive at all time to maintain stability, NTFS included. By comparison, this MacBook Pro has been close full for a while now and still only EyeTV and the slow as molasses Microsoft Office 2008 for Mac applications are capable of crashing it.

As I’ve discovered the hard way though, notebook computers present their own set of storage challenges! For most of my life I’ve been a desktop computer user; it was only in 2006 when I made the decision as a computer science student studying overseas that a souped up notebook computer would make more sense for taking around to different houses and around campus than a new desktop.

Of course the problem with said notebook computers is that you can’t just easily slide in an extra hard drive when your existing one starts to fill up! Sure you can buy external drives, but they still won’t match the performance of the internal drive. What happens then is I tend to backup material to the external drives, but projects I’m compiling, editing video for or otherwise working on end up staying on the internal drive.

VMware Fusion 2.0 beta 2 New Virtual Machine Assistant
What can I say, I love toying around and exploring operating systems!

This is also a problem for virtual machines which I spend lots of time using and writing about. To satisfy my own addiction and fanaticism for studying operating systems, as well as for my work which involves compiling and testing applications, I have multiple VMs on this internal drive. Running these virtual machines on an external drive is completely out of the question given the performance would really, really suffer. Having 12 virtual machines which combined take up 72GiB on a 149GiB notebook drive though is also completely out of the question!

With my desktops in the past I tended to dedicate a smaller drive with the fastest RPM for the operating system and two larger, equally sized drives mirroring each other (later using RAID instead of software) for the data. On my current desktop back in Singapore which I SSH and SFTP into from here in Adelaide I have FreeBSD 7.0 AMD64 on its own dedicated, 10,000RPM SATAII drive with 32MiB of cache shared with binaries, and two 7,200 RPM drives for the home directories, port collections, documentation and served data. Ideally I’d love to have another super fast drive just for /swap too!

On this laptop I’ve got everything under the sun on one drive. Perhaps partitioning the drive and assigning the /Users directory to a secondary partition might help to compartmentalise the information and improve performance. On BSD and Linux it’s trivial to assign the /home directory to a separate volume, on Mac OS X I’m not so sure. Seems like I have some homework ahead of me!

This much taken up, on a 149GiB internal notebook drive. Bummer!
This much taken up… on a 149GiB internal notebook drive.

Of course it probably wouldn’t hurt cleaning this drive out either. I have a few Ruby scripts which I run each afternoon which cleans up my desktop and puts files in the appropriate places, but it can’t determine what is safe to delete and what isn’t. I need an electronic secretary I think. Make someone sign a NDA, then go through my drive and get rid of things. No, wait… perhaps that isn’t such a good idea.

As my fabulous father always says after ringing me from his office in Singapore which has more paper, books, phone receivers, emails and blood pressure tablets than Parliament House: "All I need is a time machine Ruben… then I’d work just fine"

VMware Fusion 2.0 beta2 with FreeBSD review

UPDATE: An abridged version of this review has been picked up by the fine folks over at BSD News. If you’ve arrived here from there, all my FreeBSD and NetBSD posts can be found in the aptly-named BSD category. Cheers :-)

I’ve loved using virtualisation software ever since I had an early version of Connectix Virtual PC for my iMac DV back in the early 2000s, and later their Windows version before they were bought out by Microsoft. Virtual PC was mostly intended for people to use recent versions of Windows on Mac OS 8, but I preferred using it for resurrecting classic operating systems such as DOS/Windows 3.x which we had on our first home machine, and playing around with Linux distributions without going through tedious partitioning.

My predictably unnecessarily verbose introduction aside, the latest virtualisation software I’m using on a regular basis is VMware Fusion for Mac OS X, and I’ve been very pleased with it. The second beta release for version 2.0 is out now, and I spent my Sunday afternoon trying out build 107508 with a handful of my most used operating systems, plus FreeDOS for fun!

VMware Fusion 2.0 beta 2 Virtual Machine Library
VMware Fusion 2.0 beta 2 Virtual Machine Library

The most noticeable difference initially between this latest beta and version 1 of Fusion is the redesigned Virtual Machine Library. Taking a cue from Virtual PC, the plain text listing of virtual machines has been revised to include screenshots for the suspended machines. While I think this is a extremely useful and welcome addition for quickly recognising machines visually, I think the Mac-like glossy finishes are a bit overdone. Also despite making the interface more Mac-like overall, I can’t help but think the New, Open and Settings would better be served by a regular toolbar at the top of the window.

The New Virtual Machine Assistant has been improved to allow for more boot and drive options. You’re no longer limited to choosing from a physical or virtual optical disc; you can choose to use an existing virtual drive or even none at all: a VERY welcome addition! Before you run the machine the first time you’re asked whether you want to modify settings too, which means you no longer have to start the machine at the end of the assistant and hastily shut it down to fine tune its configuration.

VMware Fusion 2.0 beta 2 New Virtual Machine Assistant
VMware Fusion 2.0 beta 2 New Virtual Machine Assistant

Speaking of configuration, the Virtual Machine Settings window has been drastically redesigned to make it look much more like the Mac System Preferences application, and to make it easier to access all the new options and virtual devices you can configure. Amongst the new goodies are the ability to configure floppy drives, parallel ports, serial ports, and multiple virtual hard drives. When I saw these additions, I literally jumped out of my chair and screamed "HELL YEAH!"

Fusion 2.0 beta 2 also allows you to visually scale and stretch live running virtual machine displays. Even just a little bit of scaling adversely affects the readability of text, but perhaps for other applications such as full screen gaming which needs to be scaled to fit to an unsupported resolution this might be useful.

VMware Fusion 2.0 beta 2 New Virtual Machine Assistant
Demonstration of the live visual scaling in beta 2. Both the NetBSD and Slackware virtual machines are set to 1024×768 but the latter has been scaled down.

Now for the bad news. I’m not sure if this is a temporary setback as a result of it being a beta version (I did disable debugging checks), but graphical performance in BSD operating systems on my original generation MacBook Pro is nothing short of abysmal. VMware provides welcome additions for FreeBSD, but even installing these in FreeBSD 6.3 Release and using them with the compat6x layer in FreeBSD 7.0 Release made no difference to the overall sluggishness. NetBSD 4.0 was just as bad, without any additions.

This slow performance was most pronounced when I started Xorg on FreeBSD or XFree86 on NetBSD. Typically starting an X11 environment in VMware Fusion 1.x takes less than a second followed by several seconds for loading the desktop environment or vanilla window manager. With Fusion 2.0 beta 2, both FreeBSD and NetBSD take over 5 minutes just to start X11, and another few minutes just to load something as lightweight as Fluxbox… if you want to load Xfce or KDE it takes over a whopping 10 minutes.

To check whether this was a problem with BSD, I tried Slackware Linux 12.1 with the same versions of KDE, Xfce and Xorg; and while it still felt a little sluggish it still managed to load all three in a reasonable amount of time.

Given I need to use FreeBSD for my studies I just can’t use this beta release on a production machine, but if you primarily use Windows or Linux you could probably try it out.

Fun with Xfce part 4: Using Openbox

What started as a mini series on the Xfce Desktop Environment on my university intranet has evolved into an open ended exploration on my public blog, and I’m having lots of fun doing it! Scroll down to the end of this post to view links to the previous posts in the series.

Part of the Xfce desktop environment is Xfwm, the Xfce window manager. Xfwm provides sophisticated and pretty composting effects such as drop shadows and alpha transparency on windows and menus, while still using less memory and power than competing desktop window managers. Despite this, for much slower machines even Xfwm can be overkill.

ASIDE: "Window managers" draw the widgets, title bars, resize handles and other elements onto application windows. "Desktop environments" such as KDE, GNOME and Xfce bundle their own window managers along with software developed specifically for their environments, such as Thunar for Xfce.

Enter Openbox, again! Openbox is an extensible, standards compliant, very minimalistic window manager that can be used by itself or in place of a desktop environment’s default window manager to further reduce memory and processor resources. The separate obconf utility provides a nice graphical control panel you can use to switch themes and adjust settings.

The Obconf window and Xfce Settings menu entry
Openbox running in Xfce with the bundled "Mikachu" theme

Most reputable package managers carry both Openbox and obconf, check your distribution’s repositories. To install them on my favourite BSD flavours for example:

FreeBSD ports system or package
# cd /usr/ports/x11-wm/openbox && make install clean
# cd /usr/ports/x11-wm/obconf && make install clean
or:
# pkg_add -rv openbox
# pkg_add -rv obconf

NetBSD pkgsrc
# cd /usr/pkgsrc/wm/openbox && make install clean clean-depends
# cd /usr/pkgsrc/wm/obconf && make install clean clean-depends

Now we want to kill the active Xfwm process in Xfce and open our glorious Openbox replacement. Fire up your Terminal and enter:

% killall xfwm4 ; openbox & exit

It really is smaller in every sense of the word isn’t it? To make sure Openbox is used by default whenever you start Xfce, quit Xfce and check "Save sessions for future login".

The Obconf window and Xfce Settings menu entry
Don’t worry, CC looks pretty confused herself!

You’ll also notice that the "Openbox Configuration Manager" has added itself to the Xfce Settings menu! Click on it and have fun with all the different themes, button positions, font sizes and arrangement settings.

Related posts