Hi, I have a hybrid "Thinkpad Yoga" and I would like Gnome to enable the a11y-onscreen-keyboard (it's actually called caribou) whenever the device is transformed into a tablet. Actually, I have all the necessary information at hand, but I'm not able to bring the things together.

The transformation triggers an ACPI event, so that I was able to configure acpid such that a script in /etc/acpi/actions/ is executed each time the event is fired.

It's possible to enable the on-screen-keyboard from the command line using "gsettings set org.gnome.desktop.a11y.applications screen-keyboard-enabled true".

Now the problem is: acpid executes the script as root. And it seems to me like root cannot change (not read, that's easy!) the dconf of users that are currently logged in. Yes, there are pages on the web that tell you something about setting the environment variable $DBUS_SESSION_BUS_ADDRESS etc. But I tried all this and still wasn't able to make it work.

Maybe somebody else can have a try in making root change a user's dconf settings. Would be cool if somebody could come up with a solution here.

PS_ There might be a workaround for all this: Write a script that runs in the background listening for acpi-events. Whenever it encounters the right acpi-event let it make the desired dconf-change. If this script is run by the user, it will have the right permissions/environment. But I haven't implemented this yet and I don't think it's a particularly elegant solution...