← Back to team overview

elementary-dev-community team mailing list archive

Bugfix incoming; CMake needed


Hey guys,

I have good news on the annoying bug
I wrote a wrapper to Debian's alternatives
system<http://wiki.debian.org/DebianAlternatives>that (among other
things) happens to work around this BAMF bug. The code
can be found in
I can't integrate it yet because it has no build system.

The real purpose of the wrapper is making abstract commands like
"x-terminal-emulator", "x-www-browser", "gnome-text-editor" launch
user-preferred application for the task instead of using a system-wide and
often implicit default that alternatives system provides. It uses
DE-independent FD.o-standardized lookup by mime type association for web
browsers and text editors; there doesn't seem to be a DE-independent way to
set preferred terminal emulator so it checks if XDG_CURRENT_DESKTOP and
it's GNOME, Unity or Pantheon it reads the relevant GSettings key. In case
it fails to determine user's preference for the application (e.g. there's
no handler for terminal lookup in KDE), it falls back to what would be used
if the wrapper wouldn't be there at all.

IMO this wrapper would be useful in Ubuntu itself, so I'm going to propose
it upstream as soon as it gets a build system. It uses just one Granite
call - "Granite.Services.Logger.initialize (Environment.get_prgname ());" -
which is obviously not essential; if it can be hidden behind conditional
compilation depending on Granite presence we might get it in Ubuntu by
default (I doubt they'll be enthusiastic about shipping Granite in the ISO
just for this).

All the wrapper is missing now is CMake and Debian packaging that depends
on it. I will handle Debian packaging, but could somebody pleeease do the
CMake part? All I need is installing the binary to
/usr/lib/user-specific-alternatives/ and conditional compilation of one
line; there are no constants to configure or anything like that, and build
dependencies are just Glib, GIO and Granite. Could anyone help me out with

Sergey "Shnatsel" Davidoff
OS architect @ elementary