| 1 |
~~~~~~~~~~~~~~~~~ |
| 2 |
BRLTTY on OpenBSD |
| 3 |
~~~~~~~~~~~~~~~~~ |
| 4 |
:Author: Mario Lang <[email protected]> |
| 5 |
|
| 6 |
.. include:: prologue.rst |
| 7 |
|
| 8 |
This document describes how to get BRLTTY working on a recent OpenBSD system. |
| 9 |
It assumes that you're working with a recent OpenBSD installation (e.g. 3.4). |
| 10 |
|
| 11 |
Setting up BRLTTY |
| 12 |
================= |
| 13 |
|
| 14 |
Patching ``screen`` |
| 15 |
------------------- |
| 16 |
|
| 17 |
Since OpenBSD doesn't have a way for user-space applications to access the |
| 18 |
contents of the virtual consoles, we have to use ``screen`` to make this |
| 19 |
information available to BRLTTY. This also means that you can't use BRLTTY with |
| 20 |
the OpenBSD virtual consoles directly - you must start ``screen`` first on some |
| 21 |
virtual terminal in order to be able to use BRLTTY. |
| 22 |
|
| 23 |
You need to patch ``screen`` to enable the ``IPC_SHARED_IMAGE`` functionality |
| 24 |
that BRLTTY relies on. Assuming your ports tree is in ``/usr/ports``, you'll |
| 25 |
need to copy the appropriate patch from ``brltty/Patches`` into |
| 26 |
``/usr/ports/misc/screen/patches``. |
| 27 |
|
| 28 |
OpenBSD 3.4 comes with screen-4.0.1. You can check the ``screen`` version by |
| 29 |
looking in ``/usr/ports/misc/screen/Makefile``. |
| 30 |
|
| 31 |
The patch file should be named with the prefix ``patch-`` so that the |
| 32 |
``screen`` build process will find it. |
| 33 |
|
| 34 |
Now change into ``/usr/ports/misc/screen`` and run:: |
| 35 |
|
| 36 |
make |
| 37 |
sudo make install |
| 38 |
|
| 39 |
If you've successfully managed to compile and install the ``screen`` package, |
| 40 |
you can proceed to building BRLTTY. |
| 41 |
|
| 42 |
There's a simple test you can use to verify if your ``screen`` installation |
| 43 |
does support the ``IPC_SHARED_IMAGE`` feature. Start ``screen``, and then |
| 44 |
execute the command:: |
| 45 |
|
| 46 |
ipcs -m |
| 47 |
|
| 48 |
You should see output that looks roughly like this:: |
| 49 |
|
| 50 |
Shared Memory: |
| 51 |
T ID KEY MODE OWNER GROUP |
| 52 |
m 65536 -1160968401 --rwa------ root root |
| 53 |
|
| 54 |
If you do, then ``screen`` seems to have been compiled with the |
| 55 |
``IPC_SHARED_IMAGE`` feature. |
| 56 |
|
| 57 |
Note that proper integration of the ``IPC_SHARED_IMAGE`` functionality via an |
| 58 |
additional "flavor" for the ``screen`` port has recently been submitted to the |
| 59 |
OpenBSD ports mailing list. If you're working with the CVS ports tree, it might |
| 60 |
be worthwhile to check if the ``shm`` flavor has already been checked in by |
| 61 |
invoking the following command when in ``/usr/ports/misc/screen``:: |
| 62 |
|
| 63 |
make show=FLAVORS |
| 64 |
|
| 65 |
If you see ``shm`` listed as a choosable flavor, simply build ``screen`` with |
| 66 |
the ``FLAVOR`` environment variable set to ``shm`` - don't bother copying the |
| 67 |
patch from BRLTTY's source tree. |
| 68 |
|
| 69 |
Compiling BRLTTY |
| 70 |
================ |
| 71 |
|
| 72 |
To compile BRLTTY, do the following:: |
| 73 |
|
| 74 |
./configure |
| 75 |
gmake |
| 76 |
sudo gmake install |
| 77 |
|
| 78 |
Note that ``gmake`` should be used in order to avoid a problem related to BSD |
| 79 |
and GNU Make incompatibilities. |
| 80 |
|
| 81 |
Running BRLTTY |
| 82 |
============== |
| 83 |
|
| 84 |
You need to have ``screen`` started before you try to run BRLTTY. Inside |
| 85 |
``screen``, simply invoke BRLTTY as you would on other systems. Note that the |
| 86 |
first serial port is ``/dev/cua00``. |
| 87 |
|
| 88 |
A typical invocation could look like this:: |
| 89 |
|
| 90 |
brltty -b ts -d serial:cua00 |
| 91 |
|