File: README.Systemd

package info (click to toggle)
brltty 6.8-4
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 35,776 kB
  • sloc: ansic: 150,447; java: 13,484; sh: 9,667; xml: 5,702; tcl: 2,634; makefile: 2,328; awk: 713; lisp: 366; python: 321; ml: 301
file content (116 lines) | stat: -rw-r--r-- 3,749 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Using Systemd Service Management
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

.. include:: prologue.rst

.. |configuration directory| replace:: /usr/lib
.. |unit directory| replace:: |configuration directory|/systemd/system
.. |users directory| replace:: |configuration directory|/sysusers.d
.. |files directory| replace:: |configuration directory|/tmpfiles.d
.. |commands directory| replace:: /usr/libexec/brltty
.. |build subdirectory| replace:: Autostart/Systemd
.. |default configuration file| replace:: ``/etc/brltty.conf``

Initial Setup
=============

The following steps need to be performed:

* Systemd service and path units need to be installed
  into the |unit directory| directory:

  + brltty@.service
  + brltty-device@.service
  + brltty.path
  + brltty@.path

* A wrapper script needs to be installed
  into the |commands directory| directory:

  + systemd-wrapper

* A file defining the non-root user that BRLTTY is to run as,
  including the supplementary groups that it needs access to,
  needs to be installed into the |users directory| directory:

  + sysusers -> brltty.conf

* A file defining the files and directories that should exist
  needs to be installed into the |files directory| directory:

  + tmpfiles -> brltty.conf

A make file has been provided in order to make this easy to do.
It can be found within the |build subdirectory| subdirectory
of BRLTTY's build tree.
To install all of these files, change to this directory and run the command::

  make install

You then need to tell Systemd that the files have been installed.
To do this, run the command::

  systemctl daemon-reload

That's all you need to do.
Your system is now able to manage BRLTTY instances via Systemd.

Managing BRLTTY Instances
=========================

Systemd manages BRLTTY instances on your system in a number of ways.

USB Braille Devices
-------------------

If BRLTTY's Udev rules have also been installed
then a BRLTTY instance will be automatically started
when a USB braille device is connected,
and automatically stopped when it's disconnected.
Several braille devices can be managed in this way at the same time.
They can be connected and disconnected at any time and in any order.

The default configuration file - |default configuration file| - is used
except that any ``braille-device`` and ``braille-driver`` directives
that it specifies are ignored because they're overridden by the Udev rules.
It's safe, therefore, to specify a default non-USB braille device
within |default configuration file|.

The Default Instance
--------------------

The default BRLTTY instance is the one that's configured
via the file |default configuration file|.
It's managed by applying standard Systemd commands to BRLTTY's path unit.
For example::

  systemctl enable brltty.path
  systemctl start brltty.path
  systemctl stop brltty.path
  systemctl disable brltty.path

Additional Instances
--------------------

Additional BRLTTY instances can be managed via path instance references.
Each of them has its own configuration file.

If, for example, the name of an instance is ``iname``, then
its Systemd path name would be ``brltty@iname``,
its configuration file would be ``/etc/brltty_iname.conf``,
and it'd be managed via Systemd commands like these::

  systemctl enable brltty@iname.path
  systemctl start brltty@iname.path
  systemctl stop brltty@iname.path
  systemctl disable brltty@iname.path

Any number of instances may be managed in this way.
These instances don't implicitly also read the default configuration file
(|default configuration file|).
You can, however, explicitly include it
from within any instance-specific configuration file:

.. parsed-literal:: include |default configuration file|