[BRLTTY] Some more about SBL (Re: attribute tracking, was re: Recommended live distribution)

Klaus Knopper brltty at knopper.net
Thu Sep 20 05:38:54 EDT 2012


Hello Dave,

It's nice to talk a little about SBL now.

On Wed, Sep 19, 2012 at 09:19:23PM -0400, Dave Mielke wrote:
> [quoted lines by Klaus Knopper on 2012/09/20 at 02:17 +0200]
> 
> >1. SBL detects the program running on the current text console by
> >reading its associated processes command name. For example, "elinks".
> 
> Am I correct that, for example, it'd always be "screen" if a user is using 
> screen-maintained sessions?

Not necessarily, it depends on what SBL detects as the most recent
program on this console. Screen uses pseudo-terminals (/dev/pts/*) by
default for its internal session management, so it's not apparent to SBL
that the a program is using /dev/tty* instead as controlling terminal.
In this case, you have to switch profiles manually. In ADRIANE, I use
real virtual consoles instead of "screen" for this reason, the first 10
consoles. Beginners seem to be more comfortable switching by
Alt-F1...Alt-F10 rather than Control-A+number.

The same is true is you login to a different computer from the virtual
console via SSH. SBL does not know what's running on the remote machine,
it would use the ssh profile instead (or a default profile, if there is
no special one for ssh). Switching the profile manually is possible.

With a little luck, your default profile will handle the right attribute
cursors for different programs (up to 4 of them can be preconfigured)
that you are using with screen. The main difficulty for the default
profile is probably deciding between attribute position cursor and text
position cursor. If a text in the console contains a highlighted part or
special text attributes, the attribute cursor positioning would prefer
this over the text cursor position with csrmode=2 (see below).

> >2. SBL automatically sets volume, pitch, speech, language, braille
> >modes, charmode or linemode and attribute cursor tracking and other
> >behaviour specific to this program, in this example from a config file
> >/etc/sbl/profile/elinks.
> 
> Does each profile contain the complete list of settings?

Only those that are subject to be changed for a program. But it makes
sense to put most of them in the config file, since the previous program
may have set an option that you want to revert in the next program.

> Let's say that I start out with Setting1 and Setting2 both set to off. The 
> profile for Program1 sets Setting1 to on, and the profile for Program2 sets 
> Setting2 to on. I run Program1, then Program2, and then Program1 again. Will 
> Setting1 and Setting2 now both be on, or does it always reload the defaults 
> before applying a profile?

It sets the default profile in the beginning, and then it loads the
program-specific profile, keeping the previous values if they are not
reset in the new profile. Of course, this could be changed. Manual
changes of volume etc. set by hotkeys are overridden when the profile
reloads next time (i.e. when switching consoles). So, the behaviour of
SBL is up to your choice of what's inside the profiles, and what isn't.

> Could you please give an example or two for how an attribute-based cursor is 
> defined?

Example attribute tracking cursor profile for elinks, with comments:

# Place reading cursor at the next occurence of Attribute 1
# means: Look for bit 3 set (background highlighting in elinks
# for hovered hyperlinks)
attrcsr1=***1****

# The attribute cursor is only looked for between coordinates 0,0 to 80,24,
# so we don't get always caught in the status line of elinks
attrcsr1xy=00,00-80,24

# csrmode=1 means "follow the attribute cursor ONLY, ignore the text cursor"
csrmode=1

# The system (text) cursor, which we don't use in elinks,
# is only looked for between coordinates 0,0 to 80,24
syscsrlimit=00,00-80,24

The full profile documentation can be found at
http://www.openblinux.de/en/index.php?page=profile
(the formatting seems a little broken there, the original text file
in the sources is OK).

Regards
-Klaus


More information about the BRLTTY mailing list