GNOME Bugzilla – Bug 166197
gnome_vfs_mime_application_launch and gnome_url_show should use startup notification
Last modified: 2010-03-28 07:15:22 UTC
At the moment the only way to launch an app using the startup notification (after having used the gnome-vfs mime APIs) seems to be to get the path to the .desktop file, and pass this to libgnomedesktop, then get that to launch the app. Gnome-vfs should really have an API to launch apps using startup notification. Note that to do this the app also needs a way to set the xserver time, much like the gnome_desktop_item_set_launch_time function. AIUI there are 2 parts to this: 1) Setting an env variable so that focusing works correctly, this is the bit that needs the xserver time 2) Hooking up with libstartupnotification so that the cursor spins (and the "Starting foo" entry appears in the window list) The code to do all this in libgnome-desktop is: http://cvs.gnome.org/viewcvs/gnome-desktop/libgnome-desktop/gnome-desktop-item.c?view=markup
Note that Crispin has said in IRC that he has gotten startup-notification to work in Galeon by using both gnome-vfs and gnome-desktop, so if anyone else is bit by this bug and wants to work around it in 2.10.x, be sure to ask Crispin how he did it. :-)
*** Bug 115727 has been marked as a duplicate of this bug. ***
Please do not use gnome-desktop API to work around this issue. It's far from being a good solution and it's going to cause bugs. Nautilus is doing this right, even if it requires mode code. I think we should write generic code for epiphany/galeon and add it to libegg.
Btw this cannot be added directly to gnome-vfs because it depends on gtk+. Maybe libgnomevfsui is in order...
There are already some graphical gnome-vfs stuff in libgnomeui (the authentication dialog), I guess additionnal graphical gnome-vfs apis could go there in the mean time.
A variant of gnome_vfs_url_show is also needed that takes a launch time timestamp (see bug 273912; I believe that would also mostly solve bug 166722, as then gnome_url_show could just call gnome_vfs_url_show).
This is pretty tricky architecture-wise. Should we really make GnomeVFS deal with X11-related code? Maybe we can have an extra module that requires X and provides GnomeVFS with these caps?
(In reply to comment #7) > This is pretty tricky architecture-wise. Should we really make GnomeVFS deal > with X11-related code? Maybe we can have an extra module that requires X and > provides GnomeVFS with these caps? What about libgnomeui? It already provides gnome_url_show_on_screen() (or something like this).
http://live.gnome.org/LibgnomeMustDie implies libgnomeuimustdie, doesn't it?
Well, I prefer adding API to a dying library so we can fix this problem now than waiting for a new library. The other solution is to start libgnomevfsui. You can choose :-)
gnome-vfs is not actively developed anymore and has been replaced by gvfs. If this is still an issue in a recent GNOME version (2.28 or 2.30) which uses gvfs: Please file a new bug report against gvfs with good steps to reproduce, or move this existing report to the product gvfs. If this is not an issue anymore in a recent GNOME version, please close this report as RESOLVED OBSOLETE. For gnome-vfs, this is a WONTFIX.
This works fine with gio.