Bug 529287 - gnome updates
Summary: gnome updates
Alias: None
Product: Fedora
Classification: Fedora
Component: xdg-utils
Version: rawhide
Hardware: All
OS: Linux
Target Milestone: ---
Assignee: Rex Dieter
QA Contact: Fedora Extras Quality Assurance
Depends On:
Blocks: F12Target
TreeView+ depends on / blocked
Reported: 2009-10-15 23:47 UTC by Matthias Clasen
Modified: 2010-02-28 23:47 UTC (History)
2 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Last Closed: 2009-10-16 17:27:26 UTC
Type: ---

Attachments (Terms of Use)

System ID Private Priority Status Summary Last Updated
FreeDesktop.org 26811 0 None None None Never
GNOME Bugzilla 542880 0 None None None Never

Description Matthias Clasen 2009-10-15 23:47:48 UTC
When xdg-open thinks that it runs in a gnome session, it uses gnome-open. 
There is two problems here: 

- In the last few gnome releases, gvfs-open is the commandline tool of choice.

- The way the gnome session detection works is by looking for a GNOME_DESKTOP_SESSION_ID env var. This does still work with current gnome-session, but the variable is set to 'this-is-deprecated'. A better way to detect a gnome session nowadays is to look for org.gnome.SessionManager on the session bus.

Comment 1 Rex Dieter 2009-10-16 00:31:04 UTC
I've been meaning to ask you about stuff like that and you pre-empted me.  Thanks!

I'll make sure these fixes land soon.

Comment 2 Rex Dieter 2009-10-16 00:38:54 UTC
Do you offhand when support for gvfs-open and org.gnome.SessionManager landed in gnome?  and whether support for the deprecated items can (or should) be dropped?

Otherwise, I suppose we could just be safe and try the new methods, and fallback to the older ones on failure.

Comment 3 Matthias Clasen 2009-10-16 03:18:02 UTC
gvfs-open appeared in 2.22, I think and the session manager dbus interface in 2.24. But I don't think dropping the old ways of doing things is necessary. You can just look for gvfs-open and prefer it over gnome-open if found.

For the gnome detection, looking for the dbus interface is preferable over the env var, since e.g things that are activated on the session bus will not have the deprecated env var in their environment, I think. If any such activated app were to use xdg-open, it would not realize it was running under gnome.

Comment 4 Rex Dieter 2009-10-16 16:00:09 UTC
OK, my dbus-send-fu is a bit lacking, but would checking output or error code of something like the following suffice as a good check for org.gnome.SessionManager existing on the bus:

dbus-send --print-reply --dest=org.gnome.SessionManager /org/gnome/SessionManager org.freedesktop.DBus.Introspectable.Introspect


Comment 5 Rex Dieter 2009-10-16 17:04:25 UTC
better suggestion on irc:
[11:16] <walters> rdieter: dbus-send --print-reply --dest=org.freedesktop.DBus /org/freedesktop/DBus org.freedesktop.DBus.GetNameOwner string:org.gnome.SessionManager

Comment 6 Rex Dieter 2009-10-16 17:27:26 UTC
* Fri Oct 16 2009 Rex Dieter <rdieter@fedoraproject.org> - 1.0.2-14.20091016cvs
- prefer gvfs-open over gnome-open (#529287)
- DE=gnome, if org.gnome.SessionManager exists on dbus (#529287)

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