[BRLTTY] Brlapi not connecting in headless mode

Julian Dreykorn dreykorn.julian at gmail.com
Fri Mar 28 21:49:57 UTC 2025


Hello,

Regarding how I started the program. Yes to all frankly. Through console 
or some form of auto-start did not matter.
It also did not matter how brltty was started, either manually by a user 
or through systemd.
I made a further discovery with Connection.enterTtyMode().
First your questions. Initially I tried with enterTtyMode(-1) but in any 
use case (PC running Ubuntu or Raspberry Pi)
this threw an error "API error: Can't determine tty number" and returns -1.
Now what I realized. On Ubuntu I can essentially pass any reasonable tty 
number, so 0, 1, 2, ... to enterTtyMode(),
and get brlapi access to my plugged in display whilst returning the 
passed tty number.
On the raspberry pi, I can also pass any tty number, but only tty1 will 
grant me actual access to the display.
All other numbers will return the passed number and only assume I can 
write to the display.
Perhaps this is simple in the way its supposed to work, but it didn't 
seem obvious that on a terminal-only device
there seems to be certain restrictions on the ttys that are alleviated 
then working through a GUI.
And finally of course, using enterTtyModeWithPath("") and an empty 
String, also worked on the pi.
There is no return value for that function in the Java bindings though.
Julian

Am 28.03.2025 um 01:11 schrieb Samuel Thibault:
> Hello,
>
> Julian Dreykorn, le jeu. 27 mars 2025 14:45:05 +0100, a ecrit:
>> It now works mostly as expected in any case on the raspberry pi.
> Ok, but maybe it is overkill.
>
>> I run my program on the pi after startup, so brltty is already ready.
> How do you run it exactly? From systemd? By hand? Through ssh?
>
>> Connecting and entering tty-mode returned me the correct results.
> What was returned by enterTtyMode()?
>
>> Finally I should mention that I always entered ttymode on tty0,
> What do you mean exactly by "on tty0"?
>
>> since using default (-1) did not work out for me.
> What was it producing?
>
> Samuel


More information about the BRLTTY mailing list