Fremantle: Opening URLs and local files
Re: Fremantle: Opening URLs and local files
Re: Fremantle: Opening URLs and local files
2009-10-07 06:37 UTC
On Tue, 2009-10-06 at 22:17 +0100, Andrew Flegg wrote:
> > Just for the record: It's not working very well ;)
> >
> > If you use gtk_show_uri() with something like this: "http://zwong.de"
> > you get an error that the process "epiphany" could not be executed.
>
> I raised this with Andre a while ago and he pointed me to NB#136012,
> the problem is the GConf key:
>
> /desktop/gnome/url-handlers/http/command
>
> This is set, by default, to "epiphany %s" (or similar). This is obviously wrong.
>
> I need it to be right for python-facebook to handle the authentication
> process for Hermes' Facebook use. So, in my postinst I set it to:
>
> dbus-send --system --type=method_call --dest="com.nokia.osso_browser"
> --print-reply /com/nokia/osso_browser/request
> com.nokia.osso_browser.load_url
> string:"%s"
>
> Snippet from Hermes' postinst:
> --------8<--------
> # Hacky fix for NB#136012
> gconftool-2 -s /desktop/gnome/url-handlers/http/command 'dbus-send
> --system --type=method_call --dest="com.nokia.osso_browser"
> --print-reply /com/nokia/osso_browser/request
> com.nokia.osso_browser.load_url string:"%s"' --type string
> -------->8--------
>
> > For "mailto:nothing@icandy.de" you get an error that the process
> > "evolution" could not be executed and so on...
>
> Presumably it's the same problem in a slightly different GConf kye.
Right, under '/desktop/gnome/url-handlers/' there are numerous
protocols. Including things like mailto, icq, irc, lastfm, vnc, callto,
etc....
It would really be cool if all/most of them where set correctly. But
then somehow it's also redundant with hildonmime. Hildon is using the
the .desktop files for this kind of information. Unfortunately it looks
like there is not a single function call to make use of that.
We could have a package which corrects all of those settings and then
our packages could depend on it. But then again it's static and if you
install new applications that could handle, for example vnc:// urls, the
information wouldn't get updated.
It seems like there really should be a hildon function which opens URIs
depending on the values in the .desktop files. Maybe I just didn't find
it yet?
Anyways, thanks for the pointer Andrew :)
Conny
> > Just for the record: It's not working very well ;)
> >
> > If you use gtk_show_uri() with something like this: "http://zwong.de"
> > you get an error that the process "epiphany" could not be executed.
>
> I raised this with Andre a while ago and he pointed me to NB#136012,
> the problem is the GConf key:
>
> /desktop/gnome/url-handlers/http/command
>
> This is set, by default, to "epiphany %s" (or similar). This is obviously wrong.
>
> I need it to be right for python-facebook to handle the authentication
> process for Hermes' Facebook use. So, in my postinst I set it to:
>
> dbus-send --system --type=method_call --dest="com.nokia.osso_browser"
> --print-reply /com/nokia/osso_browser/request
> com.nokia.osso_browser.load_url
> string:"%s"
>
> Snippet from Hermes' postinst:
> --------8<--------
> # Hacky fix for NB#136012
> gconftool-2 -s /desktop/gnome/url-handlers/http/command 'dbus-send
> --system --type=method_call --dest="com.nokia.osso_browser"
> --print-reply /com/nokia/osso_browser/request
> com.nokia.osso_browser.load_url string:"%s"' --type string
> -------->8--------
>
> > For "mailto:nothing@icandy.de" you get an error that the process
> > "evolution" could not be executed and so on...
>
> Presumably it's the same problem in a slightly different GConf kye.
Right, under '/desktop/gnome/url-handlers/' there are numerous
protocols. Including things like mailto, icq, irc, lastfm, vnc, callto,
etc....
It would really be cool if all/most of them where set correctly. But
then somehow it's also redundant with hildonmime. Hildon is using the
the .desktop files for this kind of information. Unfortunately it looks
like there is not a single function call to make use of that.
We could have a package which corrects all of those settings and then
our packages could depend on it. But then again it's static and if you
install new applications that could handle, for example vnc:// urls, the
information wouldn't get updated.
It seems like there really should be a hildon function which opens URIs
depending on the values in the .desktop files. Maybe I just didn't find
it yet?
Anyways, thanks for the pointer Andrew :)
Conny
> On Thu, 2009-09-17 at 13:45 +0300, Claudio Saavedra wrote:
>> El jue, 17-09-2009 a las 12:15 +0200, Thomas Perl escribió:
>> > Hello!
>> >
>> > What is the canonical way of opening a browser and the media player
>> > (or more general: opening a URL and opening a local file) from code
>> > on Fremantle?
>>
>> gtk_show_uri() should work in theory, but I don't know if it does in
>> practice.
>
> Just for the record: It's not working very well ;)
>
> If you use gtk_show_uri() with something like this: "http://zwong.de"
> you get an error that the process "epiphany" could not be executed.
I raised this with Andre a while ago and he pointed me to NB#136012,
the problem is the GConf key:
/desktop/gnome/url-handlers/http/command
This is set, by default, to "epiphany %s" (or similar). This is obviously wrong.
I need it to be right for python-facebook to handle the authentication
process for Hermes' Facebook use. So, in my postinst I set it to:
dbus-send --system --type=method_call --dest="com.nokia.osso_browser"
--print-reply /com/nokia/osso_browser/request
com.nokia.osso_browser.load_url
string:"%s"
Snippet from Hermes' postinst:
--------8<--------
# Hacky fix for NB#136012
gconftool-2 -s /desktop/gnome/url-handlers/http/command 'dbus-send
--system --type=method_call --dest="com.nokia.osso_browser"
--print-reply /com/nokia/osso_browser/request
com.nokia.osso_browser.load_url string:"%s"' --type string
-------->8--------
> For "mailto:nothing@icandy.de" you get an error that the process
> "evolution" could not be executed and so on...
Presumably it's the same problem in a slightly different GConf kye.
HTH,
Andrew
--
Andrew Flegg -- mailto:andrew@bleb.org | http://www.bleb.org/