Tips

Changing language settings

To change the default language used by the Librem Key for GPG:

  1. Enter the GPG card edit menu:

    gpg --card-edit
    
  2. From the gpg/card> prompt, enter admin mode.

    admin
    
  3. Enter the language preferences menu.

    lang
    

    You will then receive a Language preferences: prompt.

  4. To change the language from German to English:

    en
    
  5. Exit the menu.

    quit
    

Automatically lock the desktop when removing the Librem Key

Through the use of a simple script and udev rules, the computer can lock the screen when the Librem Key is removed. This integration requires the following contents be placed in the appropriate locations:

  1. /etc/udev/rules.d/85-libremkey.rules

    ACTION=="remove", ENV{PRODUCT}=="316d/4c4b/101" RUN+="/usr/local/bin/gnome-screensaver-lock"
    
  2. /usr/local/bin/gnome-screensaver-lock

    #!/bin/sh
    
    user=`ps aux | egrep "gdm-(wayland|x)-session" | head -n 1 | awk '{print $1}'`
    
    if [ -n $user ]; then
            su $user -c "/usr/bin/dbus-send --type=method_call --dest=org.gnome.ScreenSaver /org/gnome/ScreenSaver org.gnome.ScreenSaver.Lock"
    fi
    
  3. udev must now be triggered to reload upon installation to use the new rule:

    systemctl restart udev