12

I'm currently writing a program for a project.

It is for a braille reading system where I have a braille display connected via USB that is controlled by a program called brltty.

One of the requirements for this project is to have the ability to connect more than one braille display although only let the master display have control of the system.

I thought the easiest way to do this was, rather than having to send commands to every instance of brltty in my program, I could just mirror what is output to the main USB, to each USB port.

Is this possible?

3

2 Answers 2

2

I don't think mirroring the USB interface is the most straightforward solution to your problem.

I haven't used brltty before; but, from what I understand, you should be able to use tmux to multiplex the terminal outside of brltty altogether.

To be honest, I haven't really used tmux, either; but going from this tutorial...

  1. start tmux on your master terminal: tmux -S /tmp/shared
  2. allow other users to connect to the master: chmod +r /tmp/shared
  3. start tmux on your client terminals: tmux -S /tmp/shared attach -r

The tutorial also gives some suggestions on how to have your client terminals automatically attach to the master terminal on login. That might or might not matter to you; but, if so, you could probably just stick it at the end of the client account's .profile, assuming you don't have any security concerns to worry about.

exec /usr/bin/tmux -S /tmp/shared attach -r

0

Linux? If yes see tee(2) or the old fanout (Wayback Machine).

But I would go for the old classic

for (dev in devs)
    send (dev, command)

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .