Category Archives: Linux

Run Docker in an LXD container

I’m a fan of Canonical’s LXD containers—which essentially copy the same approach to lightweight virtualisation enjoyed by Solaris Zones users (and by extension, any illumos-based distros such as SmartOS) for over ten years. One area however where Canoncial is playing catch-up compared to commercial UNIX is in incomplete documentation spread out absolutely everywhere—blog posts, articles, wikis, and so on. Trying to find consistent information on the level of support for Docker running in an LXD container is a perfect example of this. It’s a real mess.

At the time of writing, running Docker as installed from the official Docker repository will fail in an LXD container. This is noted in the following two bug reports:

The advice provided in both reports is to use Ubuntu’s Docker packages:

“Only Docker coming from Ubuntu ( package) works inside LXD containers.

“The Docker coming from upstream is missing a number of patches to make it work, leading to the problem you describe above. We’ve been pushing for those changes to be merged upstream and some were, but we’re not yet at a point where the upstream packages work.”

Otherwise, the prerequisite for running Docker in LXD is that the container is launched with the docker profile applied, and is configured as a privileged container (by default, LXC containers are unprivileged). In the following example, the nextcloud-dev-1 container is created with the default and docker profiles applied, and its configuration is set to be privileged:

$ sudo lxc launch ubuntu:16.04 nextcloud-dev-1 -p default -p docker -c security.privileged=true

Post installation, log into the container and install the Ubuntu Docker package:

$ sudo apt install

From there, Docker should work as expected.

More on privileged containers is here:



Adding Chinese as an input language in Ubuntu 12.04

Quick how-to for those wanting to know.

Under Ubuntu system settings click on “Language Support”:

Ubuntu Language Support settings

Under the “Language” tab in the window that appears go to the “Keyboard input method system:” drop down list, and select ibus:

Enable the ibus keyboard input method

ibus input method enabled.

Log out of the computer and log back in. You should now observe the presence of a keyboard input method icon in the system status area:

Keyboard input method icon

Click on this, and from the menu that appears select “Preferences”:

Ubuntu keyboard input method preferences

In the window that appears, click on the “Input Method” tab:

Keyboard input method tab

Now, enable the “Customize active input methods” setting. From the drop down list select “Chinese” -> “Pinyin”, then click on the “Add” button:

Selecting the Chinese input method

Chinese input method is now added

Now open an application – in this example we are using Firefox. Go to the keyboard input method icon, and from the drop-down list that appears select “Chinese – Pinyin”:

Selecting the Chinese input method

The keybord method input icon should change accordingly, and now typed text should reflect the language:

Chinese input method selected and active

heliod web server: fast then, still fast today

Quick post – as an update to my post here, Jyri Virkki has published a comprehensive set of benchmarks, comparing heliod’s out-of-the-box performance to all the other current popular HTTP servers out there. Considering the last public comparison I could find of what was then Sun Java System Web server vs Apache was in 2007, these new results are highly interesting:

“heliod had the highest throughput at every point tested in these runs. It is slightly faster than nginx at sequential requests (one client) and then pulls away.

“heliod is also quite efficient in CPU consumption. Up to four concurrent clients it is the lightest user of CPU cycles even though it produced higher throughput than all the others. At higher concurrencies, it used slightly more CPU than nginx/lighttpd although it makes up for it with far higher throughput.

“heliod was also the only server able to saturate the gigabit connection (at over 97% utilization). Given that there is 62% idle CPU left at that point, I suspect if I had more bandwidth heliod might be able to score even higher on this machine.

“These results should not be much of a surprise… after all heliod is not new, it is the same code that has been setting benchmark records for over ten years (it just wasn’t open source back then). Fast then, still fast today.

You can read the total run of tests plus information graphs at Jyri’s blog entry:


Incidentally, I came across a blog post from someone who was also apparently on the Sun Java System Web Server group at Sun, who states:

“Since Oracle no longer offers updates to individual users, and refuses to respond to requests for information about how an individual can acquire the updates, I have elected to stop writing about the server. If the moribund Open Web Server gets branched I will happily contribute to the pool of knowledge that exists for it.”

Hmm, maybe someone should give him a heads-up about heliod…

System hard freezes with the AMD FX-8350

As an update to my post here, I observed seemingly random freezes on my system upgraded with the AMD FX-8350. The behaviour encountered was a total freeze of the desktop environment, no response to local keyboard nor mouse, no response to attempting to launch a virtual console, no reponse to pings over the network, and no ability to log in remotely. The only way to restore system operation was to perform a hard reset. Interestingly I could also consistently crash the system running a GraphicsMagick benchmark. Additionally, the freezes were OS-agnostic, occurring under both OpenIndiana and Ubuntu Linux.

Looking around online you can find several posts from folks on AMD Bulldozer rigs with very similar issues (such as detailed here), including a few from people who have rather alarmingly downgraded to a Phenom or Intel CPU as a “fix”, after having received advice to alternately update the motherboard BIOS, faff around with multiple BIOS settings, test and replace the RAM, power supply and hard disk, RMA-ing the new CPU (!?), and on and on and on. Most of this didn’t really add up, and similarly my problems were encountered on a system that was hitherto generally stable using an older-generation CPU (the Phenom II X6 in my case).

To cut a long story short, this quite simply turned out to be the motherboard not stably supporting the FX-8350. Although the ASRock 870iCafe 2.0 is an AM3+ compatible part and advertised as being “8 Core Ready” (to the point of specifically claiming compatibility with the FX-8350), the reality is that the latest BIOS release was in December of 2011 – a major red flag. After upgrading my motherboard to a Gigabyte GA-990FXA-UD3 with the recent F9 BIOS, the system is now stable. And yes, this is using the original PSU, RAM, graphics card etc.

For the OpenIndiana readers, the GA-990FXA-UD3 works fine, although don’t expect USB3.0 support:

Gigabyte GA-990FX-UD3 driver support on OpenIndiana

heliod – Oracle iPlanet Web Server forked as open source

Prior to the Oracle acquisition, I used to be a fan of Sun Microsystems’ web server product, Sun Java System Web Server. It had serious enterprise lineage, a terrific web admin BUI which beat the pants off Apache, and was free, free, freeeee. Needless to say, that all changed once Oracle bungled onto the scene, along with a whole bunch of other stuff.

A little known fact however is that Sun had open-sourced the core of their web server prior to Oracle taking over, releasing it as the Sun Open Web Server. But other than a few headlines at the time of the announcement (such as here) everything went very quiet shortly after – and no doubt I am sure due to Oracle not wanting to advertise the zero-cost availability of the guts of their “re-branded” megabucks flagship web server, now known as Oracle iPlanet Web Server.

So, imagine my surprise to find that one of the original engineers behind Sun Open Web Server (Jyri Virkki) has forked the code open-sourced those three or so years ago and is now actively developing it. Yes, it lives, and is known as heliod web server:

Francois Dion has a great write-up here as well:

Attempting to launch heliod on OpenIndiana oi_151a x86, I was met with the following error:

$ ./bin/startserv parsexml: fatal: open failed: No such file or directory
./bin/startserv: line 63: 12686: Killed
failure: temporary directory  is not writable by user root

This is due to the library/icu package not being present – so install it if it’s missing and it’ll start up fine:

Installing the ICU package on OpenIndiana

$ ./bin/startserv &
[1]	3692
dave@mymachine:/opt/heliod/https-testserver$ heliod Web Server 0.1 B03/08/2011 21:59
info: CORE3016: daemon is running
info: HTTP3072: http-listener-1: http://mymachine:80 ready to accept requests
info: CORE3274: successful server startup

Mac OS X killed the Linux desktop? I must have missed the memo (and so did Google)…

Bizarre little opinion piece by Miguel de Icaza proclaiming the death of the Linux desktop. A little excerpt:

True story.

The hard disk that hosted my /home directory on my Linux machine failed so I had to replace it with a new one. Since this machine lives under my desk, I had to unplug all the cables, get it out, swap the hard drives and plug everything back again.

Pretty standard stuff. Plug AC, plug keyboard, plug mouse but when I got to the speakers cable, I just skipped it.

Why bother setting up the audio?

It will likely break again and will force me to go on a hunting expedition to find out more than I ever wanted to know about the new audio system and the driver technology we are using….”

Here’s my true story. I have a number of Ubuntu Linux desktops, and all are a joy to use. Ubuntu Linux has been fast and stable. The Unity interface is quite lovely (after some initial reservations). Software package installation is incredibly slick (and has been for years), and I couldn’t be happier with the quality of desktop applications. And I’ve never had a problem with audio support either for that matter. I switched from Mac OS late in 2007, partly because the money I was paying for the privilege wasn’t delivering in the areas where Ubuntu excels – and its ties to proprietary hardware (or beyond proprietary as Scott McNealy would say) generally make it a proposition for the well moneyed.

I’ve maintained hundreds and hundreds of desktop Windows and Mac OS computers in my time, so I’ve got a fairly good handle on the pros and cons of each, especially with regard to stability and ease of use. Is Ubuntu a superior desktop OS to Windows? No question. Even if Microsoft were to drop the price of Windows to zero (as if) it would still be an average product. Is Ubuntu comparable to Mac OS X, for common productivity and entertainment activities? Absolutely, especially in its current LTS incarnation.

So: I’m not sure where I’m going wrong, but Ubuntu has been nothing short of a fantastic desktop OS for me. The irony is that I don’t use it on the server, preferring Illumos/OpenIndiana due to a number of compelling advantages from its OpenSolaris roots. Why does the author feel the need to make negative comparisons to Mac OS? Why even bring up the old bugbear of Linux on the desktop at all?

I think I hear an axe being ground.

Incidentally, Google apparently didn’t get the author’s memo either…

Java 7 update 6 arrives, JavaFX now supported in the JRE for Linux

Quick post – the latest update to Oracle Java 7 features Mac OS supported as an equal peer to Windows and Linux – but perhaps more interestingly now includes full JavaFX runtime support in the JRE for Linux. Having cross platform support for Oracle’s next-generation Java UI does finally open up some interesting possibilities for better Java client interfaces than what we’ve generally seen so far.

Screengrab of the JavaFX Ensemble demo app running happily in Firefox on Ubuntu 10.04 x86:

JavaFX in Firefox on Ubuntu

Disable conversation view in the Gmail Android app

Actually, the title is total linkbait because you can’t. Google would rather inflict the wretched conversation view on you whether you like it or not. This might sound peculiar, but perhaps less so if you read “GMail: designer arrogance and the cult of minimalism“, and also this legendary rant from one of Google’s own prominent software engineers (Steve Yegge), of which a relevant excerpt follows:

“But when we [Google] take the stance that we know how to design the perfect product for everyone, and believe you me, I hear that a lot, then we’re being fools. You can attribute it to arrogance, or naivete, or whatever — it doesn’t matter in the end, because it’s foolishness. There IS no perfect product for everyone.

“And so we wind up with a browser that doesn’t let you set the default font size. Talk about an affront to Accessibility. I mean, as I get older I’m actually going blind. For real. I’ve been nearsighted all my life, and once you hit 40 years old you stop being able to see things up close. So font selection becomes this life-or-death thing: it can lock you out of the product completely. But the Chrome team is flat-out arrogant here: they want to build a zero-configuration product, and they’re quite brazen about it, and Fuck You if you’re blind or deaf or whatever. Hit Ctrl-+ on every single page visit for the rest of your life.”


So – if you’re like me and want to check out a great email app for Android which doesn’t use conversation view and includes all the bonus goodies the Gmail app is missing (think Thunderbird for Android), you should check out K-9 Mail:

The really nice thing is that if you want to support the developers of this fine application, you can pay a tiny sum for the deee-luxe version, which goes by the name of Kaiten:

Kaiten Mail running on Android

Modifying the message date and time format in Thunderbird

Quick post – date and time format of messages displayed in Thunderbird can be controlled in two simple ways. This is useful if you’ve noticed Thunderbird using the bizarre US format (e.g. MM/DD/YYYY). This is on OpenIndiana, but is just as applicable for any Gnome 2-based environment.

First, the “LC_TIME” variable can be set in a user’s profile file (e.g. ~/.profile if using bash or ksh). Let’s specify New Zealand English:

export LC_TIME="en_NZ.UTF-8"

Log out and log back in, fire up Thunderbird and messages should now be using the DD/MM/YYYY format.


The second method is much simpler. Thunderbird actually uses the system language settings for message date and time display formatting. So, if you’ve never noticed that little language setting before on the Gnome login screen, now would be the time to change it to the language of your choice:

OpenIndiana Gnome login screen

Thunderbird will then use a sane format.

xterm on Ubuntu 12.04 manages to party like it’s 1989

In one of those moments when the occasional rough edge in Ubuntu’s otherwise highly polished desktop environment sticks out like a sore thumb:

xterm icon in Ubuntu 12.04

xterm, you uuuuuugly. Still, not too hard to replace the icon with something a bit less jarring.