Shorter trackpad-disabling timeout with Gnome 3 (Fedora 17)

Gnome 3 has the option of disabling the trackpad while the user is typing. (System Settings -> Mouse and Touchpad -> Touchpad) However, it uses a timeout of two seconds. Two seconds doesn’t sound like much, but it may be enough to feel weird — at least it did for me.

When you check that option, all Gnome is doing is running a utility called “syndaemon”, and it uses a 2 second timeout. We can adjust the timeout by running this ourselves when we login:

  1. Make sure Gnome doesn’t also run syndaemon by keeping the aforementioned checkbox unchecked
  2. Run gnome-session-properties, after entering alt-F2 or from the commandline.
  3. Click Add, and then enter Syndaemon, /usr/bin/syndaemon -i 0.5 -K -R, and any comment you want
  4. Click Save.
  5. Logout and back in

If you run “ps ax|grep synd” you will see syndaemon has been started with your settings. 0.5 seconds works for me but feel free to experiment.

A hundred other languages want to call your code

The users of a hundred programming languages would like to call your low-level code, but they can’t.

Things have changed in the last 20 years. More people are using languages like Python, Ruby, and a hundred more, that are further from the bare metal. People are building service stacks that tie together many lower-level functions.

Libraries and APIs that make low-level features available to convenient high-level languages (HLLs) are a good thing. As a HL coder, it’s pretty handy to install python-foo, type “import foo” and then have access to that functionality.

What if python-foo isn’t there? HLL users are out of luck, unless they are so determined they make their own python-foo that calls system(), and then parses the output using their language’s fancy text parsing features.

But system() is the devil. We hate system(), folks. If your code calls system() it’s bad, for four reasons:

  1. Overhead. It creates a new process and subshell.
  2. Security. If your code has elevated privileges and is including text input by an untrusted user, watch out. Remember little Bobby Tables, a semicolon is a dangerous thing.
  3. Ease. Parsing command-line programs’ output can be a pain, even if your language helps lessen it. Parsing of errors is even harder and prone to be overlooked.
  4. Portability. A different platform may (or may not) have the program you’re relying on, or its output may be different, and you won’t know.

Early on when I was learning Python, I tried to write a gui for OProfile by parsing its output. OProfile did nice (for the user) things like adding headers on its output, and changing the format of output depending on what it found. Great for users, but it doomed my project. I couldn’t parse the output reliably.

You want to make it easy for the people who are language gurus for each of the hundred languages out there to wrap your functionality without having to become an expert in your code, or even change it. Then the hordes using all the hundred languages can use your library without being an expert in your code or being enough of a guru in their language to write a wrapper. They can just happily use it.

Here’s a positive development, kmod. kmod is a new implementation of the utilities in module-init-tools: modprobe, lsmod, lsmod, etc. Not only does kmod include a libkmod C library, but the commandline programs use it, so we know it works. Yeah! This made it super easy for someone (me) to come along and write a language wrapper (python-kmod) without having to know about module internals. python-kmod makes it easy for Python users to manipulate modules using the friendly language features they’re used to, like exceptions for errors, and lists. If I had been forced to use system(), it probably would have mostly worked, but it would have failed when output parsing failed for some edge case.

I encourage all low-level program writers, my fellow Linux Plumbers, to consider how to make native language bindings possible for your code. You don’t have to write them, just make them possible and you will find all sorts of people calling your code, safely, who couldn’t before.

Targetcli Screencast series

Link
These are three screencasts I made recently to better explain how to use targetcli to configure the Linux kernel target subsystem. Doing them uncovered a number of usability issues in targetcli, so they’ve already been of use to me, and hopefully will be of use for potential users of targetcli and LIO as well.

  1. Overview and backstores
  2. Fabrics and ISCSI
  3. The configuration file and Python API

I’ve also been dogfooding screencast software on RHEL 6, which works only with effort. I ended up using gtk-recordmydesktop (in EPEL) and then converting the .ogv to VP8 with oggconvert (will be getting into EPEL), before I could successfully upload to YouTube with good results.

Fedora and Open Source at Grace Hopper 2011

Me wearing my flairI was at the Open Source booth at this year’s Grace Hopper Celebration of Women in Computing, last Thursday. We had Fedora media and swag also available Wed and Fri as well. The booth was shared with Mozilla, Kids on Computers. Wikimedia, OSU OSL, the Ada Initiative, and assorted other FOSS projects. While I talked about Fedora and handed out media and stickers, many attendees were students and new to tech as a whole, so “what is open source” was the first, most important, question.

I also attended the Codeathon for Humanity on Saturday, with about 200 attendees working on various open source philanthropic projects: Sahana, Systers, Mailman, peer-to-peer Haitian Women’s network, to name a few. The Mayor of Portland, Sam Adams, stopped by and spoke. I wasn’t expecting this, but was pretty nice to hear about the importance of open source to the city government, as well as the Portland tech scene as a whole!

Ada Lovelace Day – Jen Redman

Today I would like to talk about a woman in computing that inspires me every day, in the spirit of Ada Lovelace — Jennifer Redman.

First, let me say that being in a relationship with someone else who knows tech is really great. She knows how things work, so if I’m having an issue, she can listen and offer helpful technical advice to get me going again. This is very important for me, as someone who works without actual co-workers in close proximity. She is a voracious reader, and not only has opinions, but can argue for them persuasively!

Jen is a fountain of new ideas. She is involved in the Portland tech scene as a mentor for PIE (Portland Incubator Experiment) and threatens me she will found her own tech startup at any moment. 🙂 Her background in infrastructure and management has helped the success of our co-location cooperative, as well.

Jen has done so much work over the past few years to promote women in computing. She has had a significant role in administering the Systers mailing list for technical women for many years. She was instrumental in getting Systers accepted in the Google Summer of Code, and being an administrator and mentor for students participating in that. She also worked hard to establish an Open Source track at the Grace Hopper conference, and this year’s Codeathon for Humanity at GHC, which will introduce two hundred technical women to contributing to worthy F/OSS projects!

Happy Ada Lovelace Day, Jen!