The site uses cookies that you may not want. Continued use means acceptance. For more information see our privacy policy.

Debian’s init Options

A look at the choice that Debian faces in choosing a new init system and process.

The Debian Project will choose a new default init system for its next major release (codename Jessie). The debate details (Debian Wiki: Debates: initsystem) include the following proposals:

  1. sysvinit (status quo)
  2. systemd
  3. upstart
  4. openrc
  5. One of the above for Linux, other(s) on non-Linux
  6. Multiple on Linux, at least one for every other kernel

The chief goal in switching? Bring modern boot functionality (speed and lower resource use). Others include lowering the bar for packaging and maintenance, and taking advantage of newer kernel features.

The matter of choosing an init system mainly deals with the amount of work and amount of benefit available. Unfortunately, some aspects of this debate must focus on other things.

The main contenders, systemd and upstart, both have at least one strike against them:

  • systemd looks technologically superior, but that superiority makes it a non-option for at least some non-Linux kernels (owing to using Linux-specific features), and support for other kernels would require much effort. It also takes a different approach to being pid 1, namely rolling in some functionality that has long been outside of init‘s domain.
  • upstart can be supported more readily, but similar if slightly less effort would be required for non-Linux. Worse, Ubuntu’s stewardship of upstart hampers it with the Canonical Contributor License Agreement problem.

A Contributor License Agreement basically states that by signing it, you grant rights of your contributions to the project maintainer. But the Canonical CLA goes a step beyond, in claiming for Canonical the right to relicense the contributions in a non-free manner.

In the Free/Open Source world that makes it as attractive as poison ivy. Also important, some who contribute as part of their work may actively be barred from participation. A company that sees benefit in open source will probably see hostility in their employee’s work being tied into a CLA of this sort (or any sort).

It all adds up to one difficult decision. The fact that both major contenders do not reduce Debian’s workload means the decision will boil down to technical merits. That makes systemd more likely.

What of non-Linux, then? openrc or sticking with sysvinit both seem plausible. Debian likely will not abandon their work with other kernels, so they will likely bite their tongues. Debian will put up with the extra work of dual systems for now. That will also mean that their Linux decision will remain a technical hybrid for the time being.

But not forever. Post-Jessie, I expect Debian will re-evaluate and hopefully find a more useful option to shed some of the extra weight they will take on in the short-term, whether that means configuration conversion tools, or something else.

The main reason that upstart seems unlikely, Ubuntu and Canonical never took the time to lead the way on non-Linux and while some Debian packages might have easier times adopting upstart configurations, the feature set of systemd seems to be a bit more powerful.

Cleaning $HOME: XDG Base Directory

An overview of my experience cleaning out my home directory to improve its compliance with the XDG Base Directory Specification. Standards: XDG Base Directory Specification is the main document at hand here.

Every now and again the folks that work on free software decide to rearrange a specified or de facto standard directory/file structure with an eye on improving the state of the platform. XDG-basedir is one such attempt, but there have been others like the advent of /run.

The XDG-basedir basically stipulates three locations:

  • $HOME/.config or $XDG_CONFIG_HOME
  • $HOME/.local/share or $XDG_DATA_HOME
  • $HOME/.cache or $XDG_CACHE_HOME

These are meant for your configuration files, data, and caches. These locations provide for some flexibility and improved organization over throwing everything in your $HOME. For example, your caches may be kept in a virtual path that points to RAM or on a SSD that is faster than your regular storage. Or your configurations may be on some networked disk.

Lots of applications support this specification in some way, though some more than others. To take advantage of this specification requires first looking to see what dot folders and dot files (ie, those named like .foo) exist in your $HOME. While you’re at it you may look in the above-mentioned folders to see what applications have already set up shop in their new locations.

Some applications will have moved their baggage themselves. Other applications implement the standard to whatever degree, but give precedent to the old location, the old dot files. They do this out of pragmatism. They don’t have to write a migration scheme, and they don’t confuse their long-term users who may not know or want to know about these new locations.

For these applications, moving the files yourself (or if the data/configuration/cache does not matter, simply deleting the existing file(s)) works fine.

For others, those that do not support the specification, you can often still move them if you define their environment to point to the proper location(s).

An example of the latter is Mercurial, the distributed source control system. It does not support XDG-basedir, but it does support the environment variable HGRCPATH. By properly setting it, export HGRCPATH=${XDG_CONFIG_HOME}/hg/hgrc (or the full path if you do not have XDG_CONFIG_HOME defined), you get the benefit of the specification without Mercurial actually supporting it.

In cleaning my own $HOME I found this sort of fix was useful for about six applications including vim and gnupg.

Still other applications do not support an environment variable to specify where their files live. Some of these will accept configuration file locations from the command line. For these, setting shell aliases or functions may help. I found this useful for only one or two applications.

Some applications have support for it in versions newer than I have installed. I let these wait, glad to know of the effort.

And quite a few applications have open (or closed) bugs for supporting XDG-basedir. In most cases this is less about the technical work for the specification and more about deciding if and how to support it. At least a handful of the applications I looked at were reticent to support it at all. Others said support would be welcomed given enough background to show what would/not break and with a patch available.

But several argued about how far they would support it. This mostly came down to applications willing to move their lot into $HOME/.config (or wherever $XDG_CONFIG_HOME), but not split out cache and/or data. It seemed this was more often argued against for portability reasons (ie, they support Microsoft Windows operating systems and want to allow their users to move their files between them or have them on one common drive without issue).

And in rare cases files are hard to nail down. They sort of configure, but they’re sort of data. Or they’re sort of data, but they’re sort of cache. (Hopefully never all three in one.)

On the whole I was able to reduce my number of dot files by about 15, and the number of dot directories by about 60.

At least a full half of the files and folders I lost were obsolete entries from applications that I no longer use. Another chunk were applications that wrote their configurations even though I used all default options. The rest were from applications that now support XDG-basedir or had other acceptable workarounds for moving their files.

I find this an interesting topic to look at given that the change to applications is not overly complex, but it affects a wide variety of applications. I also like having a cleaner $HOME as it makes finding things easier.

Maybe my next step will be to audit my XDG directories as I’m sure they contain some files from applications I no longer use.

Canonical’s Place

A look at Canonical and Ubuntu and the future of UI on Linux.

Canonical: the main commercial force behind the Ubuntu Linux Operating System. Lately some bad blood flowed in the greater free/open source community over decisions and directions in Ubuntu; these decisions fell from the sky like bombs, in that the larger community received no communiques indicating the missions or their timing.

Mir fell out of the clear blue just recently. The project aims to replace the X Window System, one of the longest running projects and biggest workhorses of desktop UNIX systems. The age and legacy support of X mean some of its design blocks progress for free desktops and other free computing devices.

But Wayland already staked their claim to be the replacement. A lot of positive effort continues to go into Wayland and supporting it on existing Linux applications. The existing contributors wear boots with the mud of X encrusted on them. The community knows the project by name, much like the Compiz put X compositing on the tip of our tongues some years back.

This development comes as one of several incidents in which Canonical failed to work with the community, or at least clue the community into its plans. The inclusion of Ubuntu Shopping Lens, searching commercial websites directly from Ubuntu raised the question of Ubuntu’s commitment to privacy. Ubuntu One, a cloud storage service among other features, raised questions about Ubuntu’s approach to markets more generally. Other projects like Unity and Upstart (the main Ubuntu UI and a replacement initialization system, respectively) made the community feel like Ubuntu decided to go it alone on key parts of their system.

Mir’s announcement again raises questions about whether Ubuntu and Canonical want to be part of the community, or a parallel entity. They once again failed to engage with the community, and instead the community finds out about the direction Ubuntu moves after the fact. But maybe Mir will be different.

The best difference to hope for: a driver specification that allows competition. If the next generation of display server for Linux keeps its driver specification short and sweet, avoiding the possibility for the proprietary drivers to become bloated messes that do too much, they truly bless us with their presence.

For too long a performant driver meant a proprietary one. That meant ceding too much control of the system to said driver. In short, it grew into letting lobbyists write the laws. A tainted system. More importantly, it meant X entrenchment. The driver worked for X and only X. Writing a replacement for X would either require being too X-like or relying solely on free drivers (missing out on performance). The latter stands as the current state for Wayland and Mir.

But if Mir (or Wayland, or both) provides new driver models that leave us with a small driver with minimal-yet-performant capability, and the rest of the code can be open, that will place the whole system on much firmer ground. We would face a day where we could write a non-X, non-Mir, non-Wayland system and still be able to fall back on proprietary drivers for their performance. It might also encourage the (partial or complete) opening of the proprietary drivers, with far less code for lawyers to worry over.

At present the prospect remains dim. But as both newcomers continue to mature (assuming that Mir gets the resources needed from Canonical), there will inevitably be compatibility layers between them, and some convergence may occur around the driver space. It remains possible that better free software can come of this. I hope it does.

Canonical ought to lead the larger community, rather than stalk it as prey. That leadership means working with the community, contributing to it where possible, and where the community and Canonical must diverge, they should diverge only to the least possible distance. That would make Mir a fork of Wayland, or maybe Wayland plus some special extensions.

But even if it couldn’t be, the least possible distance would still require some feedback to the Wayland developers. Where and why does their model fail? And why couldn’t those details come out months ago, at least when Mir started? If valid concerns exist, give them voice. As it stands, from my reading on the situation, misunderstandings brought the concerns. That’s lamentable.

We need more companies doing Linux hands-on. Canonical deserves stewardship that grows it and the software community. Times like these allow companies like Canonical to define themselves, and I hope they will learn the lesson and move forward with the community.