[BRLTTY] How to send parameter to BRLTTY by systemd ?

Mario Lang mlang at delysid.org
Mon Jun 29 16:24:53 EDT 2015


Alexandre ARNAUD <alex at arnaud.link> writes:

> Hi everybody! I'm trying to send paramater to BRLTTY by systemd like
> "-b". How do you do that ?
> When I've tried with "/etc/init.d/brltty start -beu -dttyUSB0" nothing
> works.

The answer to your question is two-fold: From your example, I think you
should actually configure brltty to do what you want, instead of trying
to pass parameters to it via systemd.  The way to do this, is to
customize /etc/brltty.conf.  At least, that is how it used to work.
These days, there is an even more convenient method which will lead to
less conflicts on package upgrade: Whenever you want to change a
configuration option from the default specified in /etc/brltty.conf, you
can put that new setting in your own file which is called
/etc/xdg/brltty.conf.  If you restart brltty (presumably via systemd) it
should pick up your new setting.  Coming back to your original example,
you probably want to put the following in /etc/xdg/brltty.conf:

braille-driver eu
braille-device /dev/ttyUSB0

However, since I usually hate it if people ask specific questions and
receive answers that tell them they actually want something different,
here is how you'd actually change what systemd runs: The brltty systemd
service file is usually found in /lib/systemd/system/brltty.service.
If you want to override settings from it, you can use a similar mechanism
as described above for brltty.  However, for systemd, you probably want
to put your override file in /etc/systemd/system/brltty.service.
You probably want to override the ExecStart systemd directive:

/etc/systemd/system/brltty.service:

[Service]
ExecStart=/sbin/brltty -q -P /run/brltty.pid

-- 
CYa,
  ⡍⠁⠗⠊⠕


More information about the BRLTTY mailing list