"gsettings set org.gnome.desktop.interface toolkit-accessibility true" fails

I run the commands

gsettings set org.gnome.desktop.interface toolkit-accessibility true
gsettings get org.gnome.desktop.interface toolkit-accessibility

in a docker container. The first command runs (silently) but the second command returns false.

What sort of reasons would cause gsettings set org.gnome.desktop.interface toolkit-accessibility to fail? What should I be looking at?

I have installed dbus-x11 and unsuccessfully tried to start the dbus-daemon as shown below, but I’m not sure I am doing the right thing.

dbus-daemon --system
dbus-daemon[2702]: Failed to start message bus: Failed to bind socket "/run/dbus/system_bus_socket": No such file or directory

Just to check… :slight_smile:

Does it return an exit code of 0 i.e. success, or something else i.e. failure?

the second command returns false.

Ditto :smiley: I take it “false” doesn’t mean 0? Because that would mean it thought all was OK.

I don’t read the exit code of either command.

The second command outputs false to the terminal.

On a whim, I tried launching dbus as shown below

/usr/bin/dbus-run-session /usr/bin/gsettings set org.gnome.desktop.interface toolkit-accessibility true
dbus-daemon[2703]: [session uid=0 pid=2703] Activating service name='ca.desrt.dconf' requested by ':1.0' (uid=0 pid=2704 comm="/usr/bin/gsettings set org.gnome.desktop.interface")
dbus-daemon[2703]: [session uid=0 pid=2703] Successfully activated service 'ca.desrt.dconf'
$ gsettings set org.gnome.desktop.interface toolkit-accessibility true
(process:2712): dconf-WARNING **: 22:08:04.357: failed to commit changes to dconf: Cannot autolaunch D-Bus without X11 $DISPLAY
$ gsettings get org.gnome.desktop.interface toolkit-accessibility
true

Which is a step in the right direction, however when I launch an AT-SPI application I get the error message:
dbind-ERROR **: 22:08:33.228: AT-SPI: Couldn't connect to accessibility bus. Is at-spi-bus-launcher running?

So maybe I should be looking at my dbus startup arguments.

I grep or dbus processes on Ubuntu shows

pstree -a -l | grep dbus
  |-dbus-daemon --system --address=systemd: --nofork --nopidfile --systemd-activation --syslog-only
  |   |   |-dbus-daemon --config-file=/usr/share/defaults/at-spi2/accessibility.conf --nofork --print-address 11 --address=unix:path=/run/user/1000/at-spi/bus_1
  |   |-dbus-daemon --session --address=systemd: --nofork --nopidfile --systemd-activation --syslog-only

So maybe I should try something like dbus-daemon --config-file=/usr/share/defaults/at-spi2/accessibility.conf --nofork --print-address 11 --address=unix:path=/run/user/1000/at-spi/bus_1 then?

I don’t have much knowledge about dbus and would appreciate some guidance.

Actually, the a11y bus is launched like this: /usr/lib/at-spi-bus-launcher --launch-immediately
Normally, it is done, for example, by gnome-session-binary, but in a container, you’ll have to do it yourself, I guess, I’ve never needed the a11y stack in a Docker container myself.

Following the advise here, I’ve launched

/usr/libexec/at-spi-bus-launcher
/usr/libexec/at-spi2-registryd

Followed by

$ /usr/bin/dbus-run-session /usr/bin/gsettings set org.gnome.desktop.interface toolkit-accessibility true
dbus-daemon[2709]: [session uid=0 pid=2709] Activating service name='ca.desrt.dconf' requested by ':1.0' (uid=0 pid=2710 comm="/usr/bin/gsettings set org.gnome.desktop.interface")
dbus-daemon[2709]: [session uid=0 pid=2709] Successfully activated service 'ca.desrt.dconf'
$ gsettings set org.gnome.desktop.interface toolkit-accessibility true
$ gsettings get org.gnome.desktop.interface toolkit-accessibility
true

Unfortunately I’m still getting the following error when I launch the AT-SPI aware application
dbind-ERROR **: 10:46:11.550: AT-SPI: Couldn't connect to accessibility bus. Is at-spi-bus-launcher running?

update

$ /usr/libexec/at-spi-bus-launcher --launch-immediately &
$ /usr/libexec/at-spi2-registryd &
$ gsettings get org.gnome.desktop.interface toolkit-accessibility
false
Failed to launch bus: Failed to connect to session bus$ /usr/bin/dbus-run-session /usr/bin/gsettings set org.gnome.desktop.interface toolkit-accessibility true
dbus-daemon[2708]: [session uid=0 pid=2708] Activating service name='ca.desrt.dconf' requested by ':1.0' (uid=0 pid=2709 comm="/usr/bin/gsettings set org.gnome.desktop.interface")
dbus-daemon[2708]: [session uid=0 pid=2708] Successfully activated service 'ca.desrt.dconf'

The bus fails to start as indicated by the error message Failed to launch bus and the output of the ps command shown below:

$ ps aux | grep bus
root      2750  0.0  0.0   5128   976 ?        S    11:17   0:00 grep bus

Update:

The Failed to connect to session bus message comes from here.

The solution:

apt-get install dbus-x11
eval $(dbus-launch --sh-syntax)
1 Like

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.