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

Skip navigation

Category archive for linux

Because archives are so much easier than having just hundreds of posts on the home page. I learned that the hard way.

Fun with Xfce, part one

This post is going to be part of a series on Xfce, originally posted on my university blog. I’m republishing them here in the hopes that others might find them useful or interesting. Cheers!

You may have noticed a few weeks ago I announced that I was moving my primary machine over to GNOME from KDE, mostly because the applications I use most heavily on FreeBSD and GNU/Linux are all GTK+ based and it seemed silly to run them in a Qt system. I’m a sucker for eye candy and visual consistency.

Well here I am now typing this on my newly reinstalled FreeBSD, Xfce desktop and it’s running great.

My FreeBSD Xfce 4.4.2 desktop!

You can be forgiven if you’re new to the world of Linux, BSD and X11 in general if you’ve never heard of Xfce; it certainty has been given far less publicity than the heavyweights GNOME and KDE despite it actually being born around the same time. Unlike GNOME and KDE which strive to be the ultimate desktops with all the bells and whistles, Xfce is designed to be lightweight and fast while still being a usable and complete desktop environment out of the box (as it were). This means unlike vanilla window managers such as Fluxbox it also includes a file manager, desktop background and icon support, graphical configuration, panels and so forth. A full list of included goodies is maintained on the Xfce projects site.

The real kicker for me is that as with GNOME, Xfce uses GTK+, meaning all my most used applications such as Gnumeric, Abiword, Mozilla Firefox, The Gimp, Inkscape, Thunderbird and the X11 version of VIM all look really slick and match the rest of the system. I’m a sucker for eye candy and visual consistency. Wait, I already said that.

In the coming days I’ll be posting many more entries about my experiences with Xfce including how I’ve customised and used it and some other tidbits I’ve picked up along the way. Stay tuned :-).

Debian Etch for 5, then back to Slackware

For my university studies and to keep up to date with what’s happening in the Linux world (given I’m a FreeBSD guy mostly) I decided to dual boot my new desktop machine with Debian GNU/Linux 4.0 Etch. In the past I’d always used Slackware to fill this role, but I figured I’d just try something new.

ASIDE: "Debian GNU/Linux 4.0 Etch" just doesn’t roll off the tongue as well as "Slackware Linux 12" or "FreeBSD 7.0 Release". A ridiculously pointless observation, but one that I believe deserves recognition. And it would look just fab printed on a shirt.

Within a few minutes of starting the initial install, I got the following error:

Debian Etch failure

No common CD-ROM drive was detected? Are they serious?

Using the exact same optical drive I’ve been able to install the latest versions of FreeBSD, NetBSD, OpenBSD and Slackware Linux, not to mention a creaky old version of Windows 2000 and even IBM OS/2 Warp! And yet Debian GNU/Linux cannot even detect the drive after the initial boot phase?

I took it to be a sign to keep using Slackware for my Linux partitions. It’s a shame, I was looking forward to seeing why people seem to love apt-get so much; I guess it’s back to my FreeBSD desktop with the ports collection, and Slackware Linux with pkgsrc. Not that I’m complaining, it’s still my favourite distribution!

Rzip is absolutely incredible

mikuru.jpg
Mikuru-san tried to compress my files too using her superpower energy. Rzip still worked better.

After reading an old post on Jeremy Zawodny’s weblog and installing it myself, I have to say Rzip is my new favourite compression algorithm!

From the developer’s website:

rzip is a compression program, similar in functionality to gzip or bzip2, but able to take advantage long distance redundancies in files, which can sometimes allow rzip to produce much better compression ratios than other programs. The original idea behind rzip is described in my PhD thesis.

For a bit of real world testing, I decided to try compressing the www folder in my home directory on my MacBook Pro. I thought this folder would be a useful test because it’s relatively large and contains a few large files mixed in with hundreds of smaller ones. From what I understand of compression algorithms, they each tend to favour compressing certain types of files and in certain quantities so I figured this way it would show a more balanced result.

The original folder size was 436.0 MiB with 312 files. The Tape Archive is the control because it’s needed for all but ZIP to archive the files before they can be compressed. For convenience the names also redirect to their associated Wikipedia pages.

Algorithm Extension File size % of original % saved
Tape Archive www.tar 423.9 MiB - -
ZIP www.tar.zip 290.9 MiB 68.62 31.38
Bzip2 www.tar.bz2 286.3 MiB 67.72 32.28
GNU zip www.tar.gz 284.8 MiB 67.54 32.46
Rzip www.tar.rz 104.7 MiB 24.70 75.30

What’s curious is that Gzip was more efficient than Bzip2, in almost every other circumstance I’ve come across the reverse was true. I’m not sure how much that affected the results of the other formats. The final result is clear though, Rzip was able to squash like nobody else!

steamroller.jpg
Image © Jan Mehlich, from Wikimedia Commons. As with the image above, I thought it was mildly amusing given the subject matter. I hate dry weblog posts without pictures you see.

From what I can make out reading the developer’s website; and with help from dadaist in real-time on Twitter; is that Rzip isn’t an entirely new compression algorithm per-se, it essentially just uses larger chunks of data over much longer distances, and then uses existing algorithms to process it all.

I theorise from reading up on this that only in the last decade have computers had enough processing power, and more importantly memory, to be able to pull this off. 900MiB of looking space is great for compression, but can suck up all your resources pretty fast if you don’t have much. This is why we haven’t seen this level of compression until recently.

In any case, I know what I’ll be using to compress all my large files and folders with now :).

Netscape Navigator 9 rocks!

Netscape Navigator!

Anyone who used the internet in the 1990s would remember Netscape Navigator, the standalone web browser before Netscape Communicator that you originally had to pay for: the software that Microsoft was so successful in burying all those years ago in the first internet browser wars. I used Netscape Navigator, Eudora and ICQ… sniff, so many memories!

Netscape Navigator!

Well I’m now typing away on Netscape Navigator 9 for Mac OS X. After all those years of feature creep, slower speeds and bloated executable sizes, the new Navigator is lean, mean and noticeably zippier. It’s based on Firefox instead of the former Mozilla Suite and it shows. Plus, it supports nearly all the Firefox plugins and themes too.

Aside from the obvious changes under the hood, the new Navigator has also been redesigned on the surface. The new toolbar icons are much clearer and instead of a separate search button next to the Address bar there’s a dedicated search box. The toolbar, tabs and titlebar with these changes noticeably take up less space. Compared to Safari and Camino (my current primary browser) the difference is tiny:

Safari, Camino and Netscape Navigator rendering Dave

Really I can’t see enough compelling reasons to switch if you’re already a Firefox user, but for me there’s something so nostalgic and pleasing to grace my modern computer’s dock and Applications directory with that venerable serif N on a black planet scape with the teal sky. I’m so sentimental (^_^).

Navigator in the Finder

New Singapore download speed record

Despite my borderline manic obsession with BSD on my own systems, I chose Ubuntu Linux on my mum’s laptop, mostly because she just wanted a really basic system with a computer-illiterate-proof update mechanism, a web browser and that’s it.

So I was downloading it last night and glanced at the transfer rate. 2.2KiB per second? This was going to take longer than I thought. Until I read it again… 2.2MiB per second! In less than 4 minutes I had the latest version of Ubuntu Linux sitting on my desktop, a 697MiB file!

Compared to the internet I’ve used in Malaysia (argh TMnet!) and Australia (TPG is fairly reliable but slow), Singapore has it going on :).

Linux Windows comparison whitepaper

You can download the whitepaper of which I speak here.

Ironically I was at Linux.org today for some reason and saw something that I never thought I would find interesting: a Google AdWords advertisement! Clicking on it brought me to a whitepaper on TechWorld comparing Linux and Windows.

In this report, we aim to look at both Linux and the Windows family from a neutral standpoint. Our hope is that a balanced viewpoint will help you make a decision based on the facts, rather than on ill-thought-out opinion. TechWorld is a technology-independent publication and the report’s author runs both Windows and Linux on his various servers, laptops and desktops with no particular preference.

It’s a very fun read, especially in light of the latest developments in the SCO case which discredits large areas of it. Apparently according to this the SCO intellectual property case was a genuine threat to Linux and one which needed be taken seriously, even though virtually nobody else thought so. Do you think they were paid off somehow… hmm… ;).

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

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 ;).