OnboardAndDwellAtGDM
Onboard and Dwelling during GDM
Introduction
People using Ubuntu 7.10 and that need an onscreen keyboard now have a way to also start one during their GDM session. Moreover, if they cannot click with a hardware button, they can also enable dwelling (i. e. a software click) in their GDM session.
Please, have a look at the following picture to see the onscreen keyboard called onboard and the dwelling application called mousetweaks run alongside the Plain interface of GDM (called gdmlogin):
inline:GDMLoginWithOnboardAndDwelling.png
Remark: I have been told that this is currently not possible with the themed greeter, because it is not able to handle other applications using a gui. Consequently the following will be restricted to the plain greeter.
Remark2: I have filed the following Request For Enhancement bug to make onboard and mousetweaks also available for the themed greeter: https://bugs.launchpad.net/ubuntu/+source/gdm/+bug/130368
Add new gestures to GDM in order to start onboard and mousetweaks
When the Accessibility features are enabled for the Login Window, the plain greeter steadily monitors the movement of the pointer in the background. When it recognises a gesture that has been defined in the gesture configuration file, it starts the application associated with that gesture:
Add the gesture to start onboard to the gesture configuration file
Open a terminal and type the following to open the gesture configuration file:
sudo gedit /etc/gdm/modules/AccessDwellMouseEvents
The following line defines a new the gesture and associates it to onboard:
RBLT I 10000 /usr/bin/onboard --size 500x190 -x 20 -y 10
Please add it above the following line that is already in the gesture configuration file:
TBLR I 10000 /usr/bin/gok --login --access-method=directselection
Save and close gedit.
Add the gesture to start mousetweaks to the gesture configuration file
Similar to onboard, the following line defines another new gesture and it associates it to mousetweaks. Please add it right below the line for onboard to the gesture configuration file:
RTLB I 5000 /usr/bin/mousetweaks --enable dwell --show-ctw --ctw-x 550 --ctw-y 10
Remark: As mousetweaks is not installed by default during the Ubuntu installation, you have to install it yourself; for example by using the Synaptic Package Manager. (At the moment of this writing, it is not included in the Ubuntu repository; but once Ubuntu 7.10 has been released, it should be in the Universe repository.)
Enable Assistive Technology and Set Plain Theme
For GDM to monitor the pointer for gestures, you have to configure it to use its plain greeter and enable the accessibility features. The Login Window under the menu System->Administration of the normal gnome session allows you to perform the appropriate configuration.
- First enable Assistive Technology in the Accessibility tab of the Login Window:
inline:LoginWindowAccessibilityTab.png
- Unfortunately, the accessibility features do not work with the default gdm-theme used by Ubuntu. You have to set gdm to use its Plain theme in the Style menu under the Local tab:
inline:LoginWindowLocalTab.png
How to start onboard
During the GDM session, a background process steadily monitors the pointer to detect determined gestures that are associated with specific programs. On the following picture you can see the gesture that the pointer has to perform in order to start of onboard:
inline:gdmlogin-onboard-gesture.png
What matters in the gesture, is:
- what edges of the GDM windows are crossed
- the sequence of the crossed edges
- if the first edge is crossed from outside to inside, or from the inside to the outside
- no more than 5 seconds must elapse between the crossing of one edge and its following edge
- it does not matter if the pointer moves in straight lines (like in the sample above) or in curves; the only thing that matters is the edge crossing
For onboard this means:
- the pointer has to begin by crossing the left edge from the window from the outside to the inside
- then it has to cross the bottom edge from the inside to the outside
- then it has to cross the right edge from the outside to the inside
- finally it has to cross the top edge from the inside to the outside
If no more than 5 seconds did elapse between two border crossings, the onscreen keyboard onboard will appear at the top-left of the screen.
How to start dwelling
It is also possible to start dwelling with a gesture during the GDM session. (provided that Assistive Technology has been enabled for GDM and that the Plain theme is used)
However, the dwelling function needs another background program named at-spi, which in Ubuntu is disabled by default during GDM. Consequently, before starting the dwelling function you have to first start at-spi.
Below, you can see the gesture that starts at-spi and the gesture that starts dwelling:
- Gesture to start mousetweaks for dwelling:
inline:gdmlogin-mousetweaks-gesture.png
- Gesture to start at-spi (only needed as long as it does not start automatically due to a bug) :
inline:gdmlogin-atspi-gesture.png
For explanations about how to interprete the pictures, please have a look at the Starting of onboard above.