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

Skip navigation

The mysterious little DFE-670TXD

DFE-670TXD

The DFE-670TXD is a mysterious little ethernet card, because it’s turned my old ThinkPad 600E into a very picky eater. With this card plugged into either of the PC Card slots:

  • My beloved FreeBSD installs, but throws errors upon booting despite the fact the very card is named and supported in /etc/defaults/pccard.conf
  • NetBSD not only refuses to install, but just reboots the machine before it’s even finished booting of the CD-ROM
  • My Linux distro of choice Slackware detects and installs the card, but upon using it after installing the base system, the entire system hangs forcing a hard reset

Curiously, the only operating system which installed and detected the card perfectly was… OpenBSD! I have no idea what OpenBSD is doing differently, but booting of the CD and going through the installer the card is detected automatically. When I reboot the machine with OpenBSD installed, I can use the internet, share files on the local network and synchronise with time servers without any problems!

FreeBSD is my operating system of choice generally, but OpenBSD for some reason which completely baffles me right now is the only one that works. I’m completely baffled. Did I mentioned I’m baffled? Bamboozled? Anyone with knowledge on how OpenBSD drivers work know why or have any theories?

In any case I guess I’d better brush up on the OpenBSD FAQs, because I have an OpenBSD machine now!

Modular Xorg on NetBSD from scratch

NetBSD Xorg Orange
That’s a lot of orange! That reminds me, I need more F&N… Orange

NetBSD is one of the last Unix-like operating systems still shipping by default with the XFree86 X Window Server as opposed to the new de facto Xorg distribution. From what I’ve been able to find out doing a quick Google around is that given the system’s strict requirement for portability it’s going to take a lot of work to get Xorg working on every port. I respect that.

So enter pkgsrc and modular Xorg! Modular Xorg is an exciting new way of distributing Xorg because it allows you to cherry pick only the drivers, applications and other whatnot that you want instead of installing one huge package.

For me, I’m using a fresh install of NetBSD 3.1 in a VMware Fusion virtual machine, so you’ll obviously have to take these steps as a guide for your own system.

During the initial install I chose the Custom Installation option and de-selected the X11 Distribution Set. This means I avoided any mess right from the beginning, just as I did when I changed from Monolithic Xorg to Modular Xorg on FreeBSD.

Once you’ve installed NetBSD, do your usual configuration of /etc/rc.conf to enable your network, and add X11_TYPE=modular to your /etc/mk.conf file. DON’T add a X11BASE line!

Then go grab yourself the latest pkgsrc tree and update it.

Now it’s just a matter of make install clean clean-depends -ing each package we want. If you really wanted to, you could just install all the meta-packages:

… but that really defeats the purpose of going modular! For me, I installed the base server, the entire fonts meta-package, only the drivers I needed, and the minimum required apps:

Obviously when I said minimal I wasn’t kidding! These packages are enough to get an X session started, but that’s about it. If you’re installing a desktop environment such as KDE, Xfce or GNOME you can go right ahead and install their respective packages, but if you’re using a vanilla window manager such as OpenBox you’ll really need to install at the very least a terminal emulator. I like urxvt.

It is defintely more work to install modular Xorg, and in many cases the default XFree86 distribution Is Good Enough™, but I like the added control this gives me, plus then I have the added convenience of using similar software on my other BSD and Linux machines. Right Mai?

Is she pissed off or distracted somehow? I don’t know. Maybe she runs OpenBSD instead. It’s 01:52, maybe I actually need to go to sleep now.

Another look at NetBSD

A fresh NetBSD install

After a year or so of using FreeBSD I decided today to take another look at the operating system I learned UNIX on from the beginning: NetBSD (well actually it was Red Hat Linux 5, but I never left X!). I admit the way I learn things is to be focused on one specific programme, language or OS and hack away for a week rather than trying to be vague and learning many things at once not that well and not in much detail, and therefore not making much more than token advances in understanding. See how I slipped my critique about my university studies there? ;).

Reading back some of my previous posts I’m not entirely sure why I switched completely to FreeBSD back at the beginning of last year. I think part of the decision stemmed from VMware’s official support of FreeBSD and the fact that more people were using it, so I figured it was a better boat to be floating in. I’ve been using a lot of boat analogies lately, I’m becoming a bit washed up. Get it? Aha. RATHOLE!

Having used NetBSD though for a few hours I’ve remembered what I love about it:

  • the layout of the file system is so clean
  • the initial installer is fast and slick
  • pkgsrc simply rocks!
  • the PowerPC port is an equal citizen not a afterthought next the x86 version, so my old Power Macintosh G3 and iMacs can use the same OS as my generic AMD boxes and just as well
  • compared to Linux it really boots up in a flash, like FreeBSD
  • KDE and Qt apps seems more stable on NetBSD (perhaps it’s just me) and Konqueror has the search box by default right from pkgsrc
  • if it’s good enough for Wintellect at BSDNexus, it’s damn well good enough for me!

That said though, I’m not giving up on FreeBSD, I think there’s definitely room for both. The default addition of portsnap and jail abilities (and coloured file listings!) are still very compelling, and the support for it in third party applications and drivers is certainly stronger. I think it will come down to a machine by machine choice for now.

I think it’s safe to say I’m a *BSD enthusiast, I am a happy user of Mac OS X, I have a passing interest in GNU/Linux and Solaris, and I have a healthy distaste for Windows and System 7 ;).

NetBSD

Just bought VMware Fusion

A couple of days ago I finally gave in and purchased a copy of VMware Fusion. Having used the demo versions of Parallels Desktop and Fusion on my MacBook Pro I decided VMware’s product was much more suited to my needs. Parallels seems to be great for running Windows, but my main use is for FreeBSD and other Unix-like development which Fusion has better native support for (official additions for FreeBSD and Solaris anyone?). And with a special offer of $39.00 for first time beta purchases before the final version came out I figured it was the best choice. I should have taken a PR course at university instead.

So now I have the final, official retail release of VMware Fusion running on my MacBook Pro, and I’m loving it. Having a dual core processor with VT support really kicks some serious virtual arse.

Below is a screenshot of fresh virtual machines running OpenBSD 4.1 sitting at the shell, NetBSD 3.1 with a basic OpenBox window manager session, ReactOS and an installation of Windows 2000 Professional humming along:

VMware Fusion

I do admit I do run a purchased, fully licenced copy of Windows 2000 as a virtual machine to run a few apps that don’t work so well on Wine, and for testing of my websites using Internet Explorer 6. Windows XP and Vista just add useless features and require more system resources, so 2000 works just nice. Well, as nice as Windows can.

Below is a screenshot of AutoPatcher running under Windows 2000 using the Unity feature of Fusion which makes it look as though Windows applications are running on the Mac OS X desktop. I much prefer to use AutoPatcher than Windows Update because it means I don’t have to run Internet Explorer to use it, and I don’t call home to Microsoft.

VMware Fusion

And here it is running in it’s own window. I actually think I prefer having it this way:

VMware Fusion

I just love having virtual machines. I can tinker away with really fascinating operating systems and learn so much, without stuffing up anything when I do something wrong. It’s great for sand boxing, and it also allows me to run a scaled down FreeBSD machine with just the bare basics so I can study without distractions. Not to mention compiling applications for different platforms… the possibilities are so exciting!

Or maybe I’m just easily excited ;).

Enabling UTF8 in Nano

nanoutf8.png

Everyone knows that vi and vim are better than emacs right? Well personally I prefer nano even over vi. It was the first text editor I ever learned (okay it was actually pico, the editor it was cloned from) on UNIX and even now I use it for almost everything: Ruby, Perl, HTML, XML, KitchenSink… even these weblog posts. It’s a small world, so why not use a small editor? Hey, that’s catchy.

The problem though if you install Nano from MacPorts is that it’s not enabled with a number of what I would consider critical features. Aside from syntax highlighting support probably the most noticeable of which is the lack of UTF-8 support which means it spits out a series of question marks whenever you’re editing files with katakana, kanji and kitchen-sink in it for example. Bummer.

A cursory glance over at the DarwinPorts website shows that in fact it’s possible to enable UTF-8:

Variant: utf8 {
configure.args-append –enable-utf8
configure.args-delete –disable-utf8
depends_lib-append port:ncursesw
depends_lib-delete port:ncurses
}

The key is simply to add +utf8 when you initially build the port, along with any other conditions you think are spiffy:

sudo port -v install nano +utf8 +color +no_wrap

X11, FreeBSD, Parallels Desktop, xorg.conf

If you’re in a hurry and just want the damned xorg.conf file, you can download mine here ;).

FreeBSD! If you’ve read any of my blog by now you know I use FreeBSD 6.2 in Parallels Desktop on my MacBook Pro. I’ve recieved two emails from people asking how I got X11 working, so for the benefit of those fabulous people and anyone else who’s interested I thought I’d post a quick how-to.

Essentially configuring X on FreeBSD in Parallels Desktop is the same as a normal machine but with a few quirks, especially if you’re running a widescreen MacBook or MacBook Pro.

Firstly after you’ve installed FreeBSD (I just download the ISOs and mount them directly in Parallels), log on as root and run the X11 configuration script, which will dump an xorg.conf.new file into your /root directory:

Xorg -configure

Next open the xorg.conf.new in a text editor. If you’re fairly new to UNIX and FreeBSD the Easy Editor is probably your best bet:

ee /root/xorg.conf.new

Most of the heavy lifting has been done for you; from my experience FreeBSD in Parallels Desktop detects the virtual keyboard and mouse just fine. We need to add some more information though for our widescreens.

Scroll down until you see Section "Monitor" and add the following lines (make sure each Modeline is on one line though, not wrapped like this):

HorizSync 31.5 - 100.0
VertRefresh 59.0 - 75.0
Modeline "1440x900_60.0" 106.47 1440 1520 1672 1904 900 901 904 932 -HSync +Vsync
Modeline "1280x800" 83.46 1280 1344 1480 1680 800 801 804 828

The modelines allow X11 to use the widescreen displays of the MacBook Pro and MacBook respectively. Even though I have a MacBook Pro I tend to use the “1280×800″ because it fits nicely in a window on my OS X desktop.

Next under Section "Device" add the VideoRam line followed by the amount of VRAM you allocated your virtual machine in kilobytes (ie: multiply by 1024). The default is 16MB, which would be 16384:

VideoRam 16384

Really unless you’re using an external monitor there is no point at the moment allocating more than this to your VM; Parallels Desktop takes this from your host machine’s normal RAM not video memory and uses it to increase supported resolutions.

Now scroll down to Section "Screen". You should see several SubSection "Display" configurations with different colour depths. Scroll down to the last one and add the appropriate Modes line:

SubSection "Display"
Viewport 0 0
Depth 24
Modes "1280x800" (for MacBook) OR
Modes "1440x900" (for MacBook Pro)
EndSubSection

FreeBSD should auto-detect under most circumstances the highest colour depth the VM supports, but I usually put a DefaultDepth line in right under Section "Screen" for good measure:

Section "Screen"
DefaultDepth 24

Now you’re all set! All that’s left to do now is rename and move the changed file over to the X11 configuration directory:

mv /root/xorg.conf.new /etc/X11/xorg.conf

Now the moment of truth: testing if it works!

startx

And that’s all there is to it. To return to the command line, just type ctrl alt delete/backspace.

The next step would be to go to your ports tree and install your favourite window mananger or desktop environment. For example if you want KDE, as root:

cd /usr/ports/x11/kde3
make install clean

Or if you if you’d prefer not to wait two days for the entire desktop to be compiled ;):

pkg_add -rv kde

Then add exec startkde to your .xinitrc in your home directory (create it if it doesn’t exist).

Haruhi KDE FreeBSD

Don’t forget to read the FreeBSD Handbook chapter on X11 Configuration as well.

FreeBSD guy tries and likes Slackware Linux!

FreeBSD!By now if you’ve read this blog in any great detail (or even if you haven’t) you’d know by now I love FreeBSD and intend to use it as my primary desktop and server OS by the end of the year. Booh-yah!

Anyway I’ve had to admit lately though that most open source software isn’t written for FreeBSD but for Linux, and for ages I’ve been looking for a Linux distro that as a FreeBSD user I could feel comfortable using; not to replace FreeBSD but just as an alternative I could dual boot into from time to time to keep myself up to date with Tux. Plus my work and university studies require Linux, so would be useful to have a real world test bed.

SlackwareIn my search I’ve steered farily clear of distros like Fedora, Chuck Norris, openSUSE, PCLinuxOS and Ubuntu/Kubuntu/Xubuntu/KitchenSinkuntu; personally I like to have more control over the installation and prefer to set up things like the shell, X11, packages and networking myself. A few years ago I would have shuddered at the thought of doing configuration on the command line, these days I can’t see myself doing it any other way. There’s something to be said for installing a barebones system and configuring everything yourself afterwards. Or maybe I’m just a freak ;).

Just for fun I downloaded through the torrents the latest version of Slackware Linux (using the optional 2.6.18 kernel) and gave it a shot; and was pleasently surprised! As compared to FreeBSD, the Slackware installer is very similar, the directory structure is very similar and the system just feels more UNIXy which I like. Plus it just seems clean and well designed as opposed to some of the more top-heavy distros which feel slapped together, if that makes sense.

A comparison of the installers: here’s FreeBSD 6.2:

FreeBSD 6.2 Installer

And here’s Slackware 11.0:

Slackware 11.0 Installer

As you can see, it’s no wonder I felt right at home installing :).

As for documentation, the Slackbook is fantastic and easy to follow, and the man pages are well put together.

So far I’ve tried Gentoo, Debian and now Slackware and I feel as if I’m more inclined to use the latter! Installing dependencies on packages myself will take some getting used to (I’ve been spoilt by the FreeBSD ports system!) but I’m sure it will be a great learning experience. Or I could chicken out and use NetBSD’s pkgsrc for it ;).

Mikuru, Fluxbox with ROX-Filer on FreeBSD

In my continuing saga to find the perfect FreeBSD desktop, I decided to set aside the fully fledged desktop environments (KDE, Gnome and Xfce) that I’ve reviewed so far and instead focus on one of the most lightweight window managers: Fluxbox. I figured if I could get it to work, and liked using it, I could adapt it to fit on my boss’s ThinkPad which can only just run IceWM or Windows 98 as it is ;).

Here’s my basic Fluxbox desktop running on FreeBSD on my MacBook Pro with Mozilla Firefox and Xterm with custom colours:

Fluxbox on FreeBSD

As you can see, it’s very lightweight. On a machine like this it loads faster than you can lift your finger off the return key when you type startx to launch it, it’s wild!

Unlike the aformentioned desktop environments and like other vanilla window managers, Fluxbox does exactly what it’s supposed to do; and that’s it. It’s entirely up to you to choose your web browser, email client, office suite, file maneger, terminal emulator and so forth which can take more time on your part but is very rewarding.

The first snag I came across installing Fluxbox on FreeBSD is that the port in the ports collection called fluxbox is actually not the one we want, but rather the fluxbox-devel. Despite the name, fluxbox-devel is the stable release. Caught me out the first time!

fluxbox.png

Once you have the base fluxbox window manager, just add exec fluxbox to your ~/.xinitrc file, then type startx to fire her up.

The configuration files are created in a new folder ~/.fluxbox in your home directory. The customisable settings are in the init file, and you can customise the right-click desktop menu with the surprisingly titled menu file. Is good yah.

To use your own custom desktop backgrounds, you need to install a seperate image viewing program, such as feh which can be found in the ports collection under graphics. After installing, just modify your init file so the line rootCommands: reads rootCommands: fbdeskbg -f /path/to/your/image. You can also pass images to feh on the command line to open them:

Chuck Norris Llamas

Chuck Norris and a Llama, what more do you need? :D ;)

As for file managers I chose ROX-Filer because it’s lightweight and zippy but still allows thumbnailing of images which is very impressive. Again, it’s in the ports collection:

ROX-Filer on Fluxbox

The verdict? Even on slow machines Fluxbox whoops some serious arse, and on my MacBook Pro it works faster than I can type the commands! For many situations I’ll definitely consider it, but I’m a sucker for nice graphics so for my production machines I’ll stick with the desktop environments for now; but I must admit Fluxbox + ROX-Filer is a very nice combination.

Surprisingly the folks over at Fluxbuntu have had a very similar idea and are implementing Fluxbox and ROX-Filer over Ubuntu Linux. If it weren’t for the fact it’s not FreeBSD I’d check it out, looks very intresting.

My other *NIX desktop environment related posts: