Re: bonobo activation environment matching and DISPLAY

On Thu, 2004-08-19 at 17:59, Bill Haneman wrote:
> Hi:
> Bonobo activation allows matching of services by environment string. 
> This is used in accessibility code, for instance when identifying a
> magnification service, speech server, or at-spi-registryd appropriate to
> a particular desktop session.
> However the env matching logic in bonobo-activation requires perfect
> string matches.  Any applications which are spawned in an environment
> which gets DISPLAY from gdk_get_display (for instance, children of
> gnome-session) end up with a potentially different environment from
> gnome-session itself, or the initial shell.  We're still investigating
> why, but at first glance it looks as though gdk_get_display constructs a
> display:screen string rather than just doing getenv("DISPLAY").
> We're wondering what the best fix is - should we just special case the
> matching of DISPLAY in bonobo-activation, rather than trying to enforce
> consistent values of DISPLAY among desktop processes?  Or should we call
> gdk_get_display and re-normalize the environment of the client before
> doing a bonobo-activation query?

Nautilus does this early in main(), before registering to b-a to
canonicalize the DISPLAY env var:

	/* Need to set this to the canonical DISPLAY value, since
	   thats where we're registering per-display components */
	bonobo_activation_set_activation_env_value ("DISPLAY",
						    gdk_display_get_name (gdk_display_get_default()));

> Either way it looks like a special case hack... ?
> See bugzilla #136896.

That bug looks unrelated.

 Alexander Larsson                                            Red Hat, Inc 
                   alexl redhat com    alla lysator liu se 
He's a genetically engineered Amish cyborg haunted by an iconic dead American 
confidante She's an elegant tempestuous socialite fleeing from a Satanic cult. 
They fight crime! 

[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]