Planet Collabora

September 02, 2010

Youness Alaoui

Update on PSJailbreak linux kernel (for N900 devices)

Hi all,

For all those who kept bugging me on IRC about “what’s your status” and “when will you release it”, etc.. I’d like to give you a quick status update on my project :

First, this is NOT and I repeat, it’s NOT a port of PSGroove for the N900.. I started my project long before PSGroove was released, and my code has absolutely nothing to do with theirs and we don’t share any code in common. It is NOT a port, it’s a different implementation of the same exploit!
Secondly, it’s going pretty well so far, I finished writing it, all the code is there, and I’m testing it but I’m still getting some issues, for some reason the PS3 isn’t accepting the JIG, I hope I can get this fixed soon, so please, everyone just be patient, I will release it when it’s ready! But the good news is that it’s doable apparently!

For those who read my previous post, here’s an update :

- The kernel OOPS I was getting on linux was because my ‘hub’ was a high speed one, and when a device gets connected, the reply to GetPortStatus ommitted the ‘high speed’ flag in the response.. apparently, a high speed hub can only have high speed devices plugged into it, you can’t plug full speed or low speed devices in a hub, otherwise, your linux kernel crashes! It’s a use case the kernel developers didn’t think of (or didn’t find a way to test it). I will also soon release the code to reproduce that oops so people can look into it.

- I was able to get and set the address on the controller, but I had to add two new functions to the usb-gadget API. This means that you will eventually need to flash your device’s kernel to get advantage of the new functions.

- I figured out how to send a NAK in response to a IN interrupt.. you simply don’t queue anything, the controller apparently takes care of that automatically for you! and I had to read almost all of the controller’s code to figure that one out!

By writing this exploit as a standard linux driver, this means that my module can be used on any other linux-enabled devices.. this means not only the N900, but also the 770, N800, N810, Android phones and future Meego devices. It might need a little porting for some devices though, but it should still work…

That’s it, I’ll keep you informed on how it goes. Hopefully, we’ll soon be able to run homebrew on our PS3 simply by plugging our N900 to it, what a wonderful device it is :)

KaKaRoTo

by kakaroto at September 02, 2010 11:24 AM

August 31, 2010

Thomas Thurman

xzibit 0.01 - release

xzibit 0.01 is now available for download. xzibit is a per-window VNC system; its development is supported by Collabora Ltd. This version is just a taster of what's possible: there's a fair amount more in existence that you won't see unless you play around. More of it will be more easily visible in later releases.

Do read the README for instructions on setting it up: the checks in autotools for required programs are by no means perfect yet.

How this is different from X forwarding:
  • Most importantly, because it works (or will soon work) over Telepathy tubes, so you can share windows with your chat contacts.
  • Less importantly, it uses VNC so that it's platform-independent.  There is only an X implementation at the moment, but eventually I'm hoping there'll be Windows and OS X implementations as well.
Other details
  • I have proposed a talk on xzibit at LCA in January.  I don't yet know whether it will be accepted.
  • The protocol is explained here, and you can see a diagram explanation here.


You may clone the git repository from here.

I'm now working on 0.02, which will have proper working Telepathy support.

August 31, 2010 03:50 PM

Marco Barisione

Feature complete custom ringtones

I finally released a version of “Custom ringtones for your contacts” that implements every basic feature I wanted to have for a first stable version, so I think it deserves being called 1.0 :).
Apart from some bug fixes, this new version is translatable and allow you to set a ringtone for callers with a hidden phone number and for contacts not in your address book. The new settings are available from the address book settings dialog.

The settings dialog with the extra ringtone buttons
The settings dialog with the extra ringtone buttons

For now there is only an Italian translation, but any help to get more is appreciated. Don’t worry, there are just 8 strings to translate!
To propose a new translation just go to the Transifex component page, download the .pot source file, add the translations to it, login to Transifex, and upload the file by pressing “Add a new translation” and setting as target file “po/XX.po” (where “XX” it the language code, for instance “fi” for Finnish, “de” for German, etc.). If you don’t know how to use gettext translation files I suggest using Poedit or gtranslator.

The custom ringtones application is now available both from extras-testing and from my personal repository:

Install per-contact-ringtones
Install from my personal repository
(follow the link on the N900 browser)

Update: I released version 1.0.1 containing some new translations: German (by NightShift79), French (by Alban Crequy), Brazilian Portuguese (by Humberto Sgrott Reis) and Swedish (by Andreas Henriksson). I will add more when I receive more.

Update 2: I released version 1.0.2 containing a crasher fix and some new translations: Albanian (by Ilir Gjika), Dutch (by Daniel Holsboer) and Spanish (by Fernando Borrego Polo).

by barisione at August 31, 2010 02:38 PM

August 30, 2010

Youness Alaoui

PSJailbreak USB Gadget kernel driver

Hi,

***

For those who don’t want to read a long post, here’s the summary : I’m trying to write a USB gadget driver to make my N900 act as a hub, I don’t know if I can get it to work because the kernel subsystem doesn’t seem to allow me to do it. If someone knows how to get a request’s destination address, or override the usb_gadget_ep0.c SET_ADDRESS, or knows of limitations that would prevent me from making it work, let me know. I also have ‘working code’ for the usb hub now, but it seems that when I simulate a device insertion, my computer’s (not the N900′s) kernel crashes, so I’m a bit stuck.

Read the rest if this article interests you.

***

Some of you already know about the PSJailbreak, for those who don’t, it’s a USB dongle that exploits the PS3 and allows you to run unsigned packages (homebrew).

Some people tried (and some succeeded) to create a ‘cheap’ clone of the dongle by reverse engineering what it does, and rewriting it into some ATMega microcontroller.

My idea was to use an existing programmable linux-based device (my N900) to act as the dongle. So I started looking inside the kernel’s source to understand how I can achieve that. I found that the kernel has a ‘usb gadget’ subsystem for writing gadget drivers (in other words, a driver to make your device act as a slave/peripheral) so I started writing a gadget driver.

I must say it wasn’t an easy task (for someone with ~zero kernel experience) especially considering that the only ‘real’ documentation I found was the undocumented source code of other gadget modules…

Anyways, the PSJailbreak dongle emulates a USB Hub with multiple devices getting connected/disconnected to it, so I tried to write a driver to emulate a USB Hub, I thought that it would be a great idea and useful, since it could be used in order to allow my N900 to be in PCSuite mode *and* mass storage mode at the same time, without having to make that annoying choice everytime I plug it into USB.

Anyways, I first realized that I can’t just insmod/rmmod drivers to emulate a device getting connected/disconnected, because the usb_gadget_register_driver doesn’t allow us to register more than one driver. Ok, makes sense, I can live with that, but this means that I’ll have to modify the kernel to make sure the usb_gadget_register_driver redirects to my hub’s code to simulate the insertion/removal and let my hub driver be the only one registered on the controller. Anyways, for my use case, I thought I can just write all the code for all these ‘virtual devices’ directly into my driver for now.

Second issue I came up with is that the drivers never get a SET_ADDRESS.. that’s handled internally by the kernel (drivers/usb/musb/msub_gadget_ep0.c) which means that even if I say “new device connected”, if the host sends me a SET_ADDRESS, I won’t get it, so I can’t map addresses to my virtual devices… but not only that, but I found no way whatsoever to find what is my current address, or to which address a message is being sent… I suppose it’s all being handled by the usb subsystem.. but I can’t find a “if (destination != self->address) return; anywhere in the code either.. which makes me think that it might be handled by the controller itself.. (since we do receive messages destined to other devices, if we’re connected to a hub, it has to drop those somewhere), but I don’t know, either the controllers don’t let me do what I want, or the kernel’s USB subsystem was never written to allow for USB hubs to be created. I figured that if I could at least simulate a device being connected, I should be able to find out how the kernel would handle the newly received SET_ADDRESS or the requests being received to the virtual device… then maybe I would understand a bit more how to do it and whether or not it’s even possible.

Call it bad luck, but now, whenever I plug my N900 (with my driver module loaded) into my laptop (linux debian, kernel 2.6.32-5), my laptop crashes.. it completely freezes up, the kernel panics, and then I’m forced to reboot it.. I’ve looked at what messages I’m sending/receiving from the N900′s dmesg (yes, the N900 is perfectly fine and doesn’t kernel panic), and I compare it with the USB dump of a generic hub being plugged into the computer, and I see no difference, I’m doing exactly the same! And yet, my kernel segfaults, and now, I’m stuck as I don’t know how to move forward.. I only got a partial stack trace, I know the khubd thread gets the segfault, and that it’s when it’s trying to build a URB…  there also seems to be some error being reported by the power/battery manager or something, so maybe it has something to do with bad/wrong values of self-powered/power needs of the device.. but that’s it…

I went to the #kernel channel on freenode, asked about this issue, asked how to get proper debug/stacktrace, and asked how a usb gadget can know its own address, but noone seems to care/answer/be awake. So that’s why I’m posting this on my blog.. first, to let everyone know what I’m doing and how advanced (or not) I am in the project, but also to ask people for help, if they know of a solution to my problem, let me know in the comments. Please, do not post comments like “I have a PS3/N900/something if you need help testing”… I don’t.

Finally, I’d like to finish by saying that I do not condone piracy. The PSJailbreak is an exploit that jailbreaks the PS3 allowing you to run unsigned code, it opens the door to homebrew and yes, also to piracy, but it’s each individual’s choice to either use it for legal applications or not. It is fair use to be allowed to make backups of your expensive games (and I’ve got about 50+ disc-based games). I’m doing this project only because I like the challenge, I thought it would be a good experience for me to dive a bit into the kernel code, and I found it entertaining. I also wanted to showcase the power of the N900 even more by making it become any usb device I want.. even a PSJailbreak clone, I don’t think anyone has used it in this manner yet.

Thanks for reading!

Update : I got a stacktrace from the kernel crash!

KaKaRoTo

by kakaroto at August 30, 2010 07:59 PM

Travis Reitter

Meta-contacts in Empathy (and beyond!)

We've finally closed Gnome Bug #460647 (Empathy: Support metacontacts)!

Let's get right to the pictures:

metacontacts-linking-dialog

This is our "Link Contacts" dialog. Selecting a number of contacts on the left side designates which contacts will be included in the Individual (read: meta-contact) at right.

We currently auto-link contacts with the same service ID (foo@example.org) contained in multiple accounts. In the future, we're going to push as much into auto-linking as possible. My goal is that most users would never need to use this dialog. Until then, this dialog is how you designate meta-contacts in Empathy.

metacontacts-edit-dialog

If you accidentally link together contacts you didn't mean to, you can simply open the Individual's info dialog and hit Unlink to start over.

metacontacts-persona-menus

One of the first benefits of meta-contacts is pulling together multiple modes of contact for a person into a single place. So if you've got a friend with separate work and personal IM, you can be an upstanding citizen and only send funny cat pictures to their personal IM address. (If they sign on to both at work, at least you tried your best).

We've kept the 1-click Chat/Audio Call/Send File/etc. actions for the (I think, more-common) case that you just want to communicate and you don't care about the specifics. This just uses any valid (ie, online) account for that Individual.

Thanks

This meta-contacts functionality is all possible thanks to the Folks project. It's a collection of libraries (so far, all distributed together) that collect contact information through various backends (Telepathy so far; many more to come) and aggregate Individuals (ie, People). Empathy was our starting point, but we really plan to integrate very well into the Gnome desktop and beyond. Think: typing -Alice- to start a chat with Alice through the Gnome Shell.

I'll discuss Folks in greater detail in future posts.

I'd like to thank my colleagues Philip "code factory" Withnall for helping with Folks development/Empathy integration and Empathy maintainer Guillaume Desmottes for letting us know exactly what we broke in each commit. And, of course, a special thanks to our employer, Collabora, for sponsoring us to work on this full-time.

Try it now!

Since you're no doubt very excited about these new features in Empathy, you can use them Right Now™ in version 2.31.91 (also coming to Debian experimental shortly). Be sure to file any and all bugs you run into, so this will be as solid a stable release as any other!

If software bugs have you leaping onto the nearest elevated furniture, no problem -- Empathy will, of course, by included in Gnome 2.32, coming to a friendly Linux distribution near you!

August 30, 2010 07:46 PM

August 27, 2010

Robin Burchell

Another day, another itch.

(First, an apology in advance, this is a bit of a braindump, and as such, isn't very well structured.)

I've recently been diving into SQL support in Qt, provided by the QtSql module. Specifically, I've been looking into providing IPC on top of QSqlTableModel.

(For those of you who aren't too technically oriented, I'm trying to have multiple processes have the same basedata store, and know when another process modifies the data in some way, to keep all processes in sync).

While I won't go into details on that now, as it isn't complete, it has been an interesting journey, and I think I've found yet another few things I want to add to my todo list. You see, QSqlTableModel is a great class, but it has a number of shortcomings.

It can't be used in a tree

This one is pretty obvious. It is, after all, a table - not a tree. However, making it represent a tree wouldn't be all that difficult I think (a customised implementation of QAbstractItemModel::parent() method looking at e.g. the 'parent' column of a table and returning a QModelIndex to the appropriate row or similar).

I don't believe that this can be solved in the current implementation, though, as QSqlTableModel inherits QSqlQueryModel which inherits QAbstractTableModel - meaning there's a non-trivial amount of tableness about the current implementation.

For some data (think a task manager: you might have subtasks under a task), this is an annoying limitation.

Incremental fetching isn't always supported

I'm actually not positive on this point, but it looks like incremental fetching is left up to the database driver, meaning that on some database types, you won't have incremental fetching.

On a large database containing thousands of rows (or gigabytes of data) this could be a very bad thing if I am correct.

Partial updates aren't really supported

If you delete a row from a database table, what would you expect the client to do after deleting that row?

I know I certainly wouldn't expect it to re-run the query to refetch the data, yet that's exactly what QSqlTableModel seems to do. Not nice.

This also happens on any other conditions of alteration to the data, which strikes me as being rather inefficient.

Furthermore, it isn't really possible to update values on the fly; this proved to be quite an annoyance when implementing IPC notifications of updates. QSqlQueryModel internally contains a QSqlQuery. QSqlQuery has a ::value() method, to retrieve a QVariant containing the data in a given row of a result set. It doesn't, however, provide any method to change that data (even in memory), meaning that once again, a full reload is the only real solution to something else changing the data out from under you.

This isn't really so unexpected, as it's a bit of an odd use-case, but it has made my implementation trickier than I'd wish.

Conclusion?

I wish. I don't know what to do, yet, but I suspect it's going to involve writing code.

Thoughts welcome.

by Robin Burchell (viroteck@viroteck.net) at August 27, 2010 01:10 PM

August 25, 2010

Eitan Isaacson

Google, I Hate You Because You Are Awesome

When Google isn’t alienating us by pushing social experiments down our throats, and doing evil, they are often awesome. Nevertheless, I started thinking this month how I will take my Google Apps domain and start hosting it myself: mail, chat, calendar, contacts, etc.

Today they integrated Google Voice with Google Talk in GMail. I still don’t know how they are doing it, are they connecting to PSTN through XMPP? In any case, I feel all excited and giggly about it. Maybe I will keep my Google Apps account after all..

It’s always been another one of my personal technological gaps. How do I travel and remain reachable on my US number? I could spend months on end in Israel, and it’s always nice to have seamless access to my US number and voice mail. SIM cards are so cheap abroad, the phone numbers assigned to them are arbitrary, I should be able to punch them in to Google Voice and just have people reach me with my usual number (this feature is yet to come). In short, unify and clean up the mess that is telephony and voice mail. Hopefully, if all this magic is through XMPP, we will have sexy integration in Empathy as well.

So at this point, not only has this delayed my disengagement from Google, it has brought me a step closer to getting an Android phone (Apple, stay classy and ignore Google Voice).

This isn’t conclusive, I don’t welcome our new overlords with open hands. My trust is being eroded with age, I just need to hear another horror story about political repression or Google evil doing to decide on personally hosting encrypted everything. Even if it means I will have to spend a few years of my life setting up Asterisk.

by Eitan at August 25, 2010 06:13 PM

August 24, 2010

Christian Schaller

GStreamer Conference 2010 Update

So the preparations for this year GStreamer Conference 2010 is progressing at a healthy pace. Today I put the list of speakers and abstracts online, which combined with the conference timetable should let you plan the event pretty well.

I recommend everyone to look over the list of speakers and abstracts, because I am sure there will be things there everyone will find interesting.

I would also like to remind everyone that we got some great talks happening as part of CE Linux as well like Benjamin Gaignard of ST Ericsson talking about Android and GStreamer, Stefan Kost of Nokia talking about Meego and GStreamer and finally Arun Raghavan from Collabora Multimedia speaking about Pulse Audio. So make sure not to miss the CE Linux days.

You find registration information on the main conference website and be sure to register early as space is limited, so if you wait to long you might not be able to register at all.

by uraeus at August 24, 2010 11:35 AM

August 23, 2010

Eitan Isaacson

My Perfect Data Backup Solution

This might already exist, and I might just be uninformed. When I look for a backup tool that will do what I need, usually I get a scoff in the form of “rsync, dummy”. My computing equipment typically consists of a laptop that I use everywhere, and sometimes even at home, a headless computer at home that I use mostly for music and movies (with a projector), and several external hard drives with varying capacities.

These are my requirements for an awesome backup solution:

  • When I connect to my home wireless network I want it to automatically start syncing and backing up data to the headless computer.
  • I don’t want it to saturate the network or be too taxing on disk I/O, so that regular computing tasks could be resumed unhindered.
  • I want it to be resumable, so if I leave the house while it was syncing some huge file, it will just continue where it left off when I get back home.
  • A visual status indication of whether a sync is taking place. A way to pause it.
  • I want it to have 3 different kinds of backup modes for 3 different types of data:
  • Home folder
    Snapshot based backups, that allows me to easily roll back and view previous revisions of my home directory.
    Media
    Accumulative backup. See what new music, photos or videos I have on my laptop, and copy them to the backup storage. This mode never deletes media that existed in previous syncs. I should be able to download or create new media, and have it stored on the high capacity storage at home, and only carry with me the media that I am currently consuming (I really don’t want to clutter my laptop disk with The Godfather trilogy, but I might want to take it with me on a flight).
    Virtual machines
    I usually have a small collection of virtual machines on my laptop. They are by far the largest single type of data I have on my machine. Since they support virtual disk snapshots natively, I don’t really care for revisioning like the home folder, virtual machine disks could clobber older versions of themselves on the backup storage.

There are countless backup solutions (read: rsync wrappers) out there. Do any of them answer those needs in a user-friendly way?

by Eitan at August 23, 2010 07:35 PM

Nicolas Dufresne

GLib 2.26 will gain proxy support

GLib 2.26, coming on September 10th, will finally gain proxy support. This contribution to GLib was made possible by Collabora Ltd. and reviewing efforts by Dan Winship. After three months of head scratching and rewriting, we finally came-up with a solution that blends into the GIO architecture and requires no code change for users of the GIO library.

Notable features are:

  • GLib friendly API for proxy configuration (GProxyResolver)
  • Configuration powered by LibProxy (requires installation of glib-networking)
  • Transparent support for SOCKS version 5, 4a and 4
  • Support for application side proxy such as HTTP (using g_socket_client_add_application_proxy(…))
  • Proxy information available inside the GSocket’s remote address
  • Plug-in based configuration and protocol support

by Nicolas at August 23, 2010 04:08 PM

Marco Barisione

Ringtoned 0.2.4 (now with vibration!)

I just released ringtoned 0.2.4 with a fix to make the N900 able to vibrate again when a call is received.
Ringtoned (displayed in the application manager as “Custom ringtones for your contacts”) is available from extras-devel (that contains a lot of other unstable software!) or from my personal repository:

Install per-contact-ringtones
Install from my personal repository
(follow the link on the N900 browser)

This release fixes the last major reproducible bugs, but I’m sure there are more. If you find any please report them in the bugzilla explaining clearly what you are doing, what you would expect to happen and what happens instead. A log attached to the bugzilla entry is very useful to understand what is going on, and can be easily created by opening a terminal and giving this command:

ringtonedctl -d stop startwait > /home/user/MyDocs/ringtoned.log 2>&1

Then attach the ringtoned.log file that is in your documents directory to the bug report.

by barisione at August 23, 2010 03:39 PM

Cosimo Alfarano

Map Buddy 0.4

Finally, the past week Alban and I released MapBuddy 0.4

As mentioned in my previous post, now MapBuddy supports Point of Interests from OpenStreetMap.
It stores them in a sqlite3 db using its spatialite extension.

We use OSM XAPI, for which sometimes requests fail and it seems to silently ignore requests for large areas.
We are working on it :-)

"Download POIs" in the main menu will download all the OSM POIs in the shown area, which mean that you need just to centre the area for which you want to download POIs for and it will fetch them for you.
This is the only operation that will need network access and might take quite long time, depending of the size of the area. Remember that OSM dislikes very large area fetching. Please be considerate.

This means that if you're planning to have a trip to a city you don't know, what you need to do is cache its tiles at different zoom level just loading them (some improvements for this step are scheduled) and select "download POIs".

Remember to "Show POIs", which will show some of the most interesting categories (OSM features) and select any of them. Amenity and Tourist are among them. Again, improvements are scheduled.

POIs are hidden at wider zoom levels, to improve map readability on high density areas.

Some more improvements are still needed and will be added soon, in particular about speed issues at startup or when finger-scrolling the map with POIs shown and about UI.

Lot of work is still going on in the offline mode direction, a search for POIs, integration with the evopedia package, better tile caching experience, etc...

Last but not least, I'd like to thank Enrico Zini for his great suggestions!

by kalfa (noreply@blogger.com) at August 23, 2010 02:12 PM

August 17, 2010

Arun Raghavan

Updates from the Rygel + DLNA world

Things have been awfully quiet since Zeeshan’s posted about the work we’ve been doing on DLNA support in Rygel. Since I’ve released GUPnP DLNA 0.3.0, I thought this is a good time to explain what we’ve been up to. This is also a sort of expansion of my Lightning Talk from GUADEC, since 5 minutes weren’t enough to establish all the background I would have liked to.

For those that don’t know, the DLNA is a consortium that aims to standardise how various media devices around your house communicate with each other (that is, your home theater, TV, laptop, phone, tablet, …). One piece of this problem is having a standard way of identifying the type of a file, and communicating this between devices. For example, say your laptop (MediaServer in DLNA parlance) is sharing the movies you’ve got with your TV (MediaPlayer), and your TV can play only upto 720p H.264-encoded video. When the MediaServer is sharing files, it needs to provide sufficient information about the file so that the MediaPlayer knows whether it can play it or not, so that it can be intelligent about what files show up in its UI.

How the DLNA specification achieves this is by using “profiles”. For each media format supported by the DLNA specification, a number of profiles are defined, that identify the audio/video codec used, the container, and (in a sense) the complexity of decoding the file. (for multimedia geeks, that translates to things like the codec profile, resolution, framerate/samplerate, bitrate, etc.)

For example, if a file is indicated to be of a DLNA profile named AAC_ISO_320, this indicates that this is an audio file encoded with the AAC codec, contained in an MP4 container (that’s “ISO”), with a bitrate of at most 320 kbps. Similarly, a file with profile AVC_MP4_MP_SD_MPEG1_L3 represents a file with H.264 (a.k.a. AVC) video coded in the H.264 Main Profile at specific resolutions upto 720×576, MP3 audio, in an MP4 container (there are more restrictions, but I don’t want to swamp you with details).

So now we have a problem statement – given a media file, we need to get the corresponding DLNA profile. It’s easiest to break this problem into 3 pieces:

  1. Discovery: First we need to get all the metadata that the DLNA specification requires us to check. Using GStreamer and Edward’s gst-convenience library, getting the metadata we needed was reasonably simple. Where the metadata wasn’t available (mostly codec profiles and bitrate), I’ve tried to expose the required data from the corresponding GStreamer plugin.

  2. DLNA Profiles: I won’t rant much about the DLNA specification, because that’s a whole series of blog posts in itself, but the spec is sometimes overly restrictive and doesn’t support a number of popular formats (Matroska, AVI, DivX, OGG, Theora). With this in mind, we decided that it would be nice to have a generic way to store the constraints specified by the DLNA specification and use them in our library. We chose to store the profile constraints in XML files. This allows non-programmers to tweak the profile data when their devices resort to non-standard methods to work around the limitations of the DLNA spec.

  3. Matching: With 1. and 2. above in place, we just need some glue code to take the metadata from discovery and match it with the profiles loaded from disk. For the GStreamer hackers in the audience, the profile storage format we chose looks suspiciously like serialized GstCaps, so matching allows us to reuse some GStreamer code. Another advantage of this will be revealed soon.

So there you have it folks, this covers the essence of what GUPnP DLNA does. So what’s next?

  1. Frankie Says Relax: Since the DLNA spec can often be too strict about what media is supported, we’ve decided to introduce a soon-to-come “relaxed mode” which should make a lot more of your media match some profile.

  2. I Can Haz Trancoding: While considering how to store the DLNA profiles loaded from the XML on disk, we chose to use GstEncodingProfiles from the gst-convenience library since the restrictions defined by the DLNA spec closely resemble the kind of restrictions you’d expect to set while encoding a file (codec, bitrate, resolution, etc. again). One nice fallout of this is that (in theory), it should be easy to reuse these to transcode media that doesn’t match any profile (the encodebin plugin from gst-convenience makes this a piece of cake). That is, if GStreamer can play your media, Rygel will be able to stream it.

Apart from this, we’ll be adding support for more profiles, extending the API as more uses arise, adding more automated tests, and on and on. If you’re interested in the code, check out (sic) the repository on Gitorious.

by Arun at August 17, 2010 02:30 PM

Cosimo Alfarano

Spatialite

Yesterday I uploaded spatialite into Fremantle's extra-devel.

Spatialite itself isn't directly useful to the average Maemo user, but it ca be lot of fun if you're a developer and are interested in GIS.

Spatialite is a sqlite3 extension for geo-spatial data and compatible with OpenGIS, which means you can store any map's nodes (using a OSM nomenclature) into sqlite and use them in your application, with SQL methods that will make easier the management of the node in the map space.

For more info http://www.gaia-gis.it/spatialite/ and http://www.opengeospatial.org/

If you need something more powerful you might give a look at http://postgis.refractions.net/, but this is a bit heavy for Maemo :-p

Soon a new version of Map Buddy will be available, supporting point of interest from OpenStreetMap (theoretically any source) and using spatialite (the reason for which I uploaded it), but I'll write specifically about it in another post.

by kalfa (noreply@blogger.com) at August 17, 2010 01:35 PM

Helio Chissini de Castro

We're looking for passionate Qt and KDE developers !!

So, as looking that everyone is in the hiring mode...

Yes, Collabora is hiring. So if you are passionate for open source, want join a company that share the same passion as well, want to work from any place in the world and have at least some of these skills below, then we want to know you.

  • KDE
  • Qt
  • Qml ( Qt Quick )
  • C++
  • WM and Graphics(3D, GL/GLES, X, Mesa) as a plus

Consider yourself a serious KDE hacker? Don't be shy, we want to know you too ! KDE is an important part of our lives now.

Then, what are you waiting for ?
Share your hacking ninja code skills contacting us at our hiring info channel, also known as email Smiling.

by heliocastro at August 17, 2010 12:13 PM

Arun Raghavan

GUADEC 2010 :(

Hopefully that title was provocative enough. ;) No, GUADEC seemed to be a smashing success. If only I had been able to attend instead of lying in bed for 2 days, ill and wondering at the general malignancy of a Universe that would do this to me.

Collabora Multimedians, looking for a canal

Nevertheless, I had a great time meeting all the cool folks at Collabora Multimedia at our company meeting. Managed to trundle out for my Rygel + DLNA lightning talk (more updates on this in a subsequent post). Things did get better subsequently, and I had an amazing week-long vacation in Germany, and now I’m back at home with my ninja skillz fully recharged!

by Arun at August 17, 2010 07:10 AM

August 16, 2010

Felipe Zimmerle

No eXecute and Atom, the current MeeGo state

The security of your box goes over the firewall, or the fact that you are running a platform where all binaries are trusted. Even on that case, is still possible that vulnerabilities of some software or library could be exploited by a malicious party.

The idea behind the NX bit, No eXecute, is to segregate the areas of the memory in two (lets keep it simple :P ) big sets, the code execution area and the storage area. According to Wikipedia (http://en.wikipedia.org/wiki/List_of_Intel_Atom_microprocessors), the Atom family has the capability to handle such bit.

Adding this feature and a Linux kernel, is possible to avoid the execution of code in the data area, protecting the system against buffer overflows attack. However some marks should be placed on ELFs to archive such protection, these marks are made in the ELF construction and they can mark the ELF to have or not an executable stack. In the second case the executable flag has no effect, is useless.

The marking can also be made on a library (it is also an ELF, duh!) and when this happens, the software which loads that library will be also allowed to run code inside the data segment, disabling again the protection against buffer overflow.

To check the executable marks of your ELFs, you can use the pax-utils (http://www.gentoo.org/proj/en/hardened/pax-utils.xml). Running the tests on a daily MeeGo image (2010-22-07) the following results were archived:


[root@localhost ~]# scanelf -lpqeR
RWX --- --- /usr/lib/libmono.so.0.0.0
RWX --- --- /usr/lib/paxtest/getmain2
RWX --- --- /usr/lib/paxtest/getheap2
RWX --- --- /usr/bin/mono

This means that libmono and mono, for some reason, are expected to run code on the data segment of the memory. In Fedora the mono is marked as RW, I dunno why it is marked as RWX in MeeGo, further investigation should be done.

Mono’s GNU_STACK on Fedora:

(zimmerle@burbs)-(~/core/meego)$ readelf -l /usr/bin/mono | grep GNU_STACK
GNU_STACK 0x0000000000000000 0x0000000000000000 0x0000000000000000

Is acceptable to have some process without such kind of protecting, for example Java. Java depends on the executable stack to work. It is also acceptable to have some other binaries like: getmain2 and getheap2. These are used to test if the Machine is handling well the NX bit.

To check if your platform has handled well the support of the NX bit, you can use the pax-test, really nice utility that allows us to check the protection against various kinds of exploration. Tests were also made on the same release used above.

kidde mode:

PaXtest - Copyright(c) 2003,2004 by Peter Busser Released under the GNU Public Licence version 2 or later

Writing output to paxtest.log
It may take a while for the tests to complete
Test results:
PaXtest - Copyright(c) 2003,2004 by Peter Busser Released under the GNU Public Licence version 2 or later

Mode: kiddie
Linux localhost.localdomain 2.6.35~rc6-131.2-netbook #1 SMP PREEMPT Tue Jul 27 14:34:50 UTC 2010 i686 i686 i386 GNU/Linux

Executable anonymous mapping : Killed
Executable bss : Killed
Executable data : Killed
Executable heap : Killed
Executable stack : Killed
Executable anonymous mapping (mprotect) : Vulnerable
Executable bss (mprotect) : Vulnerable
Executable data (mprotect) : Vulnerable
Executable heap (mprotect) : Vulnerable
Executable shared library bss (mprotect) : Vulnerable
Executable shared library data (mprotect): Vulnerable
Executable stack (mprotect) : Vulnerable
Anonymous mapping randomisation test : 12 bits (guessed)
Heap randomisation test (ET_EXEC) : 13 bits (guessed)
Heap randomisation test (ET_DYN) : 16 bits (guessed)
Main executable randomisation (ET_EXEC) : No randomisation
Main executable randomisation (ET_DYN) : 10 bits (guessed)
Shared library randomisation test : No randomisation
Stack randomisation test (SEGMEXEC) : 19 bits (guessed)
Stack randomisation test (PAGEEXEC) : 19 bits (guessed)
Return to function (strcpy) : Vulnerable
Return to function (strcpy, RANDEXEC) : Vulnerable
Return to function (memcpy) : Vulnerable
Return to function (memcpy, RANDEXEC) : Vulnerable
Executable shared library bss : Killed
Executable shared library data : Killed
Writable text segments : Vulnerable

blackhat mode:

PaXtest - Copyright(c) 2003,2004 by Peter Busser Released under the GNU Public Licence version 2 or later

Writing output to paxtest.log
It may take a while for the tests to complete
Test results:
PaXtest - Copyright(c) 2003,2004 by Peter Busser Released under the GNU Public Licence version 2 or later

Mode: blackhat
Linux localhost.localdomain 2.6.35~rc6-131.2-netbook #1 SMP PREEMPT Tue Jul 27 14:34:50 UTC 2010 i686 i686 i386 GNU/Linux

Executable anonymous mapping : Killed
Executable bss : Killed
Executable data : Killed
Executable heap : Killed
Executable stack : Killed
Executable anonymous mapping (mprotect) : Vulnerable
Executable bss (mprotect) : Vulnerable
Executable data (mprotect) : Vulnerable
Executable heap (mprotect) : Vulnerable
Executable shared library bss (mprotect) : Vulnerable
Executable shared library data (mprotect): Vulnerable
Executable stack (mprotect) : Vulnerable
Anonymous mapping randomisation test : 12 bits (guessed)
Heap randomisation test (ET_EXEC) : 13 bits (guessed)
Heap randomisation test (ET_DYN) : 16 bits (guessed)
Main executable randomisation (ET_EXEC) : No randomisation
Main executable randomisation (ET_DYN) : 10 bits (guessed)
Shared library randomisation test : No randomisation
Stack randomisation test (SEGMEXEC) : 19 bits (guessed)
Stack randomisation test (PAGEEXEC) : 19 bits (guessed)
Return to function (strcpy) : Vulnerable
Return to function (strcpy, RANDEXEC) : Vulnerable
Return to function (memcpy) : Vulnerable
Return to function (memcpy, RANDEXEC) : Vulnerable
Executable shared library bss : Killed
Executable shared library data : Killed
Writable text segments : Vulnerable

As you can see, we are protected against code execution in any other area than that intended for this purpose. We don’t have randomization on libs due the fact that we are making use of the prelink, subject for another post :)

The pax-utils and pax-test pacakges can be found on my security MeeGo repostiory, at:

http://meego.zimmerle.org/repo/security/

If you are interested in testing it by yourself, you can download my ks file here.

That kind of protection is very important almost mandatory, modern system still been hacked by such kind of attack class, when they opt to not provide such protection, the case of Xbox, for example which is exposed to a vulnerability in the 007: Agent Under Fire (http://en.wikipedia.org/wiki/Agent_Under_Fire_(video_game)).

by felipe at August 16, 2010 09:49 PM

Marco Barisione

Ringtoned 0.2.1

The Fremantle daemon that decodes ringtones seems to have a bug that, in some cases, makes it produce wave files with an invalid size in them. These files cannot be played by libcanberra, so it meant that some ringtones couldn’t be played when you receive a phone call. I just released ringtoned 0.2.1 with a work around for the bug, please let me know if this version works better for you.

Anyway, I got a new component in the Meamo Bugzilla for ringtoned, so please report bugs there.

Update 2: I released ringtoned 0.2.2 that just adds some more debugging info to make my life easier.

by barisione at August 16, 2010 04:39 PM

August 14, 2010

Marco Barisione

Faster custom ringtones

Several people complained that my custom ringtones application is too slow when receiving calls, so I started analysing what ringtoned does when a new call is received. The three main operations in this case are creating the object that represents a call after retrieving all the needed information (caller ID, etc.) from Telepathy, looking up the contact that matches the caller and playing the ringtone.
The Telepathy bit just needed to be slightly smarter, but was already quite fast. The contact look up was already very fast, unless you have so many contacts to make your address book unusable.
The code that needed more optimisation was the one that plays ringtones. It turned out that using GStreamer with playbin2 (the element able to detect and play all the supported file types) is not fast enough for this use case. I tried different approaches and in the end I decided to always use uncompressed wave files and stream them directly to PulseAudio.[1]
Note that GStreamer is not the best solution just in this very specific case, for all the other use cases GStreamer is still the best solution.

After these changes I was really expecting to get very good performances, but it was still quite slow. My analysis was showing that, since when ringtoned gets notified from Telepathy of the existence of a new call to when it starts streaming to PulseAudio, less than 0.1 seconds passes, so why was it still slow?
At this point I tried using bustle to generate graphs of the D-Bus activity when a call is received. The graphs showed that the delay was not ringtoned’s fault, but a bug in Maemo causing a freeze that made the dispatching of new calls about 4 seconds slower when ringtoned was running. Somebody is now working on the bug and trying to figure out why it’s happening, in the meantime I’m working around it watching for new calls in a different way.[2]

Ringtoned and the related packages are available in Maemo extras-devel under the name “Custom ringtones for your contacts”. If you don’t want to add the extras-devel repository (as it contains a lot of unstable software, you have been warned!), you can download ringtoned directly from my personal repository:

Install per-contact-ringtones
Install from my personal repository
(follow the link on the N900 browser)

The only known big problem left is that ringtoned breaks vibration, I will fix it in the next days/week.

Update: It looks like MyContacts is incompatible with ringtoned, so you cannot use these two programs together.

[1] The file is uncompressed in background, so you can still use any type of file for ringtones. Just notice that, when you update from a previous version, the first time you receive a call from a contact that already had a custom ringtone you will get the default ringtone and not the custom one as previous versions were not generating the uncompressed file.
[2] For people interested in Telepathy: the freeze happens if there is an observer running, even if at that point the dispatching to observers didn’t start yet! The (ugly, but effective) solution was to just listens to the NewChannels signal directly. When the Maemo bug will be fixed I will revert my code to use an observer.

by barisione at August 14, 2010 04:31 PM

August 13, 2010

Daniel Stone

lca 2011 cfp closing soon!

Just a reminder that the linux.conf.au 2011 call for papers is closing THIS SATURDAY, 14th August! If you haven't already submitted your talk, get in now while you still can ...

August 13, 2010 12:12 PM

Danielle Madeley

higher level channel requesting in telepathy-glib

Thanks to the awesome work of Guillaume, telepathy-glib 0.11.12 now includes high-level API for requesting communications channels via Mission Control (the Channel Dispatcher). API is provided both for channels you wish to handle, or channels you want someone else to handle. The API uses the same asynchronous patterns as used in GIO.

For instance, to request a text channel to a contact that you want someone else (i.e. Empathy) to handle:

GHashTable *props = tp_asv_new (
    TP_PROP_CHANNEL_CHANNEL_TYPE, G_TYPE_STRING, TP_IFACE_CHANNEL_TYPE_TEXT,
    TP_PROP_CHANNEL_TARGET_HANDLE_TYPE, G_TYPE_UINT, TP_HANDLE_TYPE_CONTACT,
    TP_PROP_CHANNEL_TARGET_ID, G_TYPE_STRING, "escher@tuxedo.cat",
    NULL);
 
TpAccountChannelRequest *request = tp_account_channel_request_new (TP_ACCOUNT (account),
    props, G_MAXINT64 /* current time */);
 
tp_account_channel_request_ensure_channel_async (request,
    NULL, NULL, _channel_ready, NULL);
 
g_hash_table_destroy (props);
g_object_unref (request);
static void
_channel_ready (GObject *request,
    GAsyncResult *res,
    gpointer user_data)
{
  GError *error = NULL;
 
  if (!tp_account_channel_request_ensure_channel_finish (
      TP_ACCOUNT_CHANNEL_REQUEST (request), res, &error))
    handle_error (error);
 
  ...
}

I’ve spent some time this week updating telepathy-glib examples to take advantage of new APIs, and they’ve all become noticeably shorter. The last two missing pieces of the puzzle are high-level wrappers for channel types (we have prototypes for tubes: stream, dbus) and a library of GTK+ widgets (a libfolks-gtk maybe?).

by Danielle at August 13, 2010 05:12 AM

August 11, 2010

Marco Barisione

Disappearing plugins

If you have any application that adds buttons to the address book (like the contacts merger), you could have noticed that the buttons recently disappeared. This happened because of a bug in Monorail, the IM file transfer application.
Alban already fixed this bug and uploaded a new version to extras-devel. This new version also fixes other bugs, including a crash caused by the sharing plugin in Conboy.

Update: Note that you need to reboot or kill osso-addressbook after updating monorail to see the plugins again.

by barisione at August 11, 2010 02:22 PM

Tomeu Vizoso

PyGObject matching GLib version numbers

John Stowers has proposed to change the PyGObject numbering scheme to match that of GLib:

http://mail.gnome.org/archives/python-hackers-list/2010-August/msg00006.html

If anybody has a problem with this, please speak up now. Otherwise the next unstable release of PyGObject will be 2.25.1.

by Tomeu Vizoso (noreply@blogger.com) at August 11, 2010 08:46 AM

August 10, 2010

Gustavo Noronha Silva

Google’s User-Agent sniffing makes one more victim

Remember when I said Epiphany worked out of the box with Youtube’s WebM? Well, Google has recently decided to deny us WebM, like it did before with Wave, the Pacman doodle, and who knows what else? \o/

Wouldn’t it be nice if Google practiced what they preach?

Update: so it looks like my message went through to the people who needed to see it, and they found a filtering error in the User Agent sniffing code that made it think Epiphany was a too old Safari - I’m told the change will land in Youtube soon, thanks for those paying attention, and working on this! User Agent sniffing keeps being a problem, of course, and there are other stuff to fix, so I will probably still push my patch to spoof the user agent to google services which are still mishandling Epiphany, but it’s good to see some progress being made!

Update2: I started shipping a patch to send the Chrome user agent string to google domains in the Debian package for WebKitGTK+, when the “enable-site-specific-quirks” setting is enabled (which is the case for Epiphany); I already found something we were missing out on =D Google Images seems to have been greatly improved, and now faking being Chrome we are also able to enjoy it:

Google Images improved

by kov at August 10, 2010 08:38 PM

August 09, 2010

Gustavo Noronha Silva

WebKitGTK+ and the Web Inspector

When I started working on WebKitGTK+ I was a web developer, writing IT applications using Python and Django, and building features for content portals running Plone (argh). Even though I was an Epiphany user ever since it was forked off Galeon, I still had to use Firefox for my work, because I couldn’t really live without Firebug.

It should come as no surprise, then, that one of my first patches to WebKitGTK+ was actually making the awesome Web Inspector work in our port. After the initial support, though, not a lot has been done to further improve it, partly because it was already good enough for many uses, partly because I somehow started doing non-web development again ;).

These last weeks, through my R&D efforts in Collabora, I have been able to push Web Inspector features and integration a bit further. A simple change that boosts the Inspector’s usability quite a bit is having the nodes that are being hovered highlighted. Along with that, the ability to attach the inspector to Epiphany’s window should make it easier to use for poking the DOM.

The Web Inspector has a number of settings that control its behaviour. Since, for instance, enabling javascript debugging may slow down javascript performance, the inspector usually has it disabled by default, and provides a button to enable it. It also provides an option for always enabling that feature, but that does not work right now, because we are not saving/restoring the relevant settings. A solution to that is in the works using the GSettings infrastructure that was recently merged into glib.

Here’s a simple screencast, showing these improvements in action (click the video to check it out in full size):

by kov at August 09, 2010 03:35 PM

August 08, 2010

Robin Burchell

Strings and Qt

One thing which comes up quite often when I'm talking to developers new to Qt is the topic of strings, more specifically, character encoding: how to do it right, what options are available, and best practices.

Having written this a few times now, I thought that perhaps it was about time I write it up in a more permanent location (here) in the hopes that people will stumble across it and magically become enlightened, and end world hunger. ;)

Qt (and C++) have a number of different string types.

QString

Qt has a string type in QtCore called QString. QString, internally, stores data in utf16, and *does* have knowledge of character encoding.

Services across a network (like web services) often want data in utf8. QString, however, stores data in utf16. To get to utf8, you want QString::toUtf8(). To convert from utf8 back to utf16 QString (e.g. parsing input from a web service) see, QString::fromUtf8().

std::string

C++ also has std::string (although you won't find a lot of this in Qt applications). Simply put, it's a wrapper around a C string providing convenience operations and nicer syntax. It still doesn't have such (fairly essential) things like character encoding.

You probably want to avoid using this in an internationalized application or one requiring interaction with network services unless you find your own solution for encoding issues.

QString has ::toStdString() and ::fromStdString() methods if you must use them for whatever reason.

C strings (char*)

Finally, you have C strings (char*) which don't have any idea what encoding is, they are just a bunch of bytes.

Generally speaking, they're latin1 encoded (ASCII), to put them into a QString.. QString::fromLatin1(). If they aren't latin1, see QTextCodec::setCodecForCStrings().

QLatin1String class is also helpful - in particular, this will allow you to compile when using QT_NO_CAST_FROM_ASCII (which itself is helpful to make sure you explicitly give encodings for all of your strings).

by Robin Burchell (viroteck@viroteck.net) at August 08, 2010 07:07 PM

achieving openness: it's about the journey, not the destination

I have written a lot of articles previously about project openness, and I've had this one cooking in drafts for a while without time to write much around the actual issues I'm presenting.

With some more thought, I realised that the best way to proceed is just to publish, and not point fingers and draw conclusions (though I certainly did write this with some projects in mind), so here goes.
  • Do you reject contributions for non-technical reasons?
  • Do you have development documentation (e.g. build instructions, architecture information) available for external contributors?
  • Do you answer questions on design, architecture, etc. from external contributors?
  • Do you work with contributors to polish their contributions and educate them as to best practices and your project?
  • Do you let external contributors take part in design decisions?
  • Do you hold external contributions to the same standards of review as internal contributions?
  • Do you grant rights (such as commit access, ability to close bugs) to external contributors?
  • Do you have a public means for (preferably real time) communication that you use?
  • Do you have a public issue tracker?
  • Do you use your public infrastructure wherever possible unless an issue is explicitly private?
Run your project against the list -- perhaps you'll find some things you can improve on.

If you've any suggestions to add to the list, why not write a comment? :)

by Robin Burchell (viroteck@viroteck.net) at August 08, 2010 06:51 PM

August 04, 2010

Rodrigo Vivi

Let’s meet at Linuxcon Brasil?

For the very first time the Linux Foundation is organizing the Linuxcon Brazil. It will happen on August 31th and Seeptember 01 in São Paulo city at WTC.

I’m already confirmed to do a presentation in Portuguese-br: A Maturidade do Linux no Mercado dos Celulares e de Serviços: Rumo ao Domínio!

I was also invited by Klaus Kiwi to participate of a mini-sumit to discuss about Linux development as a professional activity, which I’m not sure if it is already confirmed.

Helio Castro will  be there as well doing a presentation about Meego!

Ok ok, maybe you don’t want to hear what we have to tell there, but what about listen to Linus Torvalds at this keynote ;)

I’m pretty sure that there will be other good presentations and talks over there.

See you there?

by rodrigo at August 04, 2010 09:38 PM

Navigator devices x Navigator apps

To whom didn’t know I’ living in São Paulo city now. When I was looking to apartment here I was using the Nokia maps at my N900 to guide me trough the streets that I didn’t know.

Well I cannot blame Nokia maps hard because it really helped me to find lots of places in this huge city.
However, last month I bought a simple Garmin Navigator (Nuvi 1053T) and I have to write that developers have a lot to learn with Garmin, regarding to the usability.

The usability was the main reason that I’ve chosen this brand instead of the other one available in the market. At this point you must be willing to ask me:

“if Nokia Maps at your N900 helped you to find all places you wanted when looking for a new apartment, why the hell did you spend money in a navigator?”

Well, for some reasons:

* Due to the Murph law, always during a decision taken the phone rings and I got lost :(
* After get lost my Nokia Maps didn’t recalculate the route by itself
* When the 3G internet was slow it was a pain to wait to see the maps and the path (Ok I know that there is solution/workaround for this issue)
* It doesn’t warn me when there is speed camera

and the main reason:

* My wife didn’t like the Nokia Maps usability and couldn’t use it very well and since I work at home she will use more the Navigator than me.

Well, due to this reason I’ve started to take a look to different brands and models.

The first one that I’ve played with was a Tom Tom of a friend. I didn’t agree with
the most of path it took and I saw that this friend and I had some difficulties to use it even been computer engineers.

Later,  I played with a my cousin’s garmin. Well, he is a smart and intelligent doctor but he admit that he can’t use computer and other electronic devices so well.
Although he got his garmin and use it so easily that I couldn’t believe. I had also agreed with most of the paths and than I was almost decided to buy one of this.

When I was in a store in Finland looking for a Garmin to buy I found a demo device on the shelve but it was in Russian and even in a complete strange language I could with few taps
to change the language to Portuguese and use it very well.

Then, obviously I bought it.

So most of my problems I had with my N900 in São Paulo streets have already been solved. But this is not the main reason that I decided to write about it.

I believe that all developers should learn a little bit about its interface.

= Developers in general

* Leave the interface as clean as possible. On the map screen there is few information; next step with street name, distance and directions and the map itself. It also doesn’t show the small streets when it is not really necessary.
* Use few buttons as possible. On the main screen there is only two buttons: “Where to go” and “Settings”
* is it touch screen? So prepare it for fingers. Really. Use big icons. If you have to get a pen to touch it is simple wrong. As a friend of mine would say: It is so 5 years ago.
* Use meaningful buttons so people can use even in strange languages.

= To the Navigator developers

* Recalculate route is essential
* Talk and speed cameras are not easy but important
* If the device is for multiple usages, add an option that allows it to ignore automatically incomming calls or other service when you really need the navigator.

by rodrigo at August 04, 2010 09:05 PM

Christian Schaller

GStreamer Conference 2010 registration is open!

So the registration system for the GStreamer Conference 2010 is now open together with the registration for CE Linux Conference Europe 2010.

You find the registration for both conferences here so I hope to see as many of you as possible registered. I think we have a great program and some really interesting talks!

by uraeus at August 04, 2010 04:39 PM