I’ve been using LinuxMint 5 for some weeks now, and a very fine distro it is, too. I’ve noticed that NetBeans 6.1 starts and runs a great deal faster on Mint than on Windows XP – the difference is quite significant. I’ve been wondering why that is, given that this is Java and therefore presumably only the low-level loaders and file-system interactions differ across platforms. That’s just a passing observation and not the point of this post.

I found one annoying thing happening occasionally (but often enough to be irritating): NetBeans dialog boxes would appear completely empty. Take a look at the screenshot:

There didn’t seem to be any pattern to this behaviour; it wasn’t always the same dialog, and if you closed the dialog and opened it again it would appear normally. Not good.

Well, it turns out this is known problem when using the Compiz window manager on Linux – a quick search revealed a good post on the NetBeans forums about this subject. The answer is to use the latest JRE / JDK build as it addresses this compatibility issue. I decided to download and install JDK 6u10 RC and give it a try.

To get NetBeans to use the newer JDK, you can do one of two things:

  1. Edit the NetBeans configuration file (in <installationFolder>/etc/netbeans.conf) and change the path pointed to by netbeans_jdkhome
  2. Change your system default Java installation.

Not very keen on (1) – feels like I’m hiding a workaround in just one application’s config, but the problem exists for any Java application I run on this system.

So I decided to do (2). It worked perfectly, so thought I’d share the steps I used to do it. First, where is Java actually installed on the filesystem? If you do ‘which java’ in a console, it will report /usr/bin/java. But if you look closely, this is just the first step in an indirection; the ls tool reveals:

$ ls -l /usr/bin/java
lrwxrwxrwx 1 root root 22 2008-10-01 06:55 /usr/bin/java -> /etc/alternatives/java

And /etc/alternatives/java is another step:

$ ls -l /etc/alternatives/java
lrwxrwxrwx 1 root root 36 2008-10-01 06:55 /etc/alternatives/java -> /usr/lib/jvm/java-6-sun/jre/bin/java

And the /usr/lib/jvm/java-6-sun file is actually a symbolic link to the actual Java installation folder, which is in the same folder. That’s a lot of indirection, and I am quite sure there are good reasons for all of it, but I haven’t time to learn all of them. There is a very detailed post by Anthony Richardson which patiently explains how to create a proper DEB package from the JDK download; this is almost certainly a good idea.

I chose to exploit the fact that the last step in the indirection chain is that symbolic link file. By unpacking the JDK directory into /usr/lib/jvm and getting the java-6-sun link to point to the new JDK folder, I decided I could replace 6u6 with 6u10, system-wide.

However, there is another file in this folder: the .java-6-sun.jinfo file (this is a ‘.’ file – you’ll only be able to see those if you use the a switch with ls (e.g. ls -al) or View / Show Hidden Files in Nautilus). Looking inside it, only the first line appears to contain version-specific stuff – everything below uses paths which use the symbolic link:

name=java-6-sun-1.6.0.06
alias=java-6-sun
priority=63
section=non-free

jre ControlPanel /usr/lib/jvm/java-6-sun/jre/bin/ControlPanel
jre java /usr/lib/jvm/java-6-sun/jre/bin/java
jre java_vm /usr/lib/jvm/java-6-sun/jre/bin/java_vm
jre javaws /usr/lib/jvm/java-6-sun/jre/bin/javaws
jre jcontrol /usr/lib/jvm/java-6-sun/jre/bin/jcontrol
<snip>

I decided to leave this as-is for now, and edit it later if required. So, in summary here is what I did:

  1. Copied the JDK 6u10 contents into /usr/lib/jvm.
  2. Went to the directory /usr/lib/jvm and opened a gnome-terminal as root (you need to be root or use sudo, to make changes here).
  3. Completely unnecessarily, I backed-up the old symbolic link file, just in case. The easiest way is to use mv (by default mv doesn’t follow sym-links), but if you’d prefer to make a copy of a symlink (rather than the object to which it points) you need to use the -P switch, e.g.
    cp -P java-6-sun java-6-sun_OLD.
  4. Made a copy of the jinfo file:
    cp .java-6-sun.jinfo .java-6-sun.jinfo_ORIGINAL_1.6.0.06
  5. Made java-6-sun symbolic link point to the new JDK directory:
    ln -s jdk1.6.0_10/ java-6-sun

And it does seem to work. NetBeans reports that it’s using 6u10, and I haven’t seen any empty dialogs yet! Better yet, NetBeans seems to start and run faster, too. (I haven’t timed it – this may be placebo effect…)

Hope this may help out other folk using LinuxMint or Ubuntu, facing the same problem. Of course, remember that you can easily disable Compiz (set Visual Effects to None in the Appearances Preferences), and you can get some simple effects back using Gnome Compositing, available via the Mint Desktop tool in Control Center.

I’ve lost count of the number of Linux distros I’ve tried and rejected because of:
1) Ugliness (especially screen font-rendering)
2) Device problems, mainly wireless networking
3) Video driver problems, e.g. machine locks up when Compiz or similar enabled.
4) No support (or broken support) for power management, hibernation etc.
5) All of the above.

Even recent ‘big-name’ distros like OpenSuse and Fedora have had one or more of these problems, at least for me, on my Acer laptop.

Finally I believe I have found a Linux distro I believe I really, honestly may be able to use as a Windows replacement. It’s LinuxMint 5.

I am very sensitive to (or intolerant of) poor font rendering on laptop displays. This has been the stumbling block for all previous distros, even those with support for anti-aliasing and font-hinting. Finally, the LinuxMint distro team appears to have sorted this out: the fonts render beautifully.

All the other issues in my list are addressed: the system picked up my wireless network immediately and connected as soon as I entered the pass-phrase. As far as I can tell, all devices appear to work, and the power-management stuff works.

Finally, for me the aesthetics are spot-on. The default theme and the choice of colours really works for me. This matters, when you’re spending significant tim in front of the system.

This is a truly excellent distro – far and away the best I have ever used. This one will stay on my laptop and I plan to make the effort to use it instead of Windows.

After the last foray into the world of Linux I swore I wouldn’t bother for another year or so.  Somehow I came across a link to Wubi and decided it sounded too interesting to ignore.

Live CDs are not really practical for doing anything much more than a cursory look and installing to a partition is too much work. Wubi is a very clever ‘third way’, installing a distro as if it is a Windows application, yet actually allowing the OS to start from the Windows boot screen, at full speed.  Clever stuff.  It uses a virtual disk (like VMware), which the Wubi creators admit will make file I/O slightly slower.

Wubi is set up to work with Ubuntu Linux, which most people will experience via Gnome and the rather, er, brown theme.  Ubuntu is also available with KDE but there’s a third alternative, Xubuntu, which uses the xfce window manager. I like this even more because it’s lighter/faster than either of the others, and offers just enough functionality, without getting in my way.  I simply don’t need (or want) a lot of silly 3D desktop effects, nor a hundred different ways of playing media files.

I simply ran the installer and selected Xubuntu.  Some time later, it was ready.  Reboot, select Xubuntu, and there it was.  Amazing!  Even more amazing was the fact that Xubuntu located all the laptop hardware including the sound and WLAN chipsets.  As soon as I selected the network applet, it offered to connect me to my home WLAN.  I was running and connected to the internet in minutes.  No other installer/distro combination has got even close to being this good.  Xubuntu is excellent – I have had no difficulty in installing the extras I need (Java JDK, OpenOffice and Netbeans, for example) via Synaptic.

There is a way to convert the Wubi install to something more permanent using LVPM.  I will probably do this, but only when I’ve sorted out the partitioning of the drive – a chore I’m not looking forward to.

Came across this blog post, while following-up on a semantic-web related Google Code project:

Why I hate Windows Vista (and can’t wait to re-install XP) « The Wandering Glitch 2

I have often wondered: how can the company which brought us C#, the .NET Framework and the CLR possibly be the same company which excreted Vista?

The guy behind the above referenced post is clearly a fan of C# (as I am), but despises Vista (as I do, along with those who made all the colourful comments on his post). I have left Vista on my new laptop, but in a much reduced partition, and have given over the lion’s share of the drive to my copy of XP Professional, which I still think is pretty damn good.

What about the competition? On the desktop, there isn’t much that’s credible. (I’m not considering MacOS because to get that you have to buy the hardware). So I spent (or should that read wasted?) a few hours with some of the latest crop of Linux distros last weekend: Fedora 8, openSUSE 10.3, the latest Mandriva, PCLinuxOS 2007 and probably another one but I can’t be bothered to recall which. None of them impressed me in the least. Only ONE of them (PCLinuxOS) correctly detected all of the important devices on this laptop, including the wireless chipset. Plus they all looked terrible when compared to Windows XP, especially in terms of font rendering, so they couldn’t even seduce me with glamorous graphics.

What really drives me mad is that none of these distros really stands out: they all look virtually the same (Gnome or KDE, plus or minus a colour-scheme and some desktop wallpaper), they all contain more or less the same rag-tag collection of packages, but (and here’s the kicker) they’re all different in irritatingly detailed respects, some of which are downright inconvenient such as package management or filesystem layout! Every year is heralded as ‘the year of Linux on the desktop’, and every year I dutifully have another look, then gratefully boot back into Windows XP and get on with business.

I wonder what’s next for Windows? With Microsoft so chock full of truly bright and talented folk, I’m really hoping that we can look forward to the Windows that Vista should have been. And when they do finally release that, why not give away XP? Or, to avoid the inevitable complaints about anti-competitive pricing, make it 50 bucks? Then nobody except the bigots or fundamentalists will need to waste time with Linux. Go on Microsoft, do us all a favour.