Make Yubikey working with non-us keyboard layouts

Út 09 dubna 2013

My employer started to use system which allows using Yubikey for authentication [added later: the most important thing is that whole system is Open Source, which is very very good thing], so I have finally gave up and bought one myself as well. It works really well, and comparing to the previous system it is both smaller and more convenient to use (not mentioning that the previous system has been compromised).

The only problem I had with it is, that in order to be ultra-secure it doesn't allow much configuration (my version of Yubikey doesn't have use-numeric-keypad option) so with my default Czech keyboard, it didn't work, and I had to switch all the time between Czech and US keyboard manually.

The first option seemed to be to use custom configuration snippet as described in the Fedora Wiki and create a file in /etc/X11/xorg.conf.d/ directory with content like:

Section "InputClass"
    Identifier "keyboard defaults"
    MatchProduct "Yubic Yubico Yubikey II"

    Option "XkbModel" "pc104"
    Option "XkbLayout" "us"
    Option "XKbOptions" ""

Unfortunately, this solution doesn’t work with Gnome, which controls input devices dynamically and overrides Xorg defaults.

Finally, I have found the solution with very kind help of Peter Hutterer and his blogpost on Custom input device configuration in GNOME. When the example script from gnome-settings-daemon is modified to include the configuration, it could also set Yubikey (and only Yubikey) input device to us keyboard layout. The key part is:

case "$1" in
      echo "Setting Yubikey layout"
      setxkbmap -device $2 -layout us

Whole script is

Category: computer Tagged: yubikey xorg Gnome


Gnome 3 and key shortcuts

Ne 15 května 2011

One of the things which surprised me very much when using Gnome-shell on regular basis (which I have been doing with interruptions for more than the last year) is how pleasant experience is to use Gnome-shell for rodent haters. As I am used to the trend that software tends to …

Category: computer Tagged: Gnome Fedora


Read More

My desktop

St 08 září 2010

Adam is right: I am not getting it either.

screenshot of my desktop
  1. except of background, I don't change my desktop either,
  2. I don't see much of my desktop under all those icons anyway (I have $HOME as my desktop),
  3. usually most of my time I have desktop hopelessly hidden behind fully maximized Firefox …

Category: computer Tagged: joke Gnome


Read More
Page 1 of 1