Planet maemo: category "feed:ea32b6de21a95350e2ab5a183d919201"

ifrade

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 mussorgsky.py 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/mussorgsky-qml.py”, 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 autotools.mk:

    # Add this to the debian/rules file
    PACKAGE_TARGETS := $(foreach pkg,$(DEB_ALL_PACKAGES),binary/$(pkg))
    $(PACKAGE_TARGETS)::
    [ ! -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 myscript.py 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.


Categories: maemo
ifrade

More apps, more apps for MeeGo

2011-05-05 15:30 UTC  by  ifrade
0
0

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.


Categories: maemo
ifrade

Meego Tampere summit

2011-04-14 19:06 UTC  by  ifrade
0
0

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.


Categories: maemo
ifrade

Tracker and GObject-introspection

2011-04-06 08:09 UTC  by  ifrade
0
0

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 (cursor.next (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!


Categories: gnome
ifrade

Mussorgsky in extras-testing

2011-03-29 07:04 UTC  by  ifrade
0
0

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!


Categories: maemo
ifrade

GSettings, DConf and functional testing

2011-03-22 13:21 UTC  by  ifrade
0
0

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.


Categories: gnome
ifrade

Tomboy – Tracker integration

2011-03-09 13:24 UTC  by  ifrade
0
0

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!


Categories: gnome
ifrade

Mussorgsky 0.5

2010-04-23 15:33 UTC  by  ifrade
0
0

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.


Categories: maemo
ifrade

Mussorgsky 0.4

2010-01-25 07:49 UTC  by  ifrade
0
0

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!


Categories: maemo-en
ifrade

Zeitgeist hackfest

2009-11-06 22:13 UTC  by  ifrade
0
0

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.


Categories: gnome
ifrade

Encuentro Linux 2009 – GNOME Day

2009-10-30 18:13 UTC  by  ifrade
0
0

Travel sponsored by GNOME FoundationBack in Helsinki after attending last week, sponsored by GNOME Foundation, to the Encuentro Linux 2009 in Valparaiso, Chile. My original plan was to talk about Tracker in the dedicated GNOME Day; but from the very first day it was clear that the people was very curious about maemo5 and specially the n900, so i decided to talk more about this. I recognize that makes me feel very proud to show an N900 and hear a WOW and see amazed faces.

So, the first talk (in an informal event between organizers and speakers) was about the N900 and some Q&A about it and maemo5. The people were mainly linux enthusiast, so lots of good questions about how to develop on it and the technology involved.

The first of the official talks (during the GNOME day) was about maemo5, what is it, relation with the desktop and how to contribute. I explained also one of the coolest things in maemo (IMHO): all the extras-devel/extras-testing/extras process. Your pet-application (or not so pet when you spend hours and hours on it) can easily reach a lot of users in few clicks. Well, few clicks on your side, and few more on the community side.

The second and last talk was about Tracker. The usual introduction to the basic concepts, and a couple of demos. I was happy to show that using tracker you can get “The last blog post of the user who sent me this song”. Sounds like a lab example, but it mixes RSS, contacts, files and activity, and you can easily see a plugin in totem using this.

About the event itself, the audience was more on the university side of life and people using free software in their companies/work; so a lot of curiosity for new projects and general conversation about open source. There were some people looking for a place to contribute in GNOME; I gave them few hints how to do it via tracker (e.g. writing plugins to Eye of GNOME), so let see if we get fresh blood in the community.

Finally, i want to say thanks to the organizers there, from Encuentro Linux and GNOME Day. They made everything easy, treated me really great, showed me a little bit of Chile and made me feel really warmly welcome. Thanks, guys!


Categories: gnome
ifrade

Maemo summit 2009 & Tracker

2009-10-07 15:58 UTC  by  ifrade
0
0

Tomorrow in the afternoon i flight to Amsterdam for the Maemo Summit 2009. On saturday i’ll talk about Tracker in a shared session with Iridian.  I’ll give big overview about the recently released 0.7 and its role in Harmattan, and he will present our brand new library to use Tracker in QT-based programs: libqttracker.

We have only 25 minutes and too much to explain. If you are curious about Tracker, what can it does (and what not), how to use it in your application, or how you application can get advantage of it, you have 3 regular contributors (Iridian,  Philip , and me) in the conference; feel free to come and talk with us. We are always happy to explain to the world what this triplets, ontologies, RDF mess is all about.


Categories: maemo-en