Second round of tweaking

Gnome-Keyring

Gnome-Keyring is used for storing passwords in Phosh. At the time it is not integrated with the Phosh pin, so if you set a password it needs to be opened up manually every time you log in. If you do not want this, then set it up with a blank password.

If it set up without the password, then it stored not encrypted on the drive. Beware!!

Installing VPNC

I need a Cisco client for accessing my home network. I decided to use vpnc.
It is CLI but easy to use, so this is good enough for me.

Setting up ZRAM

I decided to setup ZRAM, because Pinetab does not have a lot of RAM. This is just in case, although my RAM is never full. I do not use a lot of apps or have a lot tabs open Firefox.

Setting up switching of the On-Screen-Keyboard

With the update of sqeekboard to version 1.10, the honoring of the variable screen-keyboard-enable is supported. So using this combined with some udev magic can give us following:

  1. Mechanical keyboard attached -> Disable On-Screen-Keyboard
  2. Mechanical keyboard removed -> Enable On-Screen-Keyboard

To do this create two script in /home/mobian/scripts, one named osk-on.sh with gsettings set org.gnome.desktop.a11y.applications screen-keyboard-enabled true and the other one named osk-off.sh with gsettings set org.gnome.desktop.a11y.applications screen-keyboard-enabled false.
Then create a file /etc/udev/rules.d/99-attach-keyboard.rules with following code

ACTION=="add", SUBSYSTEM=="usb", ENV{PRODUCT}=="258a/1e/100", RUN+="/bin/su mobian --command='/home/mobian/scripts/osk-off.sh'"
ACTION=="remove", SUBSYSTEM=="usb", ENV{PRODUCT}=="258a/1e/100", RUN+="/bin/su mobian --command='/home/mobian/scripts/osk-on.sh'"

After this issue udevadm control --reload and enjoy your new keyboard switching!

Happy hacking!!!

License: CC BY-SA 4.0 Discuss on Mastodon