software category

I primarily run Mac OS X and RHEL-based Linux distributions. I also have experience with the BSDs, and think if a problem can’t be solved with Perl then it’s insurmountable.


Malaysian FreeBSD nostalgia and community

Screenshot of my MacBook Pro running FreeBSD with Haruhi Suzumiya's approval in 2006

Martin Wilke maintains one of the FreeBSD blogs I read most often, and one of his posts from February sent me down memory lane, and made me think about FreeBSD's future.

Some Malaysian BSD nostalgia

Going through his archives this evening, I found this post about BSD In Malaysia, which opened thusly:

Few days back I’ve met up with Mohd Fazil Azran for a small talk about *BSD at Starbucks coffee.

Funnily enough, I started experimenting using FreeBSD when we were living in Kuala Lumpur. Our home Streamyx internet was so laughably unreliable, I used to commute with my dad to KLCC where he worked, and hang out at Coffee Bean and Starbucks to download portsnap updates and build the latest ports on my MacBook Pro. You probably know KLCC from those Petronas Twin Towers.

Here's one of the posts I wrote at the time, from 2006. And another, specifically from the Starbucks in KLCC. And finally, another when I'd gone to the airport to use their internet. KLIA wasn't that far from our house.

Anyway, I thought it was cool someone was talking about BSD, in a place where I first learned and experimented with FreeBSD.

But I digress

As it happens, Martin blogged about FreeBSD in Malaysia specifically to highlight what he sees as a decline in the BSD community there.

I was interested to know why Malaysian *BSD community is so inactive, and from the discussion, I’d say that the reason is more likely caused by too much of politics in the group, financial issues, lack of interest to share knowledge and blablabla.

I was never an active part of the Malaysian BSD community (save from blogging about BSD in Malaysia at the time), but I agree with Khairil Yusof who left a fairly detailed comment. In brief: "the younger generation are used to the ease and flash of Fedora and Ubuntu Linux and therefore, start on those and get hooked on it."

With the release of FreeBSD 9.2 and the official inclusion of pkgng, perhaps this will change. I know from personal experience building ports was the least fun part of running the OS, and now that's been taken care of I've moved all but two of my machines back to it. I've always asserted (with a modicum of confidence!) that FreeBSD is technically superior, faster and more secure, but it was no secret that using it as a desktop OS was more challenging than Linux.


FreeBSD GPT works just fine on the ThinkPad X40

I'd abstained from using the GUID partition tables (get it... tables?) on my ThinkPads after reading warnings on the Fedora mailing lists. Inadvertently I installed FreeBSD with GPT on my ThinkPad X40 this afternoon though, and it worked just fine!

The K-On! girls eating sushi © Kyoto Animation.

Fedora

From Pádraig Brady on the mailing lists in February:

In Fedora 16 we changed to using GPT as the default disklabel for new installs. In a few cases, mostly limited to Lenovo hardware, we found that some BIOS's would not boot from GPT. We blacklisted Lenovo, falling back to msdos labels in order to solve this.

Thanks to Matthew Garrett we found that switching on the boot flag of the GPT's protective MBR these BIOS's would then boot from GPT. Matthew wrote a patch for parted to allow controlling this flag using the disk_set pmbr_boot command in parted. This is in parted-3.0-7

I can't find them right now (of course) but I also recall the release notes or installation guide for Fedora 16 and 17 detailing the use of nogpt and how Lenovo machines were blacklisted for using GPT.

So I avoided it, and used extended partitions to overcome the 4 partition limitations of MBR that we all remember.

FreeBSD

With the release of the 9.0 series, FreeBSD defaults to GPT instead of MBR. While installing, I explicitely created an MBR table instead of using GPT in the initial disk step of bsdinstall. Curiously, doing this resulted in a string of those notorious "g_vfs_done() error=5" errors when I first booted. The same results occurred when I used gpart manually from the shell.

Just to see what would happen, I let bsdinstall create GPT partitions instead, and FreeBSD has since booted flawlessly. No joke!

Granted, this is with FreeBSD i386 on a 32bit Pentium M ThinkPad X40. My next experiment will be to use GPT with FreeBSD amd64 on my Core 2 Duo ThinkPad X61s.


pkgin and pkgng for pkgwin

I moved to Fedora as my desktop OS of choice largely because of yum, and some Red Hat Linux nostalgia. Pkgin and Pkgng on NetBSD and FreeBSD respectfully may be enough to win me back :)

# pkg_add -rv awesomeness

Back when I fickly used FreeBSD then NetBSD for my file server at home, the systems were so appealing I wanted to try them on the desktop. If you go back to the Rubenerd.com archives from a few years back, you'll see all my posts about BSD desktops, getting Xfce working on them, and how much I enjoyed using them.

Leaving aside the issue of accelerated 3D graphics for now, the main issue with using the BSDs as desktop OSs is they tended to be heavily source-based. Binary packages were available, but generally speaking if you wanted current software and updates, you needed to use their respective port/package systems. Before the advent of freebsd-update, you also needed to rebuild the base system to upgrade it.

For small applications or the ones you'd typically run on a server, this was fine. Building Firefox or Xfce or KDE from sources each time they had an update would take hours, and was an incredibly tedious process. Sometimes they'd break, or a dependency wouldn't build, and you'd be stuck. It didn't make for a terribly pleasant desktop experience, especially when my Linux friends could enter yum update and be largely up to speed in minutes.

Obconf, Nitrogen, urxvt on Openbox, my "cloud" theme :)

A NetBSD repo? You bet!

A lot has changed in the intervening years since I started using Linux again. Pkgng on FreeBSD and Pkgin on NetBSD offer repository-based binary package management systems akin to yum in the Red Hat world, or heaven forbid apt-get.

From the NetBSD pkgin site:

pkgin is aimed at being an apt / yum like tool for managing pkgsrc binary packages. It relies on pkg_summary(5) for installation, removal and upgrade of packages and associated dependencies, using a remote repository.

Many so-called GNU/Linux distributions provide a convenient way of searching, installing and upgrading software by using binary archives found on "repositories". NetBSD, and more widely, all operating systems relying on pkgsrc have tools like pkg_add and pkg_delete, but those are unable to correctly handle binary upgrades, and sometimes even installation itself.

This is the purpose of pkgin, to provide the user a convenient way to handle binary packages, using the same working mechanisms than tools like apt-get.

And from the FreeBSD pkgng wiki page:

pkgng is built on top of libpkg, a new library to interface with package registration backends. It abstracts package management details such as registration, remote repositories, package creation, updating, etc.

pkgng is: a replacement for pkg_* tools, a tool to query/manage installed packages, a tool to deal with binary packages, a tool to upgrade/install packages from a remote repository and a library that provides all the package management in a safe way so one can write a new frontend.

I moved from FreeBSD to NetBSD on my file server here, and so far I've only played with pkgin, but I'm genuinely excited about both. A method to reliably and consistently upgrade binary packages was arguably the main reason I went to Linux.

I'll keep the penguin on at least one machine I own, but if these systems work well I may be on my way to using BSD on my laptops again, including maybe even this one! As much as I know about the Fedora ecosystem now, I'm still far more at home with BSD. /etc/rc.conf, securelevels, jails [sic], the 2-clause BSD licence!

I'll be playing with both after my latest round of assignments are handed in, and will report back ^_^


14 years later, he tried SciTE

SciTE

I thought I'd tried every conceivable editor from the IBM E Editor to Vim and everything in between, but I'd never used SciTE before. #herpderp!

And you call yourself a hacker

SciTE is a simple, cross platform text editor with a tabbed interface, syntax highlighting for all the major suspects and a trippy icon. It also reads like "science" which is just too cool. It was originally developed by Neil Hodgson in 1998 to demonstrate the open source Scintilla editing library, but is now a fully featured application in its own right.

MacPorts has the latest version, and it's also available on the App Store. Fedora 17 had a fairly dated 2.x version in its repos, so I downloaded the latest and greatest 3.2.3 release and built it. The tarball also came with the latest version of Scintilla.

% sudo -s
# tar xzvf scite*tgz
# cd scintilla/gtk or scintilla/qt
# make
# cd ../../scite/gtk or /qt
# make
# make install
# exit

The output from make install. On Xfce it doesn't matter that it only installed a 48x48px icon in pixmaps, but this won't cut it on Gnome 3!

[root@nia]/usr/local/src/scite/gtk# make install
install -m 755 -d /usr/bin /usr/share/scite
install -m 755 ../bin/SciTE /usr/bin
for files in ../src/*.properties ../doc/*.html ../doc/SciTEIco.png ../doc/PrintHi.png; \
do \
install -m 644 $files /usr/share/scite; \
done
install -m 755 -d /usr/share/applications /usr/share/pixmaps
install -m 755 SciTE.desktop /usr/share/applications/SciTE.desktop
install -m 644 Sci48M.png /usr/share/pixmaps/Sci48M.png

Impressions

The beautiful, simple Geany IDE which I've been using for many years uses the same Scintilla library that SciTE does, and there is a bit of a family resemblance in the layout of the editing area.

On the Vim/Emacs continuum of kitchen-sinkness, SciTE falls more on the Vim side. The initial configuration is fairly sparse, and it's up to you to customise it the way you want. The first things I did were turning on line numbering and the status bar, which helpfully shows which column the cursor is in, and what type of newline is being employed (in my *nix case, LF). No doubt these can be customised.

SciTE languages

User configuration is stored in various *properties files which you can conveniently access from the Options menu. I haven't had time to look into this so far.

In terms of usability, it employs all the same key shortcuts we're used to in other applications, such as CTRL+S for save. I'll admit in Geany I never have this problem, but in SciTE I keep reaching for that escape key to start hammering away my Vim shortcuts. Perhaps it's the minimalist interface ;).

Pushing onto my editor stack

For someone who otherwise likes minimalism and doesn't install things unless he really needs them, the last thing I need is another editor. On this ThinkPad right now I have Gvim, Geany, LaTeXila, NetBeans, JASSPA MicroEmacs, Torvald's me, Bluefish and Leafpad from Xfce. I've also been told to try Sublime Text, and I have Chocolat on my Mac. I'll commit to one eventually ^_^;;


New Skype to debut only on Windows 8

From Skype's The Big Blog. I've seen bigger.

Skype for Windows 8 is almost here and we are incredibly excited by this important new version of Skype. This is our big step forward together with Microsoft to introduce a completely new Skype experience, which is designed to be always on, immersive, effortless and fun to use.

To be fair, there are things in Windows 8 you can't do on other platforms, just as there are things in iOS you can't do on Windows 8. Still, prioritising one platform for a multi-platform client is what we feared when Microsoft bought Skype.

I used the word platform four times in this post. Please mind the gap.


XAMPP: Couldn’t start MySQL

Running a fresh XAMPP install on Fedora 17 this morning, I kept getting this error. I even RTFM!

I can't guarantee if this will work for you, but I re-extracted the archive with the -p to preserve file permissions:

# xvpfz xampp-linux-1.8.1.tar.gz -C /opt

Now MySQL in XAMPP starts:

# /opt/lampp/lampp start
Starting XAMPP for Linux 1.8.1...
XAMPP: Starting Apache with SSL (and PHP5)...
XAMPP: Starting MySQL...
XAMPP: Starting ProFTPD...
XAMPP for Linux started.

I'm thinking I should have a separate blog for tips like this. My neglected university hosted site, perhaps?

As an aside, the XAMPP icon in this post is by anekdamian on DeviantART. Much nicer than the default icon.


NetBSD 6.0

Just a quick tip of the hat to NetBSD for their 6.0 release. I use Fedora Linux on my laptop and Mac OS X on the desktop, but I'd prefer to be using NetBSD. As far as I'm concerned, it's the cleanest, most elegant operating system I've ever used.

I also made some My-HiME desktop backgrounds for NetBSD back in 2008. She was predominately orange, and so is NetBSD. I was in the zone.

NetBSD in an Australian VPS, now that'd be awesome. I wonder if they exist?


Running XAMPP on Fedora x86_64

XAMPP is currently only availably as 32 bit application. Please use a 32 bit compatibility library for your system.

Aaaaaaaah!

The problem

We've all seen that famously misspelled error message when attempting to install XAMPP on our 64 bit desktop Linux machines. I wonder how many people using XAMPP are still on 32 bit? I suppose enough to justify keeping it 32 bit. Speaking of which, this Kingston biscuit is falling to bits. Munch munch.

Here's the install scenario that will result in that error.

# tar xzvf xampp-linux-[version].tar.gz -O /opt
# cd /opt
# ./lampp start

Chemists have solutions

Other guides I've come across ask you to install a slew of things, and changing the launch script. For me on Fedora 17 x86_64, I was able to run it just by installing this:

# yum install glibc.i686

This also pulls in nss-softokn-freebl.i686.

Now you can run XAMPP without modification:

# tar -C /opt
 sudo ./lampp start
XAMPP: SELinux is activated. Making XAMPP fit SELinux...
Starting XAMPP for Linux 1.8.1...
XAMPP: Starting Apache with SSL (and PHP5)...
XAMPP: Starting MySQL...
XAMPP: Starting ProFTPD...
XAMPP for Linux started.

Line numbers in GNU Emacs

Emacs icon

In my quest to finally give GNU Emacs a try, the first thing I encountered was a lack of line numbers. Easiest way to have them appear persistently is to add this to your ~/.emacs:

(global-linum-mode t)

Alternatively, you can load linum-mode at runtime:

M-x linum-mode

The EmacsWiki has a ridiculously exhaustive list of other options, including more Emacs lisp that I'd care to throw a stick at.


CentOS favicons in Nautilus?

Speaking of short blog posts today, setting up a VPS this evening I noticed a CentOS favicon appearing in Nautilus on my local machine. A Fedora tip of the hat to a somewhat related distribution?

I might look into this. Icons are pretty. I like icons. Having them appear to represent an SFTP session is wild!