Bug 3873 - GnomeVFS does not seem to open webpage in a specific sample application
: GnomeVFS does not seem to open webpage in a specific sample application
Status: RESOLVED WONTFIX
Product: Desktop platform
gnomevfs
: 4.1.3 (5.2008.43-7)
: All Maemo
: Low normal (vote)
: ---
Assigned To: Kimmo Hämäläinen
: gnomevfs-bugs
: http://notecase.sourceforge.net/temp/...
: moreinfo
:
:
  Show dependency tree
 
Reported: 2008-11-20 09:56 UTC by Miroslav Rajcic
Modified: 2010-03-11 16:43 UTC (History)
4 users (show)

See Also:


Attachments


Note

You need to log in before you can comment on or make changes to this bug.


Description Miroslav Rajcic (reporter) 2008-11-20 09:56:49 UTC
SOFTWARE VERSION:
(Control Panel > General > About product)
Tested on different MAemo versions including OS2008 and diablo

STEPS TO REPRODUCE THE PROBLEM:
1. There is a test code at: http://notecase.sourceforge.net/temp/sample.zip
2. Compile with "make", execute resulting "./bin/notecase" program
3. Program attempts to start the website in a default web browser

EXPECTED OUTCOME:
Browser should open and load a website.

ACTUAL OUTCOME:
Browser is opened, but the default homepage is loaded, not my URL!

REPRODUCIBILITY:
always (I don't own the actual device, using only SDK, but multiple users
tested/confirmed this)
Note that the same code works fine when tested on Linux distros like Ubuntu,
Fedora, ....

EXTRA SOFTWARE INSTALLED:

OTHER COMMENTS:

User-Agent:       Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.0.4)
Gecko/2008102920 Firefox/3.0.4
Comment 1 Andre Klapper maemo.org 2008-11-20 19:24:22 UTC
(In reply to comment #0)
> SOFTWARE VERSION:
> (Control Panel > General > About product)
> Tested on different MAemo versions including OS2008 and diablo

Did you test this in 4.2008.36-5, the latest available version?

What is the exact debug output on the terminal when run on a N810?

> the same code works fine when tested on Linux distros like Ubuntu, Fedora,

Which exact Ubuntu version, which exact Fedora version?
Did you test with gnome-vfs 2.16.x?
Comment 2 Miroslav Rajcic (reporter) 2008-11-21 09:55:09 UTC
> Did you test this in 4.2008.36-5, the latest available version?

I don't have this version installed, currently the latest one I've used is
Maemo 4.1 diablo.

> What is the exact debug output on the terminal when run on a N810?

Here is the equivalent debug output sent by the user running practically the
same code (different link):

"Execute link URL=http://rubenvangogh.nl

Using GnomeVFS

Open path:http://rubenvangogh.nl - URI:http://rubenvangogh.nl, mime
type:text/html

Execute link URL=http://rubenvangogh.nl

Using GnomeVFS"

As you can see, no GTK warnings in the terminal, and the code just doesn't work
(browser started, but URL not loaded)


> > the same code works fine when tested on Linux distros like Ubuntu, Fedora,
> 
> Which exact Ubuntu version, which exact Fedora version?

My code is compiled and tested (runs fine) on: Blag 60001 i386 (Fc6), Fedora 7
x86_64, Ubuntu 7 i386, Ubuntu 7 x86_64, Fedora 8 i386, Fedora 9 i386, Ubuntu
8.04 i386, Open Suse 10.3, Mandriva 2008 Spring, ...
(see http://notecase.sourceforge.net/download.html)

> Did you test with gnome-vfs 2.16.x?

Not that I know, users are the ones actually testing on Maemo, because I don't
own Nokia device (and testing anything within SDK is a pain). 
This means they test the program using the gnome-vfs version that comes by
default with each maemo.

Does the code work for you ?
Comment 3 Andre Klapper maemo.org 2008-11-21 14:44:53 UTC
(In reply to comment #2)
> > Did you test this in 4.2008.36-5, the latest available version?
> 
> I don't have this version installed, currently the latest one I've used is
> Maemo 4.1 diablo.
Hmm, there seems to be some confusion, also on
http://notecase.sourceforge.net/download.html . See
https://wiki.maemo.org/Template:Release_history_table .

> > What is the exact debug output on the terminal when run on a N810?

> Ubuntu 7 i386 (just a note that this version does not exist)

> > Did you test with gnome-vfs 2.16.x?
> Not that I know, 
Asking because Maemo ships 2.16.x, which was included in e.g. Fedora 6.


> (and testing anything within SDK is a pain).
Same here. ;-)

How would I trigger the similar functionality from within your application?
For example I had huge problems saving a link URL when writing a note, it was
very often reset from http:// to file://.
Comment 4 Miroslav Rajcic (reporter) 2008-11-21 15:18:25 UTC
> Hmm, there seems to be some confusion, also on
> http://notecase.sourceforge.net/download.html . See
> https://wiki.maemo.org/Template:Release_history_table .

Thanks, will look into it.

> Asking because Maemo ships 2.16.x, which was included in e.g. Fedora 6.

Then the answer is yes.

> > (and testing anything within SDK is a pain).
> Same here. ;-)

LOL, I thought I must be the only one :-)

> How would I trigger the similar functionality from within your application?
> For example I had huge problems saving a link URL when writing a note, it was
> very often reset from http:// to file://.

You must create a note, type some text into it, select a part of the text to
create a link.
When creating a link, make sure to select "link to a file or web address"
and to type the full link including the "http://" prefix.
Without this prefix, the link will not be recognized as http.

I hope this helps.
Comment 5 Eero Tamminen nokia 2008-11-24 17:33:20 UTC
I think your code (GnomeVFS) gets the HTML handling application from the mime
database.  It then execs and gives the URL as the command line argument:
http://library.gnome.org/devel/gnome-vfs-2.0/2.12/gnome-vfs-20-gnome-vfs-mime-database.html#gnome-vfs-mime-application-launch

However, Maemo browser doesn't accept URLs from the command line but only
through D-BUS.  I think main reason for this is that browser is single-instance
and it doesn't have a lightweight that would convert command line option to
browser instance IPC call (like e.g. Firefox does).  Having that kind of extra
wrapper is normally redundant on the device because Browser listens on D-BUS.

You need to use the D-BUS command that asks Browser to open a new URL.  I think 
tablet-browser-interface-dev package provides C API for that.


Btw. There's a bug about having Maemo version of xdg-utils that provides a
command line wrapper for starting Browser.  I don't think that would be
installed as the mime handler for HTML though (it would slow down normal
www-page open), so it probably wouldn't help with GnomeVFS either, just with
LSB compatible scripts.

Andre, I think there could be a bug about mime handlers not being desktop
compatible.  This could then be added to Quim's Mainstream alignment wiki.
Comment 6 Miroslav Rajcic (reporter) 2008-11-25 08:05:22 UTC
Thanks for the D-BUS tip. Is there any documentation on how to pass the file to
the browser ?

Additionally, my user confirm that the image viewer does not seem to support
the command line parameters too. If you create a file:// link pointing to the
local .jpg file, that type of hyperlink does not work too (image viewer program
is opened, but the file is not being displayed).
Comment 7 Miroslav Rajcic (reporter) 2008-11-25 08:35:03 UTC
One more question:
do all the applications have the same DBUS API to open the new file ?

If not, this is a big problem, because I can not know in advance what
application handles some file format (or web browsing).
Comment 8 Eero Tamminen nokia 2008-11-25 12:30:41 UTC
This seems to give you what kind of D-BUS APIs applications offer:
  grep X-Osso-URI-Action /usr/share/applications/hildon/*.desktop

And the API for using this seems to be <hildon-mime.h> provided by
libhildonmime-dev package.  It seems to be undocumented though, header file
doesn't have any comments and it's not listed here:
  http://maemo.org/development/documentation/apis/4-1/

Until there're API docs, the sources for the library might help:
  http://repository.maemo.org/pool/diablo/free/libh/libhildonmime/


Could you make a bug about the missing API documentation?
Comment 9 Miroslav Rajcic (reporter) 2008-11-25 13:16:26 UTC
Thank you for your help.
I'll open the new bug for documentation as you've suggested.
Comment 10 Andre Klapper maemo.org 2008-11-25 18:20:51 UTC
(In reply to comment #5)
> Andre, I think there could be a bug about mime handlers not being desktop
> compatible.  This could then be added to Quim's Mainstream alignment wiki.

Right... I assume this is gnome-vfs stuff (though I see some gvfs in
https://stage.maemo.org/svn/maemo/projects/haf/trunk/gvfs/)...
Or is this already covered by shipping xdg-utils for Fremantle (bug 2724)?
Sigh, I should become more technical... :)

Note to myself: http://wiki.maemo.org/Mainstream_Linux_Alignment
Comment 11 Eero Tamminen nokia 2008-11-25 19:00:24 UTC
(In reply to comment #10)
...
> Note to myself: http://wiki.maemo.org/Mainstream_Linux_Alignment
>
> Or is this already covered by shipping xdg-utils for Fremantle (bug 2724)?

That's about command line tools for invoking things like Browser & Email i.e.
this which is part of mainstream alignment, another one is providing standard
APIs for doing this from one's own programs.


> Right... I assume this is gnome-vfs stuff (though I see some gvfs in
> https://stage.maemo.org/svn/maemo/projects/haf/trunk/gvfs/)...

Good point.  As Fremantle provides both GnomeVFS and GVFS and in upstream GVFS
has replaced / is replacing GnomeVFS, I think the GnomeVFS thing could be
wontfix (especially if the libhildonmime thing would be documented...).  I have
no idea how mime info and mime launching are done with GVFS (and whether it
will work with Maemo D-BUS application invocations) though.
Comment 12 Mika Yrjölä 2008-12-04 12:59:24 UTC
(In reply to comment #11)

> Good point.  As Fremantle provides both GnomeVFS and GVFS and in upstream GVFS
> has replaced / is replacing GnomeVFS, I think the GnomeVFS thing could be
> wontfix (especially if the libhildonmime thing would be documented...).  I have
> no idea how mime info and mime launching are done with GVFS (and whether it
> will work with Maemo D-BUS application invocations) though.

While not strictly speaking useful for the original issue, here are some notes
about the GVFS and aforementioned features:

GIO (which is a part of the GVFS) seems to have support for getting MIME /
content info in general:

http://library.gnome.org/devel/gio/unstable/gio-GContentType.html

It also appears to provide GAppInfo, which includes support for either querying
the default application that can handle a given content type or directly
launching something that can handle a given URI:

http://library.gnome.org/devel/gio/unstable/GAppInfo.html

Thus theoretically GVFS should be able to provide the same functionality as
GnomeVFS does as far as these matters are concerned. I don't have any personal
experience about how well or badly the said stuff works, and equally little
about how it fits together with the said maemo D-BUS application invocation
stuff now or in the future :)
Comment 13 Andre Klapper maemo.org 2009-03-10 13:37:37 UTC
Fremantle alpha provides the packages gnome-vfs-filechooser-backend (also in
Diablo), libgvfscommon0 and libglib2.0-0 (also in Diablo).

Can you test this again in Fremantle alpha if you're brave enough to port
Notecase to a non-API-stable platform like Fremantle alpha is?

This is a WONTFIX for Diablo (limited resources & different priorities).

And what is the ID of the bug report mentioned in comment 9?
Comment 14 Miroslav Rajcic (reporter) 2009-03-10 14:11:34 UTC
> Can you test this again in Fremantle alpha if you're brave enough to port
> Notecase to a non-API-stable platform like Fremantle alpha is?
This can be a problem. As I've explained, I don't own the Nokia device.
And testing within the SDK is a pain :(

> And what is the ID of the bug report mentioned in comment 9?
https://bugs.maemo.org/show_bug.cgi?id=3890
Comment 15 Eero Tamminen nokia 2009-03-10 18:15:31 UTC
(In reply to comment #13)
> Fremantle alpha provides the packages gnome-vfs-filechooser-backend (also in
> Diablo), libgvfscommon0 and libglib2.0-0 (also in Diablo).
> 
> Can you test this again in Fremantle alpha if you're brave enough to port
> Notecase to a non-API-stable platform like Fremantle alpha is?

I'm pretty sure it's not fixed for Fremantle.
I don't think gnome-vfs is being updated for this. Kimmo?
Comment 16 Andre Klapper maemo.org 2009-05-06 13:03:07 UTC
(In reply to comment #15)
> I'm pretty sure it's not fixed for Fremantle.
> I don't think gnome-vfs is being updated for this. Kimmo?

Kimmo, can you answer this?
Comment 17 Kimmo Hämäläinen nokia 2009-05-06 13:23:58 UTC
(In reply to comment #16)
> (In reply to comment #15)
> > I'm pretty sure it's not fixed for Fremantle.
> > I don't think gnome-vfs is being updated for this. Kimmo?
> 
> Kimmo, can you answer this?

I'm not GnomeVFS maintainer, but I can ask around. Which version of GnomeVFS
you need?  Or better yet, where is the patch?
Comment 18 Andre Klapper maemo.org 2009-05-06 13:42:50 UTC
(In reply to comment #17)
> I'm not GnomeVFS maintainer,

OK, I've removed you as default assignee for gnomevfs in maemo.org Bugzilla.

> but I can ask around. Which version of GnomeVFS
> you need?  Or better yet, where is the patch?

No patches, but there is test code. See comment 0.
Comment 19 Andre Klapper maemo.org 2009-05-26 12:04:58 UTC
WONTFIX for Diablo (not a critical issue), but I definitely like to know
whether this still happens in Fremantle SDK beta.

Fremantle still includes gnome-vfs but it is deprecated.
Glib/Gio && gvfs usage is recommended and definitely the way to go.
Comment 20 Andre Klapper maemo.org 2009-12-30 15:54:06 UTC
This report was filed against Maemo4 ("Diablo").
The N900 and Maemo5 ("Fremantle") have been available for some time now.

If you own an N900, we kindly ask you to retest this with Maemo5 if possible,
and update this report by describing whether this still happens and which exact
Maemo5 version you use (Settings > General > About product).

This is unfortunately a WONTFIX for Maemo4 as Maemo4 is in maintenance mode and
Nokia will only provide bugfixes for critical issues if at all, as Nokia
currently seems to concentrate on Maemo5 and future Maemo releases. Hence
without any status updates, this report will be closed within the next months.

Sorry that your issue could not be fixed for Maemo4. For your interest the Mer
project aims to provide a community backport of Maemo5 for 770/N8x0 devices.
See http://wiki.maemo.org/Mer for more information.
Comment 21 Andre Klapper maemo.org 2010-03-11 16:43:34 UTC
WONTFIX for Maemo4, as written already. Please reopen if still valid in Maemo5.