Re: bonobo activation environment matching and DISPLAY
- From: "Gustavo J. A. M. Carneiro" <gjc inescporto pt>
- To: Alexander Larsson <alexl redhat com>
- Cc: Bill Haneman Sun COM, "desktop-devel-list gnome org" <desktop-devel-list gnome org>, Padraig Obriain Sun COM
- Subject: Re: bonobo activation environment matching and DISPLAY
- Date: Fri, 20 Aug 2004 22:15:58 +0100
A Sex, 2004-08-20 às 07:46, Alexander Larsson escreveu:
> 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()));
This is for the old "bonobo activation environment" API, which works
with an artificial environment. The new bonobo:environment property of
<oaf_server> matches against the real unix process environment.
Therefore, to achieve the same effect with this method one one have to
do the same as in nautilus, but replacing
bonobo_activation_set_activation_env_value with setenv (or g_setenv).
--
Gustavo J. A. M. Carneiro
<gjc inescporto pt> <gustavo users sourceforge net>
The universe is always one step beyond logic
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]