[BRLTTY] More then one connection to brlapi

Samuel Thibault samuel.thibault at ens-lyon.org
Wed Nov 23 05:30:00 EST 2005


Hi,

Ah, from reading the source code in speechd-el, the implementation is
incorrect there.

Jan Buchal, le Wed 23 Nov 2005 10:56:21 +0100, a écrit :
>     ST> I guess this shows up when you run emacs. How do you run emacs?
>     ST> In its own window (like xemacs), 
> Yes in own window.

Ok. I guess brltty.el can get from emacs the ID of the X window in which
it is running?

The correct implementation would be:

- If the WINDOWSPATH environment variable exists, decode its content
as a list of integers (the content of the variable is expected to be
something like 8:12345:23456)
- Else (WINDOWSPATH was not defined by xsession/xinitrc), if running in
an X environment, grab the VT number from the XFree86_VT X property and
use that as a list of one integer.
- Else, emacs is running on the linux console, use an empty integer
list.

- Then, if emacs is running in its own window, append the window ID to
this integer list.
- Else, if it exists, append the content of the WINDOWID environment
variable (running in an xterm),
- Else (i.e. running on the linux text console), determine the
controlling tty by looking in /proc/self/stat the major and minor number
of the controlling tty (7th part)

And when sending the 'gettty packet, send the size of this list and its
content. The BrlAPI server will then know for instance that emacs is
running in its own X window of VT 8.

Regards,
Samuel


More information about the BRLTTY mailing list