Hello again.
I didn’t get a chance to talk about my plans for Caribou in this little private SOC I am having here. Well here are two oil rigs is a diagram to illustrate it:

- Caribou Daemon
- The daemon, through AT-SPI and any means necessary figures out when a typing task is needed and activates the keyboard through DBus. When it does this, it provides as much information as possible regarding the text entry task: The location and size of the text area, the location of the cursor and the type of text expected (plain, email, url, number, full name). The daemon is written in Python, at least for now as Python is equipped with the best AT-SPI client library. The daemon has a relatively small body of code, so porting it to C is a worthy mission for some time in the future.
- libcaribou
- This is a library for keyboard implementors. It is written in C/GObject. It handles all common Caribou keyboard tasks such as:</p>
- De-serializing Caribou keyboard definition files into KOMs (Keyboard Object Model, I just made that up. You are welcome), with respect to the user’s XKB configuration and keyboard type preferences.
- Implementing defined keyboard behavior.
- Exposing the keyboard over DBus with interfaces known to the Caribou Daemon.
- Implement scanning.
- Do all the ugly X tasks, XKB, XTest, you name it. This could be replaces/supplemented with a higher level input method in the future.
- Keyboard UI
- This is the view for libcaribou’s model. It can be written in any language and toolkit that supports GObject introspection. The packaged UI is called Antler, and currently it is less than 200 lines of Python/GTK+. The idea here is that GNOME Shell (or anyone) could easily implement their own keyboard that can take advantage of Caribou’s facilities. If we pull this off well, keyboards will be advertising capabilities and co-exist, so the appropriate keyboard UI is invoked for the given task.
Thanks for reading! In a future post I will describe Antler and plans I have for it.
Dear blog,
I have been spending the last while working exclusively on Caribou, trying to get it out of the miserable shape it is in and make sure that it not only remains relevant, but really shines. I have been doing this for two weeks. But the first week was mostly spent on chasing down this bug in GDK. So I really only got down to business this last week.
Here is a photo:
What I have done:
- Created an introspectable C library, initially to do the keyboard emulation and XKB stuff, but I have grand plans for it. What already landed in master is just simple key synth methods to replace Caribou’s reliance on python-virtkey which was never approved as GNOME external dependency.
- Created an experimental git branch with a revamp of how we do layout in Caribou. Users will no longer choose between layouts, this is inferred from the current keyboard group the X server is set to. If the user will have any choice it will be between geometries, either a more natural geometry similar to what you have on tablets, or a fuller keyboard emulation.
- Made “sub keys”, all the latest screen keyboards seem to do this, so now Latin accents and Semitic vowels could be easily entered.
Ok blog, I have to go. I’ll need to write a brief roadmap of where I think we should take this, and how Caribou could play a role in GNOME Shell, etc.
Here is a screencast of what Caribou looks like today.
[youtube http://www.youtube.com/watch?v=TLNQNwM-fjE&w=480&h=390]
So a couple of weeks ago I ported Caribou to GTK+ 3 and PyGI. I also stopped testing it (and implicitly stopped supporting it) with CORBA AT-SPI. This means that if you want to download and test Caribou, or any GNOME 3.0 accessibility module for that matter, you need to jump through hoops to get all the prerequisites. There are two sane options:
- Install a pre-release distro like Ubuntu 11.04 or Fedora Rawhide. While the Caribou package is not necessarily up to date on these platforms, the prerequisites generally are, so you just need to clone Caribou from git.
- Use JHBuild. This is what all serious GNOME testers and developers use. Unfortunately Caribou is not in the current moduleset, and neither are some dependencies. Fortunately, I wrote a small moduleset file that takes the shortest path to having a working version of Caribou for your testing needs. It also has Orca, and other modules will be added in the future. This should probably go into upstream jhbuild eventually.
Once you have installed JHBuild, use the configuration below in your .jhbuildrc, or create .jhbuildrc.a11y, and use jhbuild -f if you have a working jhbuild environment you don’t want to mess with.
build_policy = 'updated'<br />
moduleset = 'http://people.gnome.org/~eitani/a11y/gnome-a11y-3.0.modules'<br />
modules = ['meta-gnome-a11y']<br />
checkoutroot = os.path.expanduser('~/gnome-a11y/source')<br />
prefix = os.path.expanduser('~/gnome-a11y/install')<br />
skip = ['gudev']
Next, run jhbuild bootstrap
to install build tools, and install some other development libraries that are worth skipping in jhbuild (for now it’s just gudev).
In Fedora:
yum install libgudev1-devel
In Debian/Ubuntu:
apt-get install libgudev-1.0-dev
Run jhbuild build
, and watch things compile successfully.
Now, the hairy part about GNOME accessibility is the fact that there is an AT-SPI registry that needs to start with the session. Optimally the registry runs on a dedicated accessibility D-Bus bus. First you need to make sure you installed and enabled at-spi2 through your distro. On Ubuntu you might want to install it via PPA, on Fedora 14 it already is in the repositories, search for at-spi2. Next you need to enable desktop accessibility and D-Bus support:
gconftool-2 --set /desktop/gnome/interface/at-spi-corba --type bool false<br />
gconftool-2 --set /desktop/gnome/interface/at-spi-dbus --type bool true<br />
gconftool-2 --set /desktop/gnome/interface/accessibility --type bool true
There are a lot of tricks to get the newly built registry to run in your session, but the easiest way is also the most hackish, simply edit /usr/share/dbus-1/services/org.a11y.atspi.Registry.service
and substitute /usr
with the prefix to your newly installed registry, for example /home/eitan/gnome-a11y/install
. Log out and back in again, and you should be using the latest AT-SPI2 registry.
If everything worked, running jhbuild run caribou
should bring you the latest version of Caribou.
Good luck!