Hi Samuel,

having started a discussion of this problem on the Orca mailing list, I
double checked your previous answers on this thread and realised that I
had not done my home work properly. Here are a few more answers to your
helpful questions. Also, I will add the information about the call chain
and systemd to the thread on the Orca list, so we can proceed with the
discussion there.

On 2025-12-26 at 16:01:01 (+0100), Samuel Thibault 
<[email protected]> wrote:
> Hello,
> Elias Oltmanns, le sam. 20 déc. 2025 19:50:05 +0100, a ecrit:
>> On 2025-12-20 at 01:00:18 (+0100), Samuel Thibault 
>> <[email protected]> wrote:
>> > Hello,
>> > Elias Oltmanns, le ven. 19 déc. 2025 18:51:31 +0100, a ecrit:
>> >> On 2025-12-19 at 14:44:27 (+0100), Samuel Thibault 
>> >> <[email protected]> wrote:
>> >> > Hello,
>> >> > Elias Oltmanns, le ven. 19 déc. 2025 14:32:14 +0100, a ecrit:
>> >> >> - Braille device responds to Orca now (as expected).
>> >> >> - Switch to tty2 in text mode.
>> >> >> - The braille device still shows Orcas output
>> >> > 
>> >> > It looks like orca doesn't manage to properly claim only the VT of the
>> >> > wayland session.
>> >> > 
>> >> > When running inside a terminal, do you have these environment variables
>> >> > set:
>> >> > 
>> >> > XDG_VTNR 
>> >> >
>> >> When I launch „terminal“ from within my GNOME session, XDG_VTNR is not
>> >> set anymore,
>> > 
>> > Ok, so that's why.
>> > 
>> > Is your system using systemd? Normally it's set in the VT sessions.
>> 
>> Yes, systemd rules them all. Still, XDG_VTNR is not set when I start
>> terminal under Wayland.
>> By the way, after login on the text console on tty2, XDG_VTNR is set.
[...]
> How is your wayland session started? Are you using e.g. lightdm, gdm,
> something else to log in graphically, or just startx?

No display manager, and sadly no startx either since GNOME has dropped
support for X (on Arch at least). So, I simply run:

$ gnome-session

on tty1. For this to work I have the following config file in place:

$ cat /etc/systemd/system/[email protected]/wayland.conf
[Service]
Environment=XDG_SESSION_TYPE=wayland

[...]
>> >> > Please also post the content of
>> >> > 
>> >> > /proc/1234/environ
[...]
>> command for testing:
>> 
>> tr '\0' '\n' < /proc/`pidof orca`/environ
>> 
>> Strangely enough, this results in a lot of empty lines and nothing else.
[...]
>> Then I tried the following:
>> $ tr '\0' '\n' < /proc/`pidof gnome-session-init-worker`/environ | grep 
>> XDG_VTNR
>> XDG_VTNR=1
> 
> So somehow gnome does get the variable...
> 
>> $ tr '\0' '\n' < /proc/`pidof gnome-shell`/environ | grep XDG_VTNR
> 
> ... but doesn't pass it along?
> 
> It'd be useful to see your 'ps xf' with orca to check how processes are
> getting started, and thus see where the variable is getting dropped.

With pgrep I can filter for all process whose environment contains the
Variable XDG_VTNR:

$ pgrep -af --env XDG_VTNR
1203 -bash
1310 -bash
1341 tmux attach
1493 /usr/lib/gnome-session-init-worker gnome

But you made me wonder what processes are started as children of what
parents. So, please find attached the shortened output of:

$ ps -eF

Please note that gnome-session-init-worker is listed with the parent PID
1203 (bash on tty1), so it does make sense that it inherits XDG_VTNR=1.
A lot of the other processes, though, including gnome-session-service,
at-spi related stuff, orca and speech-dispatcher are listed with parent
PID 1124 (/usr/lib/systemd/systemd --user). That is why they do not have
XDG_VTNR set.

So, my question at this point is whether something can be changed in the
way orca is launched, either making it a child of
gnome-session-init-worker or injecting XDG_VTNR with the correct value
in some other way.

> 
>> So, gnome-shell does not have XDG_VTNR in its environment either.
> 
> Does that file for gnome-shell contain something else than empty lines?

Yes, that file makes perfect sense as a listing of environment variables
including various XDG_ ones, but not XDG_VTNR.

Best,

Elias
UID          PID    PPID  C    SZ   RSS PSR STIME TTY          TIME CMD
root           1       0  0  5825 14296   1 13:19 ?        00:00:01 
/usr/lib/systemd/systemd --switched-root --system --deserialize=52
[...]
brltty      1051       1  0 164031 16800  0 13:19 ?        00:00:00 brltty -E -n
[...]
root        1123       1  0  2837  7276   9 13:19 ?        00:00:00 login -- eo
eo          1124       1  0  5580 12848  10 13:19 ?        00:00:00 
/usr/lib/systemd/systemd --user
eo          1126    1124  0  5788  4236   5 13:19 ?        00:00:00 (sd-pam)
eo          1150    1124  0  3178  8084   6 13:19 ?        00:00:00 
/usr/bin/tmux new-session -s auto -d
eo          1151    1150  0  2779  7432  14 13:19 pts/0    00:00:00 -bash
eo          1153    1124  0  2091  3928   8 13:19 ?        00:00:00 
/usr/bin/dbus-broker-launch --scope user
eo          1156    1153  0  1635  4640   2 13:19 ?        00:00:00 dbus-broker 
--log 10 --controller 9 --machine-id <xxxx> --max-bytes 100000000000000 
--max-fds 25000000000000 --max-matches 5000000000
eo          1177    1124  0 39395  4956   4 13:19 ?        00:00:00 
/usr/bin/gpg-agent --supervised
eo          1203    1123  0  2729  7284  10 13:19 tty1     00:00:00 -bash
root        1257       1  0  2837  7268   8 13:19 ?        00:00:00 login -- eo
eo          1310    1257  0  2729  9304   4 13:19 tty2     00:00:00 -bash
eo          1341    1310  0  3040  8436  15 13:19 tty2     00:00:00 tmux attach
[...]
eo          1404    1150  0  2779  9404   4 13:29 pts/1    00:00:00 -bash
[...]
eo          1493    1203  0 40958  5832  10 13:30 tty1     00:00:00 
/usr/lib/gnome-session-init-worker gnome
eo          1513    1124  0 95197  7308  14 13:30 ?        00:00:00 
/usr/lib/at-spi-bus-launcher
eo          1514    1124  0 22252  8980   9 13:30 ?        00:00:00 
/usr/lib/gnome-session-ctl --monitor
[...]
eo          1520    1124  0 126154 17804  0 13:30 ?        00:00:00 
/usr/lib/gnome-session-service --session=gnome
eo          1532    1124  1 2837746 193612 9 13:30 ?       00:00:05 
/usr/bin/gnome-shell
[...]
eo          1601    1513  0  2058  3728  13 13:30 ?        00:00:00 
/usr/bin/dbus-broker-launch 
--config-file=/usr/share/defaults/at-spi2/accessibility.conf --scope user
eo          1602    1601  0  1274  3304  11 13:30 ?        00:00:00 dbus-broker 
--log 10 --controller 9 --machine-id <xxx> --max-bytes 100000000000000 
--max-fds 6400000 --max-matches 5000000000
[...]
eo          1604    1124  0 42092  6940  10 13:30 ?        00:00:00 
/usr/lib/at-spi2-registryd --use-gnome-session
[...]
eo          1920    1124  0 180287 86268 12 13:30 ?        00:00:02 orca
[...]
eo          2679    1124  0 133110 18220  8 13:31 ?        00:00:02 
/usr/bin/speech-dispatcher -s -t 0
eo          2680    2679  0  6981 12324   4 13:31 ?        00:00:00 
/usr/lib/speech-dispatcher/speech-dispatcher-modules/sd_espeak-ng 
/etc/speech-dispatcher/modules/espeak-ng.conf
eo          2686    2679  0  6973 12172   2 13:31 ?        00:00:00 
/usr/lib/speech-dispatcher/speech-dispatcher-modules/sd_espeak-ng 
/etc/speech-dispatcher/modules/
[...]
eo          2899    2679  0 40726  5496   0 13:31 ?        00:00:00 
/usr/lib/speech-dispatcher/speech-dispatcher-modules/sd_dummy 
/etc/speech-dispatcher/modules/
eo          2907    1532  0 141682 40976  2 13:31 ?        00:00:00 
/usr/bin/Xwayland :0 -rootless -noreset -accessx -core -auth 
/run/user/1000/.mutter-Xwaylandauth.WMGTI3 -listenfd 4 -listenfd 5 -displayfd 6 
-initfd 7 -byteswappedclients -enable-ei-portal
[...]
eo          3880    1124  2 355728 92896 15 13:31 ?        00:00:05 
/usr/bin/kgx --gapplication-service
eo          3940    3880  0  2765  9424   6 13:31 pts/2    00:00:00 
/usr/bin/bash
[...]
eo          4300    1404 99  3043  8312   4 13:35 pts/1    00:00:00 ps -eF
_______________________________________________
This message was sent via the BRLTTY mailing list.
To post a message, send an e-mail to: [email protected]
For general information, go to: http://brltty.app/mailman/listinfo/brltty

Reply via email to