[BRLTTY] More then one connection to brlapi

Samuel Thibault samuel.thibault at ens-lyon.org
Mon Nov 14 06:05:39 EST 2005


Jan Buchal, le Mon 14 Nov 2005 10:24:59 +0100, a écrit :
> I need use more then one connection to brlapi. I use gnopernicus with
> brltty's api and Emacs with brlapi connection. If I started gnopernicus
> first then brlapi run and show on braille display. After I started Emacs
> with brlapi support which works OK and show on braille display. but when
> I switch to other window gnopernicus talks but not show on braille
> display until I stop the Emacs. 
> 
> any solution?

Yes. It isn't documented yet, but xbrlapi is intended to give the
necessary focus information. When running your X session,

- Run xbrlapi, it will grab tty 7 (the one the X server runs on), and
  tell the brlapi server which X window has the focus.
- Run gnopernicus, it will grab tty 7 too.
- Set the WINDOWSPATH environment variable to 7.
- Run your xterminal. The shell running in it will inherit WINDOWSPATH.
- Run emacs in the terminal. brlapi will concatenate the WINDOWSPATH
  variable and the WINDOWID variable (set by the xterminal) and grab
  that.

Then the brlapi server will know precisely when the xterminal (hence
emacs) has focus, and else default to gnopernicus.

Note the race condition on the start order of xbrlapi and gnopernicus.
We will implement a "priority" property for brlapi connections for
fixing this issue.

On the long run, the system's xinitrc should get modified to set the
WINDOWSPATH environment variable itself.

Regards,
Samuel


More information about the BRLTTY mailing list