NOTE: This post was originally written in 2010 so it may be dated. I’m resurrecting this article simply because I liked it. It’s been copied between several blogging systems (some of which were home-brewed) and, as such, some formatting has been lost along the way.

* Edit 6/29/2022: Beta 3 is now available for download at http://www.haiku-os.org/

* Edit 6/4/2010: Alpha 2 is now available for download at http://www.haiku-os.org/

Haiku Logo
Back in the 90’s and early 2000’s I played around with BeOS, an alternative operating system developed by Be Inc. The intention of BeOS was to be a desktop operating system that specialized in multimedia and competed with Microsoft Windows and Mac OS. Be Inc. even attempted unsuccessfully to sell out to Apple as the replacement for the classic Mac OS.

The proper BeOS is now long defunct but the effort is continued by way of an operating system called Haiku which is an open source continuation of BeOS.

Be LogoI’ve been meaning to make some time to play with Haiku (which is currently in alpha) for a few months now, but family, other projects and work have gotten in the way. Thanks to some snow… Well, a whole lot of snow, I’ve had a chance to get my feet wet with it. I’d now like to provide some resources for those who are interested in doing the same, and I definitely suggest that you do if you have an interest in alternative operating systems.

What is Haiku?

As I stated above Haiku is an open source continuation of the BeOS effort, currently in the alpha phase. Right now only the x86 architecture is supported but future x64 support is likely.

One of the core design principals behind BeOS and Haiku is to keep the system simple. The belief of the designers is that operating systems like unix’s and windows have had layer after layer added on over time as new needs arose. This layering resulted in inconsistency and complexity. BeOS and Haiku avoided this complexity by starting from scratch with modern needs in mind.

While it’s not a unix (and sort of takes exception to unix) it is POSIX compliant, has a Bash shell and has ports of many typical open source unix-y programs. If you’re familiar with unix you’ll feel at home on BeOS/Haiku. If you’re not familiar with unix it should still be easy enough to operate due to Haiku’s user-friendly GUI.

Haiku Bash Shell

Installation

Installation is pretty strait-forward and entirely GUI based. For most people it will be something like:

  1. Select your destination disk
  2. Click “Setup partitions…” and make a BeOS partition
  3. Click “Install” and watch status bar eagerly
  4. Click on “Write Boot Sector to <Disk Name>” button

Haiku Install

Software

No matter how stable, fast, or easy to use an operating system is it’s only as useful as the software it runs. Luckily plenty of apps exist or have been ported to BeOS. Developers are also porting new apps to Haiku all the time.

Right out of the box you’ll notice familiar open source applications are included such as the nano text editor and the gcc C compiler. You’ll also have the necessities like a paint program (WonderBrush), media player (MediaPlayer), PDF viewer (BePDF), web browser (BeZilla), and others.

BeZilla

Thus far I’ve relied on three main sites for additional software for Haiku:

  • BeBits – A general BeOS software repository. Some apps aren’t compatible with Haiku specifically but it’s still a great resource due to its variety.
  • Haiku Ports – A repository of open source software that’s been ported to Haiku.
  • HaikuWare – A vast Haiku-specific software site.

In general there’s a little bit of something for everyone if you do some looking around: productivity, multimedia, software development and even games like Wolfenstein 3d.

Wolfenstien

Hardware Support

It’s hard for me to speak with any authority about supported hardware but drivers do indeed seem to be supported for most popular hardware like good video cards from NVIDIA and ATI. BeBits and HaikuWare are great resources for drivers for audio, video and other devices but I suspect there will be gaps for more obscure devices.

Development

Most programmers will be pleased to know that Haiku ships with such necessities as Python and gcc. A myriad of other languages like BASIC, Ruby and Eiffel are also available from the sites outlined above as well.

Hello World WindowThe most fundamental way to write Haiku applications, however, is to use the actual BeOS API from C++. While I’m not all that familiar with the API myself I managed to rearrange the HelloWorld sample from the official BeOS R5 sample code into a concise example here. It simply displays a new window with the classic “Hello, World!” text.

Note that the code is arranged into a single unit for ease of posting. It’s by no means intended to exhibit proper style.

#include <Application.h>
#include <Window.h>
#include <StringView.h>

class HelloWorldView : public BStringView {
public:
    HelloWorldView(BRect rect, const char *name, const char*text):
        BStringView(rect, name, text) {
            SetFont(be_bold_font);
            SetFontSize(24);
    }
};

class HelloWorldWin : public BWindow {
public: 
    HelloWorldWin(BRect frame) :
        BWindow(frame, "Hello", B_TITLED_WINDOW,
                B_NOT_RESIZABLE | B_NOT_ZOOMABLE) {
                    HelloWorldView *view;
                    BRect rect(Bounds());
                    view = new HelloWorldView(rect, "HelloWorldView", "Hello, World!");
                    AddChild(view);
        }

    virtual bool QuitRequested() {
        be_app->PostMessage(B_QUIT_REQUESTED);
        return true;
    }
};

class HelloWorldApp: public BApplication {
public:
    HelloWorldApp() :
        BApplication("application/x-vnd.Be-HelloWorld") {
            HelloWorldWin *wnd;
            BRect rect;

            rect.Set(100, 80, 260, 120);
            wnd = new HelloWorldWin(rect);

            wnd->Show();
    }
};

int main(int argc, char **argv) {
    HelloWorldApp app;
    app.Run();
    return 0;
}

Assuming the code was placed in a source file named hello_world.cpp it could be compiled with:

~> g++ -lbe hello_world.cpp

Conclusion

Haiku is only in alpha. Pretty darn young. Be forewarned that any software beyond what’s bundled may require some effort to get to work. Still, it’s easy enough to use for a non-hacker, but powerful enough for a hacker.

It seems to support that which most people need to do and good bit of what they want to do. It’s definitely worth a look.