Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 853820 - sys-apps/baselayout: export environment variables needed for assistive technology
Summary: sys-apps/baselayout: export environment variables needed for assistive techno...
Status: RESOLVED WONTFIX
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal enhancement (vote)
Assignee: William Hubbs
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2022-06-22 21:50 UTC by Anna Vyalkova
Modified: 2023-01-28 00:39 UTC (History)
7 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Anna Vyalkova 2022-06-22 21:50:51 UTC
TL;DR in /etc/profile set:

export ACCESSIBILITY_ENABLED=1
export QT_LINUX_ACCESSIBILITY_ALWAYS_ON=1

About each variable:

1) ACCESSIBILITY_ENABLED
https://wiki.gnome.org/Projects/Orca/Chromium

2) QT_LINUX_ACCESSIBILITY_ALWAYS_ON
https://doc.qt.io/qt-6/qaccessible.html#details
Comment 1 Anna Vyalkova 2022-06-22 21:54:17 UTC
Other variables (that probably no one wants to enable).

- export GTK_MODULES=gail:atk-bridge
Not included because it's deprecated.
https://bugzilla.redhat.com/show_bug.cgi?id=787195

- export GNOME_ACCESSIBILITY=1
Haven't been used by applications for a very long time.
https://bugzilla.gnome.org/show_bug.cgi?id=461710

- export QT_ACCESSIBILITY=1
All guides mention it but it was removed a really long time ago (in 2011).
Comment 2 Anna Vyalkova 2022-06-23 00:00:19 UTC
Alternative solution for Qt:

If "accessibility" use flag is set (for dev-qt/qtgui or dev-qt/qtbase), install an env.d file that exports QT_LINUX_ACCESSIBILITY_ALWAYS_ON=1.

Pros:
+ Guaranteed not to break applications (e.g. due to missing DBus -- needs testing)

Cons:
- Can't be controlled on per-slot basis, it'll be global anyway.
Comment 3 Larry the Git Cow gentoo-dev 2023-01-26 18:22:22 UTC
The bug has been referenced in the following commit(s):

https://gitweb.gentoo.org/proj/baselayout.git/commit/?id=8aa828d0ce8ea8822cb0ba6e26affbc2005281e6

commit 8aa828d0ce8ea8822cb0ba6e26affbc2005281e6
Author:     William Hubbs <williamh@gentoo.org>
AuthorDate: 2023-01-26 18:21:04 +0000
Commit:     William Hubbs <williamh@gentoo.org>
CommitDate: 2023-01-26 18:21:04 +0000

    add environment variables needed for assistive technology
    
    Bug: https://bugs.gentoo.org/853820
    Signed-off-by: William Hubbs <williamh@gentoo.org>

 etc/env.d/50baselayout | 2 ++
 1 file changed, 2 insertions(+)
Comment 4 Mike Gilbert gentoo-dev 2023-01-26 18:40:25 UTC
I'm not so sure setting these unconditionally in baselayout makes sense.

Is it possible setting these will cause an unexpected change in experience for users who don't need accessibility features?
Comment 5 Larry the Git Cow gentoo-dev 2023-01-27 17:30:57 UTC
The bug has been closed via the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=8922ff37ff381fde642f486cd74922ec060c4a15

commit 8922ff37ff381fde642f486cd74922ec060c4a15
Author:     William Hubbs <williamh@gentoo.org>
AuthorDate: 2023-01-27 17:29:04 +0000
Commit:     William Hubbs <williamh@gentoo.org>
CommitDate: 2023-01-27 17:29:21 +0000

    sys-apps/baselayout: add 2.10
    
    Closes: https://bugs.gentoo.org/648880
    Closes: https://bugs.gentoo.org/853820
    Closes: https://bugs.gentoo.org/888807
    Signed-off-by: William Hubbs <williamh@gentoo.org>

 sys-apps/baselayout/Manifest               |   1 +
 sys-apps/baselayout/baselayout-2.10.ebuild | 368 +++++++++++++++++++++++++++++
 2 files changed, 369 insertions(+)
Comment 6 Davide Pesavento gentoo-dev 2023-01-27 22:37:30 UTC
(In reply to Larry the Git Cow from comment #3)
> The bug has been referenced in the following commit(s):
> 
> https://gitweb.gentoo.org/proj/baselayout.git/commit/
> ?id=8aa828d0ce8ea8822cb0ba6e26affbc2005281e6
> 
> commit 8aa828d0ce8ea8822cb0ba6e26affbc2005281e6
> Author:     William Hubbs <williamh@gentoo.org>
> AuthorDate: 2023-01-26 18:21:04 +0000
> Commit:     William Hubbs <williamh@gentoo.org>
> CommitDate: 2023-01-26 18:21:04 +0000
> 
>     add environment variables needed for assistive technology
>     
>     Bug: https://bugs.gentoo.org/853820
>     Signed-off-by: William Hubbs <williamh@gentoo.org>
> 
>  etc/env.d/50baselayout | 2 ++
>  1 file changed, 2 insertions(+)

Was qt@g.o consulted about this? IIRC Qt upstream used to recommend *against* setting QT_LINUX_ACCESSIBILITY_ALWAYS_ON system-wide by default, because it has performance implications (basically forcing Qt to send lots of a11y events all the time, even when nothing is listening). I don't know if something has changed since then though, it's been a few years.
Comment 7 Chiitoo gentoo-dev 2023-01-27 23:07:26 UTC
(In reply to Davide Pesavento from comment #6)
> Was qt@g.o consulted about this? IIRC Qt upstream used to recommend
> *against* setting QT_LINUX_ACCESSIBILITY_ALWAYS_ON system-wide by default,
> because it has performance implications (basically forcing Qt to send lots
> of a11y events all the time, even when nothing is listening). I don't know
> if something has changed since then though, it's been a few years.

Aside from this bug, no, not that I know, and not being familiar with these things I could not really give out any thoughts yet when I saw it, and haven't had the time to look into it yet either...
Comment 8 Davide Pesavento gentoo-dev 2023-01-27 23:10:27 UTC
(In reply to Anna Vyalkova from comment #0)
> 2) QT_LINUX_ACCESSIBILITY_ALWAYS_ON
> https://doc.qt.io/qt-6/qaccessible.html#details
According to that document, Qt already follows the recommendation[1] of checking org.a11y.Status, the env variable should not be set in normal circumstances.

Are the dbus properties not working for you? If so, we should investigate and fix that issue, instead of papering over it by force-enabling a11y for everyone.

[1] https://www.freedesktop.org/wiki/Accessibility/AT-SPI2/
> Whether applications should enable their at-spi2 support is defined by the IsEnabled property of org.a11y.Status in the accessibility bus
> [...]
> One can force enabling accessibility (but ideally it should be automatic thanks to the property mentioned above)
Comment 9 Larry the Git Cow gentoo-dev 2023-01-28 00:38:04 UTC
The bug has been referenced in the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=07d3824141c8893b4e6565ddce1253705834f64b

commit 07d3824141c8893b4e6565ddce1253705834f64b
Author:     Mike Gilbert <floppym@gentoo.org>
AuthorDate: 2023-01-28 00:36:02 +0000
Commit:     Mike Gilbert <floppym@gentoo.org>
CommitDate: 2023-01-28 00:36:18 +0000

    sys-apps/baselayout: add 2.12, drop 2.11
    
    This reverts the addition of the ACCESSIBILITY_ENABLED and
    QT_LINUX_ACCESSIBILITY_ALWAYS_ON environment variables.
    
    Bug: https://bugs.gentoo.org/853820
    Signed-off-by: Mike Gilbert <floppym@gentoo.org>

 sys-apps/baselayout/Manifest                                           | 2 +-
 sys-apps/baselayout/{baselayout-2.11.ebuild => baselayout-2.12.ebuild} | 0
 2 files changed, 1 insertion(+), 1 deletion(-)
Comment 10 Mike Gilbert gentoo-dev 2023-01-28 00:39:09 UTC
After some discussion in IRC, we decided against adding these variables to baselayout.