Bug#704895: transmission: doesn't open magnet links when clicked in iceweasel

2013-05-20 Thread Leo 'costela' Antunes
Hi,

On 07/04/13 12:49, bruno wrote:
 when I click on magnet links in iceweasel, they don't get opened in
 transmission; iceweasel says there's no protocol associated with that
 kind of link. I checked transmission's trac, and it says that since
 version 1.80 it should set the appropriate gnome preferences [1].
 I checked my preferences with
 gconf -R /desktop/gnome/url-hanlders/magnet
 and nothing was set. I set them by hand and now it works. I suppose
 debian's transmission doesn't do the right thing when it gets launched.

This is a bit weird. The version of Iceweasel in Wheezy should be able
to fetch handlers from GIO (AFAIU the code). Could you please compile
and run the attached little test program?

$ gcc `pkg-config --cflags --libs gio-unix-2.0 gconf-2.0` -o
test_handlers test_handlers.c
$ ./test_handlers magnet

Could you also please make a few tests with other protocol handlers? For
instance: vnc if you have vinagre installed, or ghelp if you have yelp,
or one of the many media protocols supported by totem. It should only be
a matter of typing in the protocol in the addressbar with a random
non-existent address, just to check if iceweasel starts the responsible
program (and if you manage to do this, please also note the output of
./test_handlers for the tested protocols).

I'll upload a new version to unstable with the GConf info as well, just
as a stopgap measure, but I believe this problem should be looked into a
bit further, since AFAICT Iceweasel shouldn't need the GConf info to
handle protocols.

 [1] https://trac.transmissionbt.com/wiki/MagnetLinks

This page mentions transmission 1.80. Back then I believe there was no
GIO support in iceweasel, so the suggested solution was indeed the only
option. However, I don't think this is the case for the versions in
wheezy or newer (but I'm of course open to corrections from anyone more
familiar with iceweasel's code).


Cheers

-- 
Leo costela Antunes
[insert a witty retort here]

#include stdio.h
#include gconf/gconf.h
#include gconf/gconf-client.h
#include gio/gdesktopappinfo.h

int main(int argc, char *argv[]){
if(argc  2){
printf(must specify protocol as first argument\n);
return 1;
}

GAppInfo *app_info = g_app_info_get_default_for_uri_scheme(argv[1]);
if(app_info == NULL){
printf(no GIO handler found!\n);
} else {
printf(GIO handler: %s\n, g_app_info_get_commandline(app_info));
}

GConfClient *mClient = gconf_client_get_default();
GError *err = NULL;
char key[100];
sprintf(key, /desktop/gnome/url-handlers/%s/command, argv[1]);
gchar* gconf_handler = gconf_client_get_string(mClient, key, err);
if(err || !gconf_handler){
printf(no GConf handler found!\n);
} else {
printf(GConf handler: %s\n, gconf_handler);
}

return 0;
}


Bug#704895: transmission: doesn't open magnet links when clicked in iceweasel

2013-04-07 Thread bruno
Package: transmission
Version: 2.52-3
Severity: normal

Dear Maintainer,
when I click on magnet links in iceweasel, they don't get opened in
transmission; iceweasel says there's no protocol associated with that
kind of link. I checked transmission's trac, and it says that since
version 1.80 it should set the appropriate gnome preferences [1].
I checked my preferences with
gconf -R /desktop/gnome/url-hanlders/magnet
and nothing was set. I set them by hand and now it works. I suppose
debian's transmission doesn't do the right thing when it gets launched.

[1] https://trac.transmissionbt.com/wiki/MagnetLinks


-- System Information:
Debian Release: wheezy/sid
  APT prefers testing
  APT policy: (500, 'testing')
Architecture: amd64 (x86_64)
Foreign Architectures: i386

Kernel: Linux 3.2.0-2-amd64 (SMP w/1 CPU core)
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash

Versions of packages transmission depends on:
ii  transmission-common  2.52-3
ii  transmission-gtk 2.52-3

transmission recommends no packages.

transmission suggests no packages.

-- no debconf information

-- 
CONTACTS http://tracciabi.li/~bruno/contacts.html 2nd email br...@tracciabi.li
GNU/Linux registered user #121507 http://linuxcounter.net


signature.asc
Description: This is a digitally signed message part