World Of GNOME has interviewed me again, this time about Skeltrack, my role at Red Hat and Open Source at CERN.
If you would like to know more about those (there is even an animal shelter in the mix), check it out here.
My life has seen some big changes this year with getting a new job, moving to Berlin, etc. Well, the changes haven’t stopped yet.
Before I applied to Red Hat, at the beginning of the year, I had applied to a position at CERN (if you don’t know what CERN is, look it up, but part of the reason you’re addicted to the internet is because of it). CERN has two periods throughout the year where it accepts applications, I knew it wasn’t easy to be accepted and I had to move on with my life so I was happily living in Berlin and working for Red Hat.
Turns out I was accepted and I had a decision to make.
On one hand, I was very happy to finally be living in Berlin, Helena was enrolled in an intensive German course (and doing great), we were living in the nice neighborhood of Prenzlauer Berg and of course, I don’t need to tell you how great Red Hat is if you consider yourself a Free Software developer. On the other hand, I knew this opportunity with CERN would be hard to get again. So in the end I took the tough decision of leaving Red Hat and I have been working at CERN since last week. I am working on a project out of my comfort zone (and yes, it’s Free Software), but that’s part of the challenge.
I changed a unique company for a unique research center and I changed one of the cheapest, coolest cities in Europe for one of the most expensive in the world.
Regarding work and GNOME in particular, I will keep involved in it, even though my projects have been neglected with all the moving: I hope to finish the port of OCRFeeder to GI and to give some love to Skeltrack once I have time (and conditions: no internet at home yet…).
Even Bigger Changes
Oh, yeah, there’s something else I would like to share. I am in the first steps of what will surely be the biggest project I will ever develop: Helena and I are expecting a baby!
We just found out one week before moving out of Berlin. It surely doesn’t make all the moving easier but we can’t describe how happy we are with these news! It’s curious that we had to live in the “babyboom neighborhood” of Berlin to get a baby ourselves… there must be something in the water!
And that is all for now, let’s see what the next months bring!
When I explained how the Leap Motion device could be used on Fedora 19, I mentioned how I had one of those early prototypes. Well, Leap Motion was extremely kind and sent me an actual device as a thank you for starting the thread asking for Linux support. Now that GUADEC is over and I am spending my vacation in Portugal, I had a little time to play with my fancy new device and wrote a relatively small script to control GNOME with it. I call it the über original name of: Leap GNOME Controller!
Those who don’t care about technical details, here’s the video showing what can be done with Leap, GNOME and this script. Technical details follow below the video:
The two videos that compose the one above were recorded with an HD camera and GNOME Shell’s screencast recorder. I tried to sync them the best I could but a certain delay can be noticed, especially at the end of the video.
Leap Motion provides a “close source” shared library and a high-level API with the respective documentation for the many bindings it has. To code it quickly, I used the Python bindings and Xlib to fake the input events.
Leap Motion’s APIs make it really easy for one to simulate a touch-screen. It even offers a “screen tap” gesture that should be the obvious choice when mapping a finger touch/tap to a mouse click. However, this didn’t work very well. The problem is that if we are tracking one finger to control the mouse movement, when performing the “screen tap” gesture, the finger (and mouse) will of course move. Making it as frustrating as seen on ArsTechnica hands-on video.
I came up with a solution for this by dropping the “screen tap” gesture and using the “key tap” instead. The “key tap” is a simple, quick down-and-up finger movement, like pressing a key. This is much more precise and easier for a user to do than the “screen tap”. Of course that when the finger moves for performing the gesture, the mouse pointer would move as well, so I came up with a little trick to work around this: when the mouse pointer doesn’t move more than a couple of pixels for half a second, it will stop and only move again if the user makes it move for more than 150 pixels. This allows for the user to stop the pointer with precision where it needs to be and perform the gesture without making the pointer move.
The Leap device offers a lot of possibilities for adding many gestures. Ideally they should be implemented per application but being able to control the shell is already pretty useful, so it would be wonderful to fine-tune the current gestures and add new ones. I also wish the library’s source code were open because I ran into small issues and I wish I could take a look at the source code, instead of trying to fix it based on the theories of what might be wrong.
I haven’t explored the AirSpace appstore yet so I don’t know if it is worth adding (or possible to add) this script there but I will check it out.
Having fun with Leap and GNOME!
In what comes to assigning buttons’ functions for the Wacom tablets in GNOME, the approach in the GNOME Control Center was the traditional tree-view: one button’s label per row, allowing to choose the functionality but requiring the user to mentally map the tablet’s buttons’ layout to the names in the tree-view.
Since we already have a help window, provided by GNOME Settings Daemon, which presents a tablet’s buttons layout in a realistic, visual way to the user, we decided to make it more powerful and assign the buttons directly from there! This way it is faster and more intuitive to set the buttons. Here is a video showing these nice new changes:
Another change is that the keyboard shortcuts are now captured by a new widget which supports also modifier-only shortcuts, meaning that now Ctrl, Ctrl+Alt, Shift, etc. can be easily assigned to buttons, allowing for more flexibility when mapping the tablet’s buttons to applications’ commands. As shown in the video, the old GtkTreeView was also replaced by a nicer GtkListBox (which also makes use of this shortcut capture widget).
Going to GUADEC
That’s right, for the fifth year now, I am going to GUADEC! Besides attending the conference, it will be also a good chance to have a beer with old friends and team mates from Red Hat, who I only interact with on IRC.
See you in Brno!
I was one of the fortunate developers who got one of the first Leap Motion development units. Unfortunately the SDK was only available for Windows and Mac OS so, since I couldn’t use it, I started a topic on Leap’s developer forum to ask for a Linux SDK. The number of users joining the petition kept increasing until Leap released an SDK (closed source binaries) for Linux about 4 months ago… when I was moving to a different country and had left my, then useless, Leap device in my parents’ attic (thanks to my brother for sending it to me)
The SDK for Linux is actually a deb package intended for Ubuntu and, although there is also a tarball with the compiled shared libs and examples, as far as I could check, only the deb package provides the demon and other useful tools. Since I am running Fedora, that meant that I had to allocate a bit more of my time to explore this wonderful device.
The device will officially launch tomorrow so I thought I could write a little set of steps for Fedora (and maybe other distros) users to play with it. The only dependency that I think is necessary to install is mesa-libGLU.x86_64 for running the visualizer.
I cooked a little video showing how it works before the boring sections below:
Install the Leap SDK
First we need to download and extract the deb package (at the time of writing, the SDK was no longer available to download until they release it, hopefully in less then a day).
If you are a rebel and have dpkg installed on your Fedora like I do, go ahead and do:
$ dpkg -x Leap-0.8.0-x64.deb Leap-0.8.0
or, if you don’t want to use dpkg:
$ mkdir Leap-0.8.0 && ar p Leap-0.8.0-x64.deb data.tar.gz | tar zx
Inside the Leap-0.8.0 folder there will two folders: usr and lib .
Copy (as root) the rules file to the udev rules directory:
# cp lib/udev/rules.d/25-com-leapmotion-leap.rules /etc/udev/rules.d/
Then we need to add our user to the “plugdev” group. If it doesn’t exist, create it (as root):
# groupadd plugdev
# usermod -a -G plugdev YOUR_USER_NAME
After this step it’s probably a good idea to restart your session…
As mentioned above, the deb ships a few binaries, found inside the usr/bin folder. It contains the leapd service, a Visualizer, a Recalibrate tool, a LeapControlPanel and a ScreenLocator (this one segfaults on my machine and I didn’t care why). I prefer to put these and other files inside my user’s .local folder:
$ cp bin/* ~/.local/bin/
Notice that, except for leapd, all other binaries have an upper case name and, most of them, a rather generic one which some users might want to change (e.g. to leap-visualizer, leap-calibrator, etc.) before copying them. I will not change them in this example.
There are also some configuration files that need to be copied from usr/share/:
$ cp -R usr/share/Leap ~/.local/share/
At this point we can already play with the Leap Motion device by running the leapd service and using e.g. the visualizer (it might be a good idea to actually recalibrate the device before using it, with the Recalibrate tool):
$ leapd &
All is done except for the development libraries. If you want to develop you own stuff using Leap, you should have libLeap.so in your libraries’ path. This .so can be found in usr/lib/Leap, inside the extracted deb, or you can download the Leap Developer Kit which brings are some bindings like Python (LeapPython.so) and Java (libLeapJava.so).
Of course you can copy these libs directly into /usr/lib64/ but I prefer to have them in .local/lib/ and setting the LD_LIBRARY_PATH and, for Python, the PYTHONPATH, variables.
To copy the libs from the folder extracted from the deb package:
$ cp usr/lib/Leap/* ~/.local/lib/
To copy the libs from the Leap Developer Kit tarball (using a 64 bit architecture):
$ cp LeapSDK/lib/x64/* ~/.local/lib/
After copying the .so files:
$ export LD_LIBRARY_PATH=~/.local/lib
$ export PYTHONPATH=~/.local/lib
Have fun with Leap Motion on Fedora!