BRLTTY: The Build Procedure

Next Previous Contents

## 3. The Build Procedure

BRLTTY can be downloaded from its web site (see section Contact Information for its location). All releases are provided as compressed tar balls. Newer releases are also provided as RPM (RedHat Package Manager) files.

That tidbit of information has probably peaked your curiosity, and now you just can't wait to get started. It's a good idea, though, to first become familiar with the files which will ultimately be installed.

## 3.1 Installed File Hierarchy

The build procedure should result in the installation of the following files:

/bin/

  brltty

    The BRLTTY program.

  brltty-install

    A utility for copying BRLTTY's installed file hierarchy from one location to another.

  brltty-config

    A utility which sets a number of environment variables to values which reflect the current installation of BRLTTY.

/etc/

  brltty.conf

    System defaults for BRLTTY.

  brlapi.key

    The access key for BrlAPI.

/etc/brltty/

  Your installation of BRLTTY may not have all of the following types of files. They're only created as needed based on the build options you select (see Build Options).

  *.conf

    Driver-specific configuration data. Their names look more or less like `brltty-`driver`.conf`, where driver is the two-letter driver identification code.

  *.ctb

    Contraction tables (see section Contracted Braille for details). Their names look like language`-`country`-`level`.ctb`.

  *.cti

    Include files for contraction tables.

  *.hlp

    Driver-specific help pages. Their names look more or less like `brltty-`driver`.hlp`, where driver is the two-letter driver identification code.

  *.tbl

    Translation tables (see section Translation Tables for details). Their names look like `text.`language`.tbl`. There are also a couple of special tables which map character highlighting attributes to braille dots: `attrib.tbl` does it the original way, and `attributes.tbl` does it the current way.

/lib/

  libbrlapi.a

    Static archive of the Application Programming Interface.

  libbrlapi.so

    Dynamically loadable object for the Application Programming Interface.

/lib/brltty/

  Your installation of BRLTTY may not have all of the following types of files. They're only created as needed based on the build options you select (see Build Options).

  brltty-brl.lst

    A list of the braille display drivers which have been built as dynamically loadable shared objects, and, therefore, which can be selected at run-time. Each line consists of the two-letter identification code for a driver, a tab character, and a description of the braille display which that driver is for.

  libbrlttybdriver.so.1

    The dynamically loadable driver for a braille display, where driver is the two-letter driver identification code.

  brltty-spk.lst

    A list of the speech synthesizer drivers which have been built as dynamically loadable shared objects, and, therefore, which can be selected at run-time. Each line consists of the two-letter identification code for a driver, a tab character, and a description of the speech synthesizer which that driver is for.

  libbrlttysdriver.so.1

    The dynamically loadable driver for a speech synthesizer, where driver is the two-letter driver identification code.

/include/brltty/

  C header files for the Application Programming Interface. Their naems look like function`.h` or function`-`driver`.h` (where driver is the two-letter driver identification code).

/man/

  Man pages.

  man1/name.1

    Man pages for BRLTTY-related user commands.

  man3/name.3

    Man pages for Application Programming Interface library routines.

Some optional files which you should be aware of, although they aren't part of the installed file hierarchy, are:

/etc/brltty.conf

  The system defaults configuration file. It's created by the system administrator. See The Configuration File for details.

/etc/brltty-driver.prefs

  The saved preferences settings file (driver is a two-letter driver identification code). It's created by the PREFSAVE command. See Preferences Settings for details.

## 3.2 Installing from a TAR Ball

Here's what to do if you just want to install BRLTTY as quickly as possible, trusting that all of our defaults are correct.

1. Download the source. It'll be a file named `brltty-`release`.tar.gz`, e.g. `brltty-3.0.tar.gz`.
2. Unpack the source into its native hierarchical structure.

   > `tar xzf brltty-release.tar.gz`

   This should create the directory `brltty-`release.
3. Change to the source directory, configure, compile, and install BRLTTY.

   > `cd brltty-release
   > ./configure
   > make install`

   This should be done as root.

To uninstall BRLTTY, do:

> `cd brltty-release
> make uninstall`

That's all there's to it. Now, for those who really want to know what's going on, here are the details.

### Build Options

The first step in building BRLTTY is to configure it for your system and/or for your personal needs. This is done by running the `configure` script in BRLTTY's top-level directory. We've tried to make the defaults fit the most common case, so, assuming that you're not attempting to do anything out of the ordinary, you may not need to do anything more complicated than invoke this script without specifying any options at all.

> `./configure`

If, however, you have some special requirements, or even if you're just adventurous, you should find out what your choices are.

> `./configure --help`

You should also check out the `README` file in the subdirectory containing the driver for your braille display for any additional display-specific instructions.

### System Defaults

`--with-braille-driver=`driver

  Specify the braille display drivers which are to be linked into the BRLTTY binary. Those drivers which aren't listed via this option are built as dynamically loadable shared objects and can still be selected at run-time. Each driver must be identified either by its two-letter driver identification code or by its proper name (full or abbreviated). The driver identifiers and/or names must be separated from one another by a single comma. If a driver identifier is prefixed by a minus sign (`-`), then that driver is excluded from the build. The first non-excluded driver becomes the default driver. There's no default driver if this option isn't used. Any of the following words can also be used as the operand of this option:

  all

    Link all of the drivers into the binary. Don't build any of them as dynamically loadable shared objects. This word may also be specified as the final element of a driver list. This is how to specify the dfault driver when all the drivers are to be linked in.

  -all

    Only build those drivers which have been explicitly included via this option.

  no

    Don't build any drivers at all. This is equivalent to specifying `--without-braille-driver`.

  yes

    Build all of the drivers as dynamically loadable shared objects. Don't link any of them into the binary. This is equivalent to specifying `--with-braille-driver`.

  See the braille-driver configuration file directive and the -b command line option for run-time selection.
`--with-braille-parameters=`[driver`:`]name`=`value`,`...

  Specify the default parameter settings for the braille display drivers. If the same parameter is specified more than once, then its rightmost assignment is used. If a parameter name is qualified by a driver (see section Driver Identification Codes) then that setting only applies to that driver; if it isn't then it applies to all drivers. For a description of the parameters accepted by a specific driver, please see the documentation for that driver. See the braille-parameters configuration file directive and the -B command line option for run-time selection.

`--with-braille-device=`device`,`...

  Specify the default device to which the braille display is connected (see section Braille Device Specification). If this option isn't specified, then an operating system appropriate path for the primary serial port is assumed. See the braille-device configuration file directive and the -d command line option for run-time selection.

`--with-text-table=`file

  Specify the default text translation table (see section Text Translation for details). The absolute path to a table outside the source tree may be specified. The `.tbl` extension is optional. For a simple file name, the `text.` prefix is optional. If this option isn't specified, then `nabcc`, a commonly (in North America) used 8-dot variant of the North American Braille Computer Code, is assumed. See the text-table configuration file directive and the -t command line option for run-time selection. This setting can be changed with the Text Table preference.

`--with-attributes-table=`file

  Specify the default attributes translation table (see section Attributes Translation for details). The absolute path to a table outside the source tree may be specified. The `.tbl` extension is optional. If this option isn't specified, then `attributes` is assumed. Change it to `attrib` if you'd like it done the old way. See the attributes-table configuration file directive and the -a command line option for run-time selection. This setting can be changed with the Attributes Table preference.

`--with-speech-driver=`driver

  Specify the speech synthesizer drivers which are to be linked into the BRLTTY binary. Those drivers which aren't listed via this option are built as dynamically loadable shared objects and can still be selected at run-time. Each driver must be identified either by its two-letter driver identification code or by its proper name (full or abbreviated). The driver identifiers and/or names must be separated from one another by a single comma. If a driver identifier is prefixed by a minus sign (`-`), then that driver is excluded from the build. The first non-excluded driver becomes the default driver. There's no default driver if this option isn't used. Any of the following words can also be used as the operand of this option:

  all

    Link all of the drivers into the binary. Don't build any of them as dynamically loadable shared objects. This word may also be specified as the final element of a driver list. This is how to specify the dfault driver when all the drivers are to be linked in.

  -all

    Only build those drivers which have been explicitly included via this option.

  no

    Don't build any drivers at all. This is equivalent to specifying `--without-speech-driver`.

  yes

    Build all of the drivers as dynamically loadable shared objects. Don't link any of them into the binary. This is equivalent to specifying `--with-speech-driver`.

  See the speech-driver configuration file directive and the -s command line option for run-time selection.
`--with-speech-parameters=`[driver`:`]name`=`value`,`...

  Specify the default parameter settings for the speech synthesizer drivers. If the same parameter is specified more than once, then its rightmost assignment is used. If a parameter name is qualified by a driver (see section Driver Identification Codes) then that setting only applies to that driver; if it isn't then it applies to all drivers. For a description of the parameters accepted by a specific driver, please see the documentation for that driver. See the speech-parameters configuration file directive and the -S command line option for run-time selection.

`--with-flite=`directory

  Specify the installed location of the FestivalLite text-to-speech package, and build the FestivalLite speech synthesizer driver (see Build Restrictions). Any of the following words can also be used as the operand of this option:

  no

    Don't build the driver. This is equivalent to specifying `--without-flite`.

  yes

    Build the driver if the package can be found in `/usr`, `/usr/local`, or `/opt/flite`. This is equivalent to specifying `--with-flite`.

`--with-flite-language=`language

  Specify the language which the FestivalLite text to speech engine is to use. The default language is `usenglish`.

`--with-flite-lexicon=`lexicon

  Specify the lexicon which the FestivalLite text to speech engine is to use. The default lexicon is `cmulex`.

`--with-flite-voice=`voice

  Specify the voice which the FestivalLite text to speech engine is to use. The default voice is `cmu_us_kal16`.

`--with-mikropuhe=`directory

  Specify the installed location of the Mikropuhe text-to-speech package, and build the Mikropuhe speech synthesizer driver (see Build Restrictions). Any of the following words can also be used as the operand of this option:

  no

    Don't build the driver. This is equivalent to specifying `--without-mikropuhe`.

  yes

    Build the driver if the package can be found in `/usr`, `/usr/local`, or `/opt/mikropuhe`. This is equivalent to specifying `--with-mikropuhe`.

`--with-theta=`directory

  Specify the installed location of the Theta text-to-speech package, and build the Theta speech synthesizer driver (see Build Restrictions). Any of the following words can also be used as the operand of this option:

  no

    Don't build the driver. This is equivalent to specifying `--without-theta`.

  yes

    Build the driver if the package can be found in `/usr`, `/usr/local`, or `/opt/theta`. This is equivalent to specifying `--with-theta`.

`--with-viavoice=`directory

  Specify the installed location of the ViaVoice text-to-speech package, and build the ViaVoice speech synthesizer driver (see Build Restrictions). Any of the following words can also be used as the operand of this option:

  no

    Don't build the driver. This is equivalent to specifying `--without-viavoice`.

  yes

    Build the driver if the package can be found in `/usr`, `/usr/local`, or `/opt/viavoice`. This is equivalent to specifying `--with-viavoice`.

`--with-screen-driver=`driver

  Specify the screen driver. It may be one of the following:

  linux

    This driver provides direct access to the Linux console screen. It's only selectable, and is the default, on Linux systems.

  shm

    This driver provides access to the `screen` program. It's selectable on all systems, and is the default on most. The patch for `screen` which we provide (see the `Patches` subdirectory) must be applied. Use of this driver, due to the fact that `screen` must be concurrently running, makes BRLTTY effectively useful only after the user has logged in.

  If this option isn't specified, then an operating system appropriate selection is made. If a specific driver for the current operating system is available, then it's used. If not, then `shm` is used.
`--with-screen-parameters=`name`=`value`,`...

  Specify the default parameter settings for the screen driver. If the same parameter is specified more than once, then its rightmost assignment is used. For a description of the parameters accepted by a specific driver, please see the documentation for that driver. See the screen-parameters configuration file directive and the -X command line option for run-time selection.

### Directory Specification

`--with-execute-root=`directory

  Specify the directory at which the installed file hierarchy is to be rooted at run-time. The absolute path should be supplied. If this option isn't specified, then the system's root directory is assumed. Use this option if you need to install BRLTTY's run-time files in a non-standard location. You need to use this feature, for example, if you'd like to have more than one version of BRLTTY installed at the same time (see section Installing Multiple Versions for an example of how to do this).

`--with-install-root=`directory

  Specify the directory beneath which the installed file hierarchy is to be installed. The absolute path should be supplied. If this option isn't specified, then the run-time package root (see the --with-execute-root build option) is assumed. This directory is only used by make install and make uninstall. Use this option if you need to install BRLTTY in a different location than the one from which it'll ultimately be executed. You need to use this feature, for example, if you're building BRLTTY on one system for use on another.

`--prefix=`directory

  Specify the directory within the installed file hierarchy where the default directories for the architecture-independent files are to be rooted. These directories include:

  - the data directory
  - the configuration directory
  - the manpage directory
  - the include directory
  The absolute path should be supplied. If this option isn't specified, then the system's root directory is assumed. This directory is rooted at the directory specified by the --with-execute-root build option.
`--exec-prefix=`directory

  Specify the directory within the installed file hierarchy where the default directories for the architecture-dependent files are to be rooted. These directories include:

  - the program directory
  - the library directory
  - the API directory
  The absolute path should be supplied. If this option isn't specified, then the directory specified via the --prefix build option is assumed. This directory is rooted at the directory specified by the --with-execute-root build option.
`--libdir=`directory

  Specify the directory within the installed file hierarchy where the static archive and the dynamically loadable object for the Application Programming Interface are to be installed. The absolute path should be supplied. If this option isn't specified, then the directory specified via the standard configure option `--libdir` (which defaults to `/lib` rooted at the directory specified by the --exec-prefix build option) is assumed. The directory is created if it doesn't exist.

`--sysconfdir=`directory

  Specify the directory within the installed file hierarchy where the configuration files are to be installed. The absolute path should be supplied. If this option isn't specified, then the directory specified via the standard configure option `--sysconfdir` (which defaults to `/etc` rooted at the directory specified by the --prefix build option) is assumed. The directory is created if it doesn't exist.

`--with-program-directory=`directory

  Specify the directory within the installed file hierarchy where the runnable programs (binaries, executables) are to be installed. The absolute path should be supplied. If this option isn't specified, then the directory specified via the standard configure option `--bindir` (which defaults to `/bin` rooted at the directory specified by the --exec-prefix build option) is assumed. The directory is created if it doesn't exist.

`--with-library-directory=`directory

  Specify the directory within the installed file hierarchy where the drivers and other architecture-dependent files are to be installed. The absolute path should be supplied. If this option isn't specified, then the `brltty` subdirectory of the directory specified via the standard configure option `--libdir` (which defaults to `/lib` rooted at the directory specified by the --exec-prefix build option) is assumed. The directory is created if it doesn't exist.

`--with-data-directory=`directory

  Specify the directory within the installed file hierarchy where the tables, help pages, and other architecture-independent files are to be installed. The absolute path should be supplied. If this option isn't specified, then the `brltty` subdirectory of the directory specified via the standard configure option `--sysconfdir` (which defaults to `/etc` rooted at the directory specified by the --prefix build option) is assumed. The directory is created if it doesn't exist.

`--with-manpage-directory=`directory

  Specify the directory within the installed file hierarchy where the man pages are to be installed. The absolute path should be supplied. If this option isn't specified, then the directory specified via the standard configure option `--mandir` (which defaults to `/man` rooted at the directory specified by the --prefix build option) is assumed. The directory is created if it doesn't exist.

`--with-include-directory=`directory

  Specify the directory within the installed file hierarchy where the C header files for the Application Programming Interface are to be installed. The absolute path should be supplied. If this option isn't specified, then the `brltty` subdirectory of the directory specified via the standard configure option `--includedir` (which defaults to `/include` rooted at the directory specified by the --prefix build option) is assumed. The directory is created if it doesn't exist.

### Build Features

These options are primarily useful when building BRLTTY for use on a boot disk.

`--enable-standalone-programs`

  Create statically linked, rather than dynamically linked, programs. This option removes all dependencies on shared objects at run-time. Only the default drivers (see the --with-braille-driver and the --with-speech-driver build options) are compiled.

`--disable-preferences-menu`

  Reduce program size by excluding the preferences menu (see section The Preferences Menu).

`--disable-table-selection`

  Reduce program size by excluding the table selection entries from the preferences menu (see the Text Table, Attributes Table, and Contraction Table preferences).

`--disable-learn-mode`

  Reduce program size by excluding command learn mode (see section Command Learn Mode).

`--disable-contracted-braille`

  Reduce program size by excluding support for contracted braille (see section Contracted Braille).

`--disable-usb-support`

  Reduce program size by excluding support for USB devices.

`--disable-bluetooth-support`

  Reduce program size by excluding support for bluetooth devices.

`--disable-speech-support`

  Reduce program size by excluding support for speech synthesizers.

`--disable-beeper-support`

  Reduce program size by excluding support for the console tone generator.

`--disable-pcm-support`

  Reduce program size by excluding support for the digital audio interface on the sound card.

`--enable-pcm-support=`interface

  If a platform provides more than one digital audio interface then the one which is to be used may be specified.

  Platform | Interface | Description
  Linux | oss | Open Sound System
  | alsa | Advanced Linux Sound Architecture

`--disable-midi-support`

  Reduce program size by excluding support for the Musical Instrument Digital Interface of the sound card.

`--enable-midi-support=`interface

  If a platform provides more than one Musical Instrument Digital Interface then the one which is to be used may be specified.

  Platform | Interface | Description
  Linux | oss | Open Sound System
  | alsa | Advanced Linux Sound Architecture

`--disable-fm-support`

  Reduce program size by excluding support for the FM synthesizer on an AdLib, OPL3, Sound Blaster, or equivalent sound card.

`--disable-pm-configfile`

  Reduce program size by excluding support for the Papenmeier driver's configuration file.

`--enable-gpm`

  Include an interface to the `gpm` application so that, on systems which support it, BRLTTY will interact with the pointer (mouse) device (see section Pointer (Mouse) Support via GPM).

`--enable-api`

  Include the Application Programming Interface.

`--with-api-parameters=`name`=`value`,`...

  Specify the default parameter settings for the Application Programming Interface. If the same parameter is specified more than once, then its rightmost assignment is used. For a description of the parameters accepted by the interface, please see the BrlAPI reference manual. See the api-parameters configuration file directive and the -A command line option for run-time selection.

### Miscellaneous Options

`--with-compiler-prefix=`prefix

  Specify the prefix (path and beginning of program name) for the suite of compile and link tools which are to be used. You may need to use this option if, for example, you're cross-compiling for a different architecture.

`--with-init-path=`path

  Specify the path to the real `init` program for the system. The absolute path should be supplied. If this option is specified, then:

  1. The `init` program should be moved to a new location.
  2. `brltty` should be moved to the `init` program's original location.
  3. When the system runs `init` at startup, `brltty` is actually run. It puts itself into the background, and runs the real `init` in the foreground. This is one (somewhat sneaky) way to have braille right at the outset. It's especially useful for some install/rescue disks.
  If this option isn't specified, then this feature isn't activated.

### Make File Targets

Once BRLTTY has been configured, the next steps are to compile and to install it. These are done by applying the system's `make` command to BRLTTY's main make file (`Makefile` in the top-level directory). BRLTTY's make file supports most of the common application maintenance targets. They include:

make

  A shortcut for `make all`.

make all

  Compile and link the BRLTTY executable, its drivers and their help pages, its test programs, and a few other small utilities.

make install

  Complete the compile and link phase (see make all), and then install the BRLTTY executable, its data files, drivers, and help pages, in the correct places and with the correct permissions.

make uninstall

  Remove the BRLTTY executable, its data files, drivers, and help pages, from the system.

make clean

  Ensure that the next compile and link (see make all) will be done from scratch by removing the results of compiling, linking, and testing from the source directory structure. This includes the removal of object files, executables, dynamically loadable shared objects, driver lists, help pages, temporary header files, and core files.

make distclean

  In addition to removing the results of compiling and linking (see make clean):

  - Remove the results of BRLTTY configuration (see Build Options). This includes the removal of `config.mk`, `config.h`, `config.cache`, `config.status`, and `config.log`.
  - Remove other files from the source directory structure which tend to accumulate over time but which don't belong there. This includes the removal of editor backup files, test case results, rejected patch hunks, and copies of original source files.

## 3.3 Testing BRLTTY

After compiling, linking, and installing BRLTTY, it's a good idea to give it a quick test before activating it permanently. To do so, invoke it with the command:

> `brltty -bdriver -ddevice`

For driver, specify the two-letter driver identification code corresponding to your braille display. For device, specify the full path for the device to which your braille display is connected.

If you don't want to explicitly identify the driver and device each time you start BRLTTY, then you can take two approaches. You can establish system defaults via the braille-driver and the braille-device configuration file directives, and/or compile your needs right into BRLTTY via the --with-braille-driver and the --with-braille-device build options.

If all is well, BRLTTY's version identification message should appear on the braille display for a few seconds (see the -M command line option). After it goes away (which you can hasten by pressing any key on the display), the area of the screen where the cursor is should appear. This means that you should expect to see your shell's command prompt. Then, as you enter your next command, each character should appear on the display as it's typed on the keyboard.

If this is your experience, then leave BRLTTY running, and enjoy it. If this isn't your experience, then it may be necessary to test each driver separately in order to isolate the source of the probledm. The screen driver can be tested with scrtest, and the braille display driver can be tested with brltest.

If you experience a problem which requires a lot of digging, then you may wish to use the following `brltty` command line options:

- -ldebug to log lots of diagnostic messages.
- -n to keep BRLTTY in the foreground.
- -e to direct diagnostic messages to standard error rather than to the system log.

## 3.4 Starting BRLTTY

BRLTTY, when properly installed, is invoked with the single command `brltty`. A configuration file (see section The Configuration File for details) can be created in order to establish system defaults for such things as the location of the preferences file, the braille display driver to be used, the device to which the braille display is connected, and the text translation table to be used. Many options (see section Command Line Options for details) allow explicit run-time specification of such things as the location of the configuration file, any defaults established within the configuration file, and some characteristics which have reasonable defaults but which those who think they know what they're doing may wish to play with. The -h option displays a summary of all the options. The -V option displays the current version of the program, the API, and the selected drivers. The -v option displays the values of the options after all sources have been considered.

It's probably best to have the system automatically start BRLTTY as part of the boot sequence so that the braille display is already up and running when the login prompt appears. Most (probably all) distributions provide a script wherein user-supplied applications can be safely started near the end of the boot sequence. The name of this script is distribution-dependent. Here are the ones we know about so far:

Red Hat

  `/etc/rc.d/rc.local`

Starting BRLTTY from this script is a good approach (especially for new users). Just add a set of lines like these:

> `

>     if [ -x /bin/brltty -a -f /etc/brltty.conf ]
>     then
>        /bin/brltty
>     fi

> `

This can usually be abbreviated to the somewhat less readable form:

> `

>     [ -x /bin/brltty -a -f /etc/brltty.conf ] && /bin/brltty

> `

Don't add these lines before the first line (which usually looks like `#!/bin/sh`).

If the braille display is to be used by a system administrator, then it should probably be started as early as possible during the boot sequence (like before the file systems are checked) so that the display is usable in the event that something goes wrong during these checks and the system drops into single user mode. Again, exactly where it's best to do this is distribution-dependent. Here are the places we know about so far:

Debian

  `/etc/init.d/boot` (for older releases)
  `/etc/init.d/rcS` (for newer releases)
  A `brltty` package is provided (see [ http://packages.debian.org/brltty]) as of release `3.0` (`Woody`). Since this package takes care of starting BRLTTY, there's no need for user-supplied code to do so if it's installed.

RedHat

  `/etc/rc.d/rc.sysinit`
  Beware that later releases, in order to support a more user-oriented system initialization procedure, have this script reinvoke itself such that it's under the control of `initlog`. Look, probably right up near the top, for a set of lines like these:

  > `

  >         # Rerun ourselves through initlog
  >         if [ -z "$IN_INITLOG" ]; then
  >           [ -f /sbin/initlog ] && exec /sbin/initlog $INITLOG_ARGS -r /etc/rc.sysinit
  >         fi

  > `

  Starting BRLTTY before this reinvocation results in two BRLTTY processes running at the same time, and that'll give you no end of problems. If your version of this script has this feature, then make sure you start BRLTTY after the lines which implement it.
Slackware

  `/etc/rc.d/rc.S`

SuSE

  `/sbin/init.d/boot`

An alternative is to start BRLTTY from `/etc/inittab`. You have two choices if you choose this route.

- If you want it to be started really early but don't need it to be automatially restarted if it dies, then add a line like this before the first `:sysinit:` line which is already in there.

  > `brl::sysinit:/bin/brltty`

- If you don't mind it being started later but do want it to be automatially restarted if it dies, then add a line like this anywhere within the file.

  > `brl:12345:respawn:/bin/brltty -n`

  The -n (`--nodaemon`) option is very important when running BRLTTY with init's `respawn` facility. You'll end up with hundreds of BRLTTY processes all running at the same time if you forget to specify it.

Check that the identifier (`bt` in these examples) isn't already being used by another entry, and, if it is, choose a different one which isn't.

Note that a command like `kill -TERM` is sufficient to stop BRLTTY in its tracks. If it dies during entry into single user mode, for example, it may well be due to a problem of this nature.

Some systems experience problems if an application tries to use the kernel's sound subsystem before it has been initialized. If your system is one of them, then you may need to disable the automatic starting of the speech synthesizer driver with the -N option.

Some systems, as part of the boot sequence, probe the serial ports (usually in order to automatically find the mouse and deduce its type). If your braille display is using a serial port, this kind of probing may be enough to get it confused. If this happens to you, then try restarting the braille driver (see the RESTARTBRL command). Better yet, turn off the serial port probing. Here's what we know so far about how to do this:

Red Hat

  The probing is done by a service named `kudzu`. Use the command

  > `chkconfig --list kudzu`

  to see if it's been enabled. Use the command

  > `chkconfig kudzu off`

  to disable it. Later releases allow you to let `kudzu` run without probing the serial ports. To do this, edit the file `/etc/sysconfig/kudzu`, and set `SAFE` to `yes`.

If you want to start BRLTTY before any file systems are mounted, then ensure that all of its components are installed within the root file system. See the --with-execute-root, --bindir, --with-data-directory, and --libdir build options.

## 3.5 Security Considerations

BRLTTY needs to run with root privileges because it needs read and write access for the port to which the braille display is connected, read access to `/dev/vcsa` or equivalent (to query the screen dimensions and the cursor position, and to review the current screen content and highlighting), and read and write access to the system console (for arrow key entry during cursor routing, for input character insertion during paste, for special key simulation using keys on the braille display, for retrieving output character translation and screen font mapping tables, and for activation of the internal beeper). Access to the needed devices can, of course, be granted to a non-root user by changing the file permissions associated with the devices. Merely having access to the console, however, isn't enough because activating the internal beeper and simulating key strokes still require root privilege. So, if you're willing to give up cursor routing, cut&paste, beeps, and all that, you can run BRLTTY without root priviledge.

## 3.6 Build and Run-Time Restrictions

Alert Tunes

  Some platforms don't support all of the tune devices. See the Tune Device preference for details.

FestivalLite Speech Synthesizer Driver

  The driver for the FestivalLite text to speech engine is only built if that package has been installed.

  This driver and the driver for the Theta text to speech engine (see the --with-theta build option) cannot be simultaneously linked into the BRLTTY binary (see the --with-speech-driver build option) because their run-time libraries contain conflicting symbols.

Mikropuhe Speech Synthesizer Driver

  The driver for the Mikropuhe text to speech engine is only built if that package has been installed.

  This driver cannot be included if the BRLTTY binary is statically linked (see the --enable-standalone-programs build option) because a static archive isn't included with the package.

Theta Speech Synthesizer Driver

  The driver for the Theta text to speech engine is only built if that package has been installed.

  This driver and the driver for the FestivalLite text to speech engine (see the --with-flite build option) cannot be simultaneously linked into the BRLTTY binary (see the --with-speech-driver build option) because their run-time libraries contain conflicting symbols.

  If this driver is built as a dynamically loadable shared object then `$THETA_HOME/lib` must be added to the `LD_LIBRARY_PATH` environment variable before BRLTTY is invoked because the shared objects within the package don't contain run-time search paths for their dependencies.

ViaVoice Speech Synthesizer Driver

  The driver for the ViaVoice text to speech engine is only built if that package has been installed.

  This driver cannot be included if the BRLTTY binary is statically linked (see the --enable-standalone-programs build option) because a static archive isn't included with the package.

VideoBraille Braille Display Driver

  The driver for the VideoBraille braille display is built on all systems, but only works on Linux.

## 3.7 Installing from an RPM File

To install BRLTTY from an RPM (RedHat Package Manager) file, do the following:

1. Download the binary package which corresponds to your hardware. It'll be a file named `brltty-`release`-`version`.`architecture`.rpm`, e.g. `brltty-3.0-1.i386.rpm`.
2. Install the package.

   > `rpm -Uvh brltty-release-version.architecture.rpm`

   This should be done as root. Strictly speaking, the `-U` (update) option is the only one which is necessary. The `-v` (verbose) option displays the name of the package as it's being installed. The `-h` (hashes) option displays a progress meter (using hash signs).

For the brave, we also provide the source RPM (`.src.rpm`) file, but that's beyond the scope of this document.

To uninstall BRLTTY, do:

> `rpm -e brltty`

## 3.8 Other Utilities

Building BRLTTY also results in the building of a few small helper and diagnostic utilities.

### brltty-config

This utility sets a number of environment variables to values which reflect the current installation of BRLTTY (see Build Options). It should be executed within an existing shell environment, i.e. not as a command in its own right, and can only be used by scripts which support Bourne Shell syntax.

> `. brltty-config`

The following environment variables are set:

BRLTTY_VERSION

  The version number of the BRLTTY package.

BRLTTY_EXECUTE_ROOT

  Run-time root for the installed package. Configured via the --with-execute-root build option.

BRLTTY_PROGRAM_DIRECTORY

  Directory for runnable programs (binaries, executables). Configured via the --with-program-directory build option.

BRLTTY_LIBRARY_DIRECTORY

  Directory for drivers. Configured via the --with-library-directory build option.

BRLTTY_DATA_DIRECTORY

  Directory for tables and help pages. Configured via the --with-data-directory build option.

BRLTTY_MANPAGE_DIRECTORY

  Directory for manual pages. Configured via the --with-manpage-directory build option.

BRLTTY_INCLUDE_DIRECTORY

  Directory for BrlAPI's C header files. Configured via the --with-include-directory build option.

BRLAPI_VERSION

  The version number of BrlAPI (BRLTTY's Application Programming Interface).

BRLAPI_RELEASE

  The full release number of BrlAPI.

BRLAPI_KEYFILE

  The name of BrlAPI's key file.

In addition, the following standard autoconf environment variables are also set:

prefix

  Subroot for architecture-independent files. Configured via the --prefix build option.

exec_prefix

  Subroot for architecture-dependent files. Configured via the --exec-prefix build option.

bindir

  Default location for program directory. Configured via the `--bindir` build option.

libdir

  Directory for BrlAPI's static archive and dynamically loadable object. Default anchor for library directory. Configured via the --libdir build option.

sysconfdir

  Directory for configuration files. Default anchor for data directory. Configured via the --sysconfdir build option.

mandir

  Default location for manual pages directory. Configured via the `--mandir` build option.

includedir

  Default anchor for header files directory. Configured via the `--includedir` build option.

### brltty-install

This utility copies BRLTTY's installed file hierarchy from one location to another.

> `brltty-install to [from]`

to

  The location to which the installed file hierarchy is to be copied. It must be an existing directory.

from

  The location from which the installed file hierarchy is to be taken. If it's specified, then it must be an existing directory. If it's not specified, then the location used for the build is assumed.

This utility can be used, for example, to copy BRLTTY to a root disk. If a root floppy is mounted as `/mnt`, and BRLTTY is installed on the main system, then typing

> `brltty-install /mnt`

copies BRLTTY, along with all of its data and library files, to the root floppy.

Some problems have been experienced when copying BRLTTY between systems with different versions of the shared C library. This is worth investigating if you have difficulties.

### brltest

This utility tests a braille display driver, and also provides an interactive way to learn what the keys on the braille display do. It should be run as root.

> `brltest -option ... [driver [name=value ...]]`

driver

  The driver for the braille display. It must be a two-letter driver identification code. If it's not specified, then the first driver configured via the --with-braille-driver build option is assumed.

name`=`value

  Set a braille display driver parameter. For a description of the parameters accepted by a specific driver, please see the documentation for that driver.

`-d`device `--device=`device

  The absolute path for the device to which the braille display is connected. If it's not specified, then the device configured via the --with-braille-device build option is assumed.

`-D`directory `--data-directory=`directory

  The absolute path for the directory wherein the driver data files reside. If it's not specified, then the directory configured via the --with-data-directory build option is assumed.

`-L`directory `--library-directory=`directory

  The absolute path for the directory wherein the drivers reside. If it's not specified, then the directory configured via the --libdir build option is assumed.

`-h` `--help`

  Display a summary of the command line options, and then exit.

This utility uses BRLTTY's Command Learn Mode. The key press timeout (after which this utility exits) is `10` seconds. The message hold time (used for non-final segments of long messages) is `4` seconds.

### spktest

This utility tests a speech synthesizer driver. It may need to be run as root.

> `spktest -option ... [driver [name=value ...]]`

driver

  The driver for the speech synthesizer. It must be a two-letter driver identification code. If it's not specified, then the first driver configured via the --with-speech-driver build option is assumed.

name`=`value

  Set a speech synthesizer driver parameter. For a description of the parameters accepted by a specific driver, please see the documentation for that driver.

`-t`string `--text-string=`string

  The text to be spoken. If it's not specified, then standard input is read.

`-D`directory `--data-directory=`directory

  The absolute path for the directory wherein the driver data files reside. If it's not specified, then the directory configured via the --with-data-directory build option is assumed.

`-L`directory `--library-directory=`directory

  The absolute path for the directory wherein the drivers reside. If it's not specified, then the directory configured via the --libdir build option is assumed.

`-h` `--help`

  Display a summary of the command line options, and then exit.

### scrtest

This utility tests the screen driver. It must be run as root.

> `scrtest -option ... [name=value ...]`

name`=`value

  Set a screen driver parameter. For a description of the parameters accepted by a specific driver, please see the documentation for that driver.

`-l`column `--left=`column

  Specify the starting (left) column (zero-origin) of the region. If this value isn't supplied, then a default value, based on the specified width, is selected such that the region is horizontally centred.

`-c`count `--columns=`count

  Specify the width of the region (in columns). If this value isn't supplied, then a default value, based on the specified starting column, is selected such that the region is horizontally centred.

`-t`row `--top=`row

  Specify the starting (top) row (zero-origin) of the region. If this value isn't supplied, then a default value, based on the specified height, is selected such that the region is vertically centred.

`-r`count `--rows=`count

  Specify the height of the region (in rows). If this value isn't supplied, then a default value, based on the specified starting row, is selected such that the region is vertically centred.

`-h` `--help`

  Display a summary of the command line options, and then exit.

Notes:

- If neither a starting column nor a region width is specified, then the region is horizontally-centred and starts at column 5.
- If neither a starting row nor a region height is specified, then the region is vertically-centred and starts at row 5.

The following is written to standard output:

1. A line detailing the dimensions of the screen.

   > `Screen: widthxheight`

2. A line detailing the position (zero-origin) of the cursor.

   > `Cursor: [column,row]`

3. A line detailing the size of the selected screen region, and the position (zero-origin) of its top-left corner.

   > `Region: widthxheight@[column,row]`

4. The contents of the selected screen region. Unprintable characters are written as blanks.

### tbltest

This utility tests a translation table (see section Translation Tables).

> `tbltest -option ... translation-table`

translation-table

  The file system path to the translation table. If it's relative then it's anchored at the directory configured via the --with-data-directory build option.

`-h` `--help`

  Display a summary of the command line options, and then exit.

### ctbtest

This utility tests a contraction table (see section Contracted Braille). The text read from standard input is rewritten to standard output as contracted braille.

> `ctbtest -option ... contraction-table`

contraction-table

  The file system path to the contraction table. If it's relative then it's anchored at the directory configured via the --with-data-directory build option.

`-t`file `--text-table=`file

  The file system path to the text translation table to use. If it's relative then it's anchored at the directory configured via the --with-data-directory build option. If this option isn't supplied then the table defined via the --with-text-table build option is assumed.

`-h` `--help`

  Display a summary of the command line options, and then exit.

The text translation table is used:

- To define the output character set so that the contracted braille will be displayed correctly. The same table as will be used by BRLTTY when the output is read should be specified.
- To define the braille representations of those characters defined within the contraction table as `=` (see section Character Translation).

The `text.brf.tbl` text translation table is provided for use with this utility. It defines the format used within `.brf` files. This is also the preferred format used by most braille printers and within electronically distributed braille documents. This table effectively allows this utility to be used as a text to braille translator.

### tunetest

This utility tests the alert tunes facility, and also provides an easy way to compose new tunes. It may need to be run as root.

> `tunetest -option ... {note duration} ...`

note

  A standard `MIDI` note number. It must be an integer from `1` through `127`, with `60` representing `Middle C`. Each value represents a standard chromatic semi-tone, with the next lower and higher values representing, respectively, the next lower and higher notes. The lowest value (`1`) represents the fifth `C-Sharp` below `Middle C`, and the highest value (`127`) represents the sixth `G` above `Middle C`.

duration

  The duration of the note in milliseconds. It must be an integer from `1` through `255`.

`-d`device `--device=`device

  The device on which to play the tune.

  beeper

    The internal beeper (console tone generator).

  pcm

    The digital audio interface on the sound card.

  midi

    The Musical Instrument Digital Interface on the sound card.

  fm

    The FM synthesizer on an AdLib, OPL3, Sound Blaster, or equivalent sound card.

  The device name may be abbreviated. See the Tune Device preference for details regarding the default device and platform restrictions.
`-v`loudness `--volume=`loudness

  Specify the output volume (loudness) as a percentage of the maximum. The default output volume is `50`.

`-p`device `--pcm-device=`device

  Specify the device to use for digital audio (see section PCM Device Specification). This option isn't available if the --disable-pcm-support build option was specified.

`-m`device `--midi-device=`device

  Specify the device to use for the Musical Instrument Digital Interface (see section MIDI Device Specification). This option isn't available if the --disable-midi-support build option was specified.

`-i`instrument `--instrument=`instrument

  The instrument to use if the selected device is `midi`. For the complete list of instruments, see the MIDI Instrument Table. The default instrument is an `acoustic grand piano`. The words comprising the instrument name must be separated from one another by a single minus sign rather than by spaces, and any of the words may be abbreviated. An `acoustic grand piano`, for example, may be specified as `a-gra-pi`.

`-h` `--help`

  Display a summary of the command line options, and then exit.

Next Previous Contents