Category: maemo-en

In harmattan, if you want to access certain resources (E.G. Tracker) you need to ask for permission to the Security FW. It is not as bad as it sounds. You just need to add a file in your package explaining what “tokens” do you need. Then depending on where your package comes from and some other ingredients, the security FW decides if your application is worthy of such a privilege.

Today I was packaging a very first version of Mussorgsky in QML which requires the “TrackerReadAccess” token (to query Tracker via dbus). So far I have been working in the command line tool where a aegis-su -r TrackerReadAccess python was enough. But how to do the same when the application is installed?

  1. Create a $PACKAGE_NAME.aegis file under your debian/ directory. There you need to declare what tokens you want for what binary. Example: in mussorgsky.aegis I request “TrackerReadAccess” for “/usr/lib/mussorgsky/”, which is the executable that starts my program.
  2. Put the aegis file in the package. Using CDBS is almost the same as in C++, without the include of

    # Add this to the debian/rules file
    PACKAGE_TARGETS := $(foreach pkg,$(DEB_ALL_PACKAGES),binary/$(pkg))
    [ ! -f debian/$(notdir $@).aegis ] || aegis-deb-add -control \
    debian/$(notdir $@)/DEBIAN/control .. debian/$(notdir $@).aegis=_aegis

  3. Make your package build-depend on aegis-builder (>=1.4)

Then you build your package. It should install nicely and your application run without problems on the device. Still, a couple of remarks:

  • The token must go to a executable script (with #!/usr/bin/python on its first line). python will not work. The path is absolute.
  • After installing the package, do NOT modify the installed files if they request a token. Security FW will discover an unexpected change in the file and lock the device (ops! reflash). Imported files and other resources can be modified.

Happy hacking.


MeeGo still needs a lot of love in the repository business, or in plain words: how to get more programs to your MeeGo device. Things like the universe/multiverse of ubuntu or the “extras-devel/extras” of maemo: People package new software, put it there and everybody else can download it.

If I understand correctly what OBS does, it should be fairly easy. Create your OBS “area”, upload your package, try to build it against the different MeeGo versions and when it is ready publish the URL of your repository with the result [This is not trivial. Is it possible at all?]. Once the things are properly tested, promote that package to a common well-know repository and we all are happy.

That is not the situation now, but that didn’t stop the community to package some very useful software. You just need to dig in “underground” repositories. To save some browsing time for other users, here are my two favorite repositories:

  • Community repo with mplayer, xchat and gstreamer plugins (to play all those formats unsupported in the vanilla installation)
  • Madeo (arfoll) repo with XBMC, a great media center that works nicely in MeeGo… (it deservers its own post)

Other interesting software like Transmission is in the official repos, and MeeGo is a plain linux inside, so the official sopcast client for linux works just following their instructions.

More sources for packages are welcome as comments. Hope this helped.

Tomorrow I go to the Meego Summit FI in Tampere. I will talk there about Tracker, as usual, but this time sharing happily the stage with Adrien Bustany.

The plan is to talk about what Tracker does NOW in a very pragmatical way, explain the limits we have hit, and give a hint on the more or less experimental ideas we have for the future. Less philosophy, less history and much more pragmatic information, compared with my previous talks. Believe or not, I won’t mention “RDF” or “ontology” at all.

Tracker is nowadays ready to use, and Meego (even if it is only for 1.2) will be the first environment where all its potential can be shown with real information. Combine this with QML and pyside (python bindings) and everything is in place to write very easily surprising applications.

Hello planet GNOME, glad to be in this planet after so many years reading it. Probably you were able to skip my Tracker presentations in different conferences… so now I try via blog. And my first post brings good news.

From now on (it has just landed in master), Tracker libraries are accessible via gobject-introspection. You can manipulate the information via libtracker-sparql or write new miners using libtracker-miner in any language with gobject-introspection support (E.G. python). A snipped of code is worth a thousand words:

#!/usr/bin/env python
import gi
from gi.repository import Tracker

conn = Tracker.SparqlConnection.get (None)
cursor = conn.query ("SELECT ?u WHERE { ?u a nie:InformationElement. }", None)

while ( (None)):
      print cursor.get_string (0)

This is a synchronous query to the store. Note that you have a cursor to access the results: they will be retrieved from the DB only when needed. Using this while building a model for the UI should show quite a performance improvement compared with the old DBus API. And if you fancy more the asynchronous way of coding, the code looks like this. You can open the connection, run the query and retrieve the results all asynchronously.

When it comes to miners (processes retrieving information), here is a skeleton of an implementation: a subclass of Miner overriding few methods. Install with the usual dbus files and you have a miner that can be started/stoped/monitored with the Tracker tools.

libtracker-sparql is our recommended way to use tracker, the DBus API can be considered internal, and now with gobject-introspection it is available from different languages than C or vala. Combine this with libpeas (also using GI) and then we can easily write plugins showing information from Tracker into applications like EOG or totem… Interesting!

Mussorgsky in extras-testing

Better later than never. Today i promoted Mussorgsky to extras-testing. Now it needs some thumbs up from the power users to get into the famous extras repo, reaching a wider audience.

If you have used it, and think it passes the Q&A checklist, please give mussorgky some karma!

A couple of weeks ago, we updated Tracker to load its configuration using GSettings instead of its own old-fashioned .cfg files. GSettings is an API to manipulate key=value pairs that abstracts the backend (keyfiles, gconf, dconf…) where they are actually stored.

This was a good change in a lot of senses, but it was breaking our functional tests. We have a suite of tests that we like to run once Tracker is installed in the system. They check if the basic functionality is working fine: the store starts, the miner starts, basic Sparql is processed fine, crawling/monitoring a directory is ok… Some of those tests rely on booting tracker with an specific configuration and with gsettings that isn’t as easy as defining a new XDG_CONFIG_DIR anymore. Well, lets fix the tests then.

My first idea was to hack our GSettings object to load data from the system or from a keyfile, depending on an environment variable: very portable, but is an ugly hack and the code paths start to differ a lot. Then i discovered the DConf profiles. Only works when gsettings is using dconf and needs to install a system-wide profile, but otherwise (in code and test setup) is nice.

It took me more time than expected due some stupid mistakes here and there using dconf:

  • Profile names can only use alphanumeric and underscore characters. A profile like “tracker-test” won’t work (because is not a valid dbus name), but “trackertest” is fine. (Wiki updated now)
  • Do NOT set XDG_CONFIG_DIR in the environment (Bug reported). I guess that the client is using the variable to look for the DB but the writing daemon is not, so the results are not the expected
  • If at the same time you are changing the dconf schemas, make sure to remove old files from /usr/share/glib-2.0/schemas, run /usr/bin/glib-compile-schemas /usr/share/glib-2.0/schemas and remove any old dconf database (in ~/.config/dconf) including “user”. Otherwise if some code is using the old schema, it won’t complain but the values will be wrong.
  • DConf uses the GVariant serialization, so be careful when setting lists.

I hope this saves some time to the next person trying to test something that uses dconf for its settings.

I guess neither Tomboy nor Tracker need much introduction. If you have both of them on your computer, you have probably wondered “why Tracker doesn’t index my Tomboy notes?”. Good point. You are not the only one thinking that;  somebody even opened a bug about it and here comes a solution.

It is a plugin for Tomboy (a NoteAddin in their terminology) that writes the information of the note into Tracker making it searchable on the desktop (E.G. using tracker-needle). The code is available in gitorious. Checkout, compile and install (you can use make install-data-local in src/ to install it on your $HOME). Well, you also need the latest tracker from GIT until we release 0.10.2 (soon) because i needed to add a “Note” class there.

The current status is “It works on my computer” but is safe to try because this plugin only exports data and never touches the original notes, so there is no risk of losing any information. Feedback is very welcome!

Mussorgsky 0.5

Here comes a new version of Mussorgsky, the metadata editor and album art downloader for maemo.

What is new?

  • Fixed bug #8912, crash editing some songs (thanks to the reporter and patient users)
  • Added support for internationalization (thanks to this tutorial and few bits of code from ReSiStance)
  • Translations to Spanish, French (Eric Le Roux), German (Marius Vollmer), Finnish (Kimmo Hämälainen), Galician (Xabier Calvar) and more to come…
  • Fixed the album art path calculation, now albums with special characters in the name are set correctly and appear in the media player
  • Support for WMA, OGG and FLAC (the merits go to mutagen).
  • A brand new cool icon, more maemo style, thanks to Urho Konttori:

Enjoy and as usual, feedback is welcome. We have a bugzilla component (under Extras/Mussorgsky) to report issues.

By the way, If you have a project in python and wonder how to add i18n, give a change to this wiki page: how to internationalize python apps in maemo; i tried to write there as clearly and simple as possible how to do it.

Mussorgsky 0.4

And here comes a new release of mussorgsky, with some features that should help you to have a even more beautiful Album view in your N900 media player:

  • By default mussorgsky uses “artist + album” to search online for the album art. Now it is possible to choose manually the search string to find better results:
  • Added the alternative to unset the album art, reverting it to the default icon
  • The list of songs can be filtered, switching between “all songs” or “songs with incomplete metadata”
  • Albums with special characters in their name (like ‘&’) are now handled correctly.

And few UI improvements here and there:

  • The buttons in the main screen have now shadows with rounded corners when clicked
  • The play, next, back buttons in the edit view come from the mediaplayer theme
  • When a song has no metadata at all, it is listed using its filename

It is already available in extras-devel, hope you enjoy it. And finally, thanks to Eric, Aapo and Claudio for their very valuable comments and help!

Zeitgeist hackfest

Zeitgeist is an “event logger”. It registers the activity of the user on the desktop, what documents uses, when, while talking with who, combined with what… and then different UIs can consume this data to show a Journal of activity, a better relevance in the searches, related documents to the one you are working on and [write your own cool idea here].

Tracker and Zeitgeist are complementary projects: Tracker knows the documents, Zeitgeist knows the activities. We (tracker developers) have been talking with Zeitgeist developers before and have a common understanding about the big picture. Now is time to start fixing details, and I’ll be next week in the Zeitgeist hackfest to work on that.

By the way, with some patience and fixing few details, Zeitgeist and Tracker 0.7 can be installed in maemo5. Catching few events here and there, zeitgeist can grab some basic informacion, and somebody could write a Journal home-screen applet, like the call log, but about all kind of activities/documents… Quite an interesting project.