Mailinglist Archive: opensuse-gnome (60 mails)

< Previous Next >
[opensuse-gnome] Junior Job: registering URI scheme handlers with glib 2.27
  • From: Vincent Untz <vuntz@xxxxxxxxxxxx>
  • Date: Tue, 12 Oct 2010 03:45:21 +0200
  • Message-id: <20101012014521.GH2016@xxxxxxxxx>

We're going to ship glib 2.28 in openSUSE 11.4, since 2.28 should be out
in December.

There's one change that we must prepare for, though: the way URI scheme
handlers are registered changed. Before, applications used to register
themselves in gconf (see /desktop/gnome/url-handlers). The new glib
won't support that anymore and will use the MIME type system.

See Bastien's post for some more background:

What does it mean for us? It means that we have to patch various
packages for this, and the good news is that by doing this, we can help
upstream. It's really easy to do, and I'm looking for volunteers :-)

Below are some instructions. It's a bit long. And it's late here, so
maybe they won't be really clear to everyone ;-) But just ask if you
want to help and face an issue.

Here is the upstream tracker bug:

Let's take an example: Yelp. If you go the tracker bug, you'll find a
bug for yelp:
We need to register yelp for the x-scheme-handler/ghelp,
x-scheme-handler/info and x-scheme-handler/man MIME types. So here are
the steps we'll do:

a) branch yelp in the build service (osc branch GNOME:Factory yelp)
b) look for the source of the desktop file in the tarball. In this
case, this is
c) add the MIME types to the MimeType key. If there's no such key,
create one. For yelp, there's no such key, so we create one:
d) make sure that the Exec line has %u or %U as argument. This is
required to accept the URI that has to be opened. %u is for only one
URI, and %U is for multiple URI. In the case of yelp, we probably
want %u, and we see that the Exec line doesn't have %u nor %U, so we
add %u.
e) to make sure you were right to do this, manually simulate the
opening of such an URI. Call "yelp ghelp:evince" and see if it works
fine. (We replaced %u with ghelp:evince).
f) it's also important to make sure that simply calling the Exec line
by removing %u or %U works. For example, if yelp needs --open to
open a URI, you would use "yelp --open %u". But you have to check
that "yelp --open" doesn't fail and just launches yelp. If it
doesn't, then it will be a bit more complex and I suggest for now to
just report in the bug that yelp needs to be adapted.
f) create a patch of these changes, and submit it in bugzilla, as well
as in the build service

Additionally, we need someone to also patch totem with the two patches
that were committed in git for this:

There will be other apps to patch, that are not tracked in the upstream
bug. Looking at what I have in gconf, we probably want to patch the
desktop file for firefox (to support ftp and http) and transmission (to
support magnet). We could also patch xchat (but it needs to be done
carefully -- I'll let that as an exercice to the reader).



Les gens heureux ne sont pas press├ęs.
To unsubscribe, e-mail: opensuse-gnome+unsubscribe@xxxxxxxxxxxx
For additional commands, e-mail: opensuse-gnome+help@xxxxxxxxxxxx

< Previous Next >