Skip to Content



Xmodmap not running when launched from ~/.xinitrc. Works when launched manually.

[Fix!] Modify xinitrc from …

[ -f ~/.xmodmap ] && xmodmap ~/.xmodmap

… to …

[ -f ~/.xmodmap ] && sleep 5 && xmodmap ~/.xmodmap &


Compton - disable fading, shadow effects, run as background process.

Copy …

$ cp /etc/xdg/compton.conf ~/.config/compton.conf

… and edit to disable fading …

# Fade windows during opacity changes.
fading = false;
# The time between steps in a fade in milliseconds. (default 10).
fade-delta = 0;
# Opacity change between steps while fading in. (default 0.028).
fade-in-step = 0;
# Opacity change between steps while fading out. (default 0.03).
fade-out-step = 0;
# Fade windows in/out when opening/closing
no-fading-openclose = true;

# Specify a list of conditions of windows that should not be faded.
fade-exclude = [ ];

For openbox … add to ~/.config/openbox/autostart

compton -CGb &


Get tap-to-click working on chromebook with Arch Linux.

Install …

$ sudo pacman -S xf86-input-libinput xorg-xinput

Output devices and their respective features supported by libinput

$ sudo libinput list-devices
Device:           Cypress APA Trackpad (cyapa)
Kernel:           /dev/input/event12
Group:            8
Seat:             seat0, default
Size:             87x47mm
Capabilities:     pointer gesture
Tap-to-click:     disabled
Tap-and-drag:     enabled
Tap drag lock:    disabled
Left-handed:      disabled
Nat.scrolling:    disabled
Middle emulation: disabled
Calibration:      n/a
Scroll methods:   *two-finger edge 
Click methods:    button-areas *clickfinger 
Disable-w-typing: enabled
Accel profiles:   none
Rotation:         n/a

Configure at runtime using xinput and/or creating /etc/X11/xorg.conf.d/30-touchpad.conf

Section "InputClass"
        Identifier "cyapa"
        Driver "libinput"
        MatchIsTouchpad "on"
        Option "Tapping" "on"
        Option "ClickMethod" "clickfinger"



Building clipit from AUR. First, ensure that the necessary tools are available by installing base-devel group in which includes make and other tools needed for compiling from source.

Locate the package in the AUR. This is done using the search field at the top of the AUR home page.

Acquire build files …

$ git clone

Build and install package …

$ cd clipit
$ makepkg -si


Set the default kernel in GRUB: Modify /etc/default/grub


Run sudo update-grub, reboot, in GRUB menu select the desired kernel. Choice will be saved and next time system will boot into it automatically.



Wallpaper for GRUB menu: image should be PNG, JPG or TGA image. JPG images must be 8-bit (256 color), so PNG is preferable. In GIMP use the Image > Mode menu to set the properties to RGB and ensure the mode is not set to Indexed.


I feel that you are entering an age of metamorphosis; that you will decide to cast aside your entire history, your entire heritage and all that remains of natural humanity — whose image, magnified into beautiful tragedy, is the focus of the mirrors of your beliefs; that you will advance (for there is no other way), and in this, which for you is now only a leap into the abyss, you will find a challenge, if not a beauty; and that you will proceed in your own way after all, since in casting off man, man will save himself.

– Stanislaw Lem, Golem XIV


Install vim-plug (plugin manager for neovim) …

$ curl -fLo ~/.local/share/nvim/site/autoload/plug.vim --create-dirs \


Block a Debian package from being installed via apt-pinning. Package fuse was being pulled in and failing to install.

[Fix!] Create file fuse in /etc/apt/preferences.d and pin to -1 (never install) …

Package: fuse
Pin: release *
Pin-Priority: -1


Use neovim’s “factory default settings” (ignores init.vim) …

$ nvim -u NONE


LED voltages vary by color. Typically: Red: 1.7V, Yellow: 2.1V, Green: 2.2V, Blue and white: 3.5V (courtesy of adafruit)


Broken symlinks don’t change colour (red) in terminal.

[ Fix! ] Add …

eval `dircolors`

… to ~/.bashrc.


Install/Uninstall virtualbox extension pack:


Download the VirtualBox VERSION Oracle VM VirtualBox Extension Pack (VERSION needs to match installed version of VirtualBox).

In VirtualBox, open File->Preferences->Extensions, click the + button to add the extension, navigate to where the *.vbox-extpack file was saved and select it, confirm the end user agreement, and input root or sudo password to authenticate and install.

List extpacks …

$ sudo VBoxManage list extpacks
Extension Packs: 1
Pack no. 0:   Oracle VM VirtualBox Extension Pack
Version:      6.0.10
Revision:     132072
Description:  USB 2.0 and USB 3.0 Host Controller, Host Webcam, VirtualBox RDP, PXE ROM, Disk Encryption, NVMe.
VRDE Module:  VBoxVRDP
Usable:       true 
Why unusable: 


$ sudo VBoxManage extpack uninstall "Oracle VM VirtualBox Extension Pack"
Successfully uninstalled "Oracle VM VirtualBox Extension Pack".
$ sudo VBoxManage list extpacks
Extension Packs: 0

Link: How To Install Oracle VM VirtualBox Extension Pack on Linux Hosts


Capture and display screenshots in GNOME using gnome-screenshot and eog (image viewer).

First, I create

#!/usr/bin/env bash
FILENAME="${HOME}/tmp/screenshot-$(date +%FT%H%M%S).png"
if [ $# -eq 0 ]; then
    gnome-screenshot -f "$FILENAME"
elif [ $# -eq 1 ]; then
    # $1 = '-w' (window) or '-a' (select area)
    gnome-screenshot "$1" -f "$FILENAME"

In Settings->Devices->Keyboard I unset default screenshot shortcuts and make custom shortcuts that point to to capture:

  • desktop – /path/to/ – Print
  • window – /path/to/ -w – Alt+Print
  • area – /path/to/ -a – Shift+Print


Scroll up/down with shift + page up/down broken inside a pane in tmux not working.

[ Fix!] Add to ~/.tmux.conf

is_vim="ps -o state= -o comm= -t '#{pane_tty}' \
    | grep -iqE '^[^TXZ ]+ +(\\S+\\/)?g?(view|n?vim?x?)(diff)?$'"
bind -n Pageup if-shell "$is_vim" "send-keys Pageup" "copy-mode -u"
bind -n S-Pageup if-shell "$is_vim" "send-keys Pageup" "copy-mode -u"
bind -n S-Pagedown send-keys Pagedown



My formula for greatness in a human being is amor fati: that one wants nothing to be different, not forward, not backward, not in all eternity. Not merely bear what is necessary, still less conceal it … but love it.

– Nietzsche


Turn off backlight on laptop (acting as home server) …

$ sudo apt install vbetool
$ sudo vbetool dpms off


Gnome desktop backgrounds: Link to my background images folder - and enable Gnome desktop settings to see its content - by creating a link …

$ rm -rf ~/.cache/gnome-control-center/backgrounds
$ ln -s /my/wallpaper/image/folder ~/.cache/gnome-control-center/backgrounds

Link: Fix wallpaper inconsistency


Gnome startup applications: Launch gnome-terminal with the window maximized upon login. First, create script and place in ~/bin …

#!/usr/bin/env bash
gnome-terminal --window --maximize

… and create terminalMax.desktop in ~/.config/autostart

[Desktop Entry]


Apply GTK theming to QT apps …

$ sudo apt install qt5-style-plugins
$ echo 'QT_QPA_PLATFORMTHEME=gtk2' >> ~/.profile


GNOME Extensions: Goto and setup gnome shell integration in two parts. First, install host package …

$ sudo apt install chrome-gnome-shell

… followed by the websites’s browser extension.

To check the gnome shell version …

$ gnome-shell --version


Choose not to be harmed – and you won’t feel harmed. Don’t feel harmed – and you haven’t been.

– Marcus Aurelius


Video thumbnails in nautilus on ubuntu 18.04. Install …

$ sudo apt install ffmpegthumbnailer
$ rm -rf ~/.cache/thumbnails


Disable bluetooth. At boot or resuming from suspend getting message …

bluetooth hci0: firmware: failed to load brcm/BCM43142A0-0a5c-21d7.hcd (-2)

I do not use bluetooth. To remove the message, disable bluetooth service …

$ sudo systemctl disable bluetooth.service

… and blacklist bluetooth modules from loading …

$ echo -e 'blacklist bluetooth\nblacklist btusb' | sudo tee /etc/modprobe.d/bluetooth-blacklist.conf

… and reboot. No more messages.


Configure trackpoint on Thinkpad x230. Jittery and zooming all over the place. Find name/id of trackpoint …

$ xinput list

… which on the x230 is …

TPPS/2 IBM TrackPoint                     id=13   [slave  pointer  (2)]

List the properties that can be modified by xinput …

$ xinput list-props 13

Add to script or ~/.bashrc

xinput --set-prop 13 "libinput Accel Speed" 0.50
xinput --set-prop 13 "libinput Accel Profile Enabled" 0 1



SSH Host tab completion not working. I have a few Host aliases defined in my ~/.ssh/config. Example: Host test-server. So when, in console, I type …

$ ssh tes

… and hit Tab, then auto-completion fills out …

$ ssh test-server

When I try to do the same thing in a termimal (urxvt), tab completion does not work. The complete host alias has to be entered.

But tab completion for ssh host aliases does work if entered within tmux running in the terminal.

[Solved] Add to my ~/.bashrc

if [[ -f /etc/profile.d/ ]]; then
    . /etc/profile.d/


To change the hostname, run …

$ sudo hostnamectl set-hostname NEW_HOSTNAME

… and confirm/edit …

  • Update /etc/hostname
  • Update /etc/hosts
  • Update /etc/mailname
  • Update root@hostname at the end of /etc/ssh/ files

… and reboot system.

For more application-specific modifications see for details.


To source the contents of $HOME/.profile when using Lightdm as display manager, create $HOME/.xsessionrc with the entry …

. $HOME/.profile


No screens found. If startx fails inside a Virtualbox VM and that screens error appears in /var/log/Xorg.0.log, install …

$ sudo apt install xserver-xorg-video-vesa

… to fix.


Watch your thoughts; they become words.
Watch your words; they become actions.
Watch your actions; they become habits.
Watch your habits; they become character.
Watch your character; it becomes your destiny.

– Lao Tzu


Install Virtualbox from the Oracle repository on Debian “buster”. Note: no release for “buster”; substitute ubuntu’s “bionic” (18.04 LTS) instead.

Create virtualbox.list in /etc/apt/sources.list.d containing …

deb bionic contrib

Add virtualbox public key …

$ wget -q -O- | sudo apt-key add -
$ apt-key list
pub   rsa4096 2016-04-22 [SC]
      B9F8 D658 297A F3EF C18D  5CDF A2F6 83C5 2980 AECF
uid           [ unknown] Oracle Corporation (VirtualBox archive signing key) <>
sub   rsa4096 2016-04-22 [E]

Install …

$ sudo apt update && sudo apt install virtualbox-6.0 

Link: Download VirtualBox


The transposition from a bustling office tower in Manhattan to a suburb of “the sleepy old city” of Nara has felt to him “as if I’ve walked out of a cluttered warehouse into a simple bare room with a scroll on the wall, everything so singular that emotion is brought to a pitch.” All this is part of what Iyer sees as an aesthetic of enhancement through subtraction, “the Japanese art of taking more and more away to charge the few things that remain.”

Pico Iyer Reflects on a Quarter-Century of Life in Japan


Install F-Droid client on Android phone running LineageOS 15.1 (Oreo 8.1). Note: Option unknown sources under Settings->Security no longer available in Oreo.

  • Download the privileged extension ZIP file - org.fdroid.fdroid.privileged.ota - that grants F-Droid permission to securely install and update apps.

  • Connect phone to computer. Reboot phone into recovery mode.

  • From the TWRP main menu, select Advanced -> ADB Sideload then swipe to begin sideload.

  • On the host machine, sideload the package using …

$ adb sideload
  • On the phone, select Reboot system. F-Droid is now installed and the client appears in Applications.


Mount android phone with jmtpfs. Install …

$ sudo apt install jmtpfs

Unlock and connect phone. List connected device …

$ jmtpfs -l
Device 0 [...] 

Create a mountpoint in $HOME and mount device …

$ mkdir -p ~/mnt/phone
$ jmtpfs ~/mnt/phone
Device 0 [...]

Unmount device …

$ fusermount -u ~/mnt/phone


Add the following to the end of a cronjob to redirect Standard Output (STDOUT) and Standard Error (STDERR) to null to suppress output …

>/dev/null 2>&1


What might have been and what has
Point to one end, which is always present.
Footfalls echo in the memory
Down the passage which we did not take
Towards the door we never opened.

– T.S. Eliot, “Burnt Norton”


Play a sound from a cronjob: Set XDG_RUNTIME_DIR=/run/user/user_id before the command and replace user_id with the numeric ID of the user running PulseAudio.

Example: my user_id is 1000 and I use the console player mpg321 to play an MP3 every hour on the hour …

# m h  dom mon dow   command
0 * * * * XDG_RUNTIME_DIR=/run/user/1000 mpg321 /path/to/sound/file.mp3

Link: Play sound from a non-interactive shell


Ever tried. Ever failed. No matter. Try again. Fail again. Fail better.

– Samuel Beckett


Unlike other QT apps, Virtualbox 6.0.4 does not respect GTK dark themes. Uses an unreadable light grey foreground on white background. Known issue.

[ Fix! ] (kind of …) Start VB with a more usable colour scheme (black text foreground/white background) …

$ VirtualBox -style Fusion %U

… which is not my preferred theme but at least makes VB usable.


Intel and AMD processors may periodically need updates to their microcode firmware. Microcode can be updated (and kept in volatile memory) during boot by installing either intel-microcode or amd64-microcode (AMD) …

$ sudo apt install intel-microcode

Sample output from my laptop before reboot …

$ dmesg | grep microcode
[    0.042819] [Firmware Bug]: TSC_DEADLINE disabled due to Errata; please update microcode to version: 0x20 (or later)
[    1.325081] microcode: sig=0x40651, pf=0x40, revision=0x15
[    1.325137] microcode: Microcode Update Driver: v2.2.
$ grep microcode /proc/cpuinfo 
microcode	: 0x15
microcode	: 0x15

… and after reboot …

$ dmesg | grep microcode
[    0.000000] microcode: microcode updated early to revision 0x24, date = 2018-04-02
[    1.329836] microcode: sig=0x40651, pf=0x40, revision=0x24
[    1.329903] microcode: Microcode Update Driver: v2.2.
$ grep microcode /proc/cpuinfo 
microcode	: 0x24
microcode	: 0x24

Link: Microcode


A map of the world that does not include Utopia is not worth even glancing at, for it leaves out the one country at which Humanity is always landing. And when Humanity lands there, it looks out, and, seeing a better country, sets sail. Progress is the realization of Utopias.

– Oscar Wilde


Display GRUB entries in a single menu and set last kernel booted as the default selection. Open /etc/default/grub and disable submenu …


… and recall previous kernel …


Save changes. Re-generate GRUB config …

$ sudo grub-mkconfig -o /boot/grub/grub.cfg


Console fonts: Show the current font with showconsolefont. Find fonts in /usr/share/kbd/consolefonts.

Temporarily set font with setfont. With no arguments it resets the default font (default8x16).

Arch Linux: Install Terminus font and set to size 18 …

$ sudo pacman -S terminus-font
$ setfont ter-v18n

Persistenty set FONT variable in /etc/vconsole.conf - used to set the font at boot - for all consoles.

Use the specified font in early userspace by adding the consolefont hook in /etc/mkinitcpio.conf and re-compile …

$ sudo mkinitcpio -p linux



Console output messed up when using urxvt to SSH into remote devices. Temporary fix is to run command on remote terminal …

$ export TERM=xterm-256color

[ Fix! ] Install the appropriate entry into the terminfo database. Arch Linux …

$ sudo pacman -S rxvt-unicode-terminfo



Network connection using wpa_supplicant + wpa_passphrase. Ensure device (example: wlp3s0) is UP …

$ sudo ip link set wlp3s0 up

Note: Because of the process substitution, you cannot run this command with plain sudo …

$ sudo wpa_supplicant -B -i interface -c <(wpa_passphrase MYSSID passphrase)
Successfully initialized wpa_supplicant
Failed to open config file '/dev/fd/63', error: No such file or directory
Failed to read or parse configuration '/dev/fd/63'

[ Fix! ] Run command with a root shell …

$ sudo -s
# wpa_supplicant -B -i interface -c <(wpa_passphrase MYSSID passphrase)

Links: wpa_passphrase and sudo -s


Far and away the best prize that life has to offer is the chance to work hard at work worth doing.

– Theodore Roosevelt


Download and verify the debian buster alpha + firmware iso.

Prepare USB installer. Use dd to write iso to USB stick …

$ sudo dd bs=4M if=path/to/firmware-buster-DI-alpha5-amd64-netinst.iso of=/dev/sdX status=progress oflag=sync


In life our first job is this, to divide and distinguish things into two categories: externals I cannot control, but the choices I make with regard to them I do control. Where will I find good and bad? In me, in my choices.

– Epictetus


No copy-paste functions on a fresh install of Debian Buster using Openbox. Discovered the culprit was the clipit clipboard utility. Killing the process restored copy-paste.

[ Fix! ] Clipit v1.4.3 has a new Purge history after timeout option enabled by default and set to 1 second (!) so … no history. Navigate to Preferences -> History and uncheck the option and everything now OK.

Link: Copy/paste broken


Debian: Command dmesg requires superuser privileges. Modify /etc/sysctl.conf by adding “kernel.dmesg_restrict = 0” to restore unprivileged user access …

kernel.dmesg_restrict = 0

Run sudo sysctl -p to refresh with the new configuration.


Periodic TRIM optimizes performance on SSD storage. Debian Buster: enable a weekly task that discards unused blocks on the drive …

$ sudo systemctl enable fstrim.timer
Created symlink /etc/systemd/system/ → /lib/systemd/system/fstrim.timer.
$ sudo systemctl status fstrim.timer
● fstrim.timer - Discard unused blocks once a week
   Loaded: loaded (/lib/systemd/system/fstrim.timer; enabled; vendor preset: enabled)
   Active: inactive (dead)
  Trigger: n/a
     Docs: man:fstrim


Root account is disabled by default on Ubuntu. To start a root login shell …

$ sudo -i

To enable root, set a password …

$ sudo password root

Disable root account …

$ sudo passwd -dl root

Link: RootSudo


Gnome Terminal: Keyboard shortcut to launch maximized … Open Settings -> Devices - Keyboard Shortcuts and …

  • Disable Launch Terminal

  • Click the bottom ‘+’ to Add custom shortcut with …

Name: Launch terminal maximized
Command: gnome-terminal --window --maximize
Shortcut: Ctrl + Alt + T

Auto-launch maximized terminal on login by opening Startup Applications and add …

Name: Terminal
Command: gnome-terminal --window --maximize
Comment: Launch terminal maximized


Configure tabs for the rxvt-unicode (urxvt) terminal in /usr/lib/x86_64-linux-gnu/urxvt/perl/tabbed. Other options set in ~/.Xresources. I like that I can edit a text file to set options vs database (Mate terminal).


We are what we pretend to be, so we must be careful about what we pretend to be.

– Kurt Vonnegut


Kobo Clara HD has Overdrive capability built-in. To retrieve an ebook that was previously put on hold and is now waiting in my library’s Loans … ensure that wifi is connected and tap the manual sync. Ebook will be added to My Books.


External monitor attached to laptop. Switching workspaces on Ubuntu 18.04 only switches on laptop’s primary display. I want both the primary and secondary display to be treated as a unified workspace, and both displays to change when switching workspaces.

[ Fix! ] Install gnome-tweak-tools and select Workspaces -> Workspaces span displays.

Link: Workspaces only change on primary monitor


Disable hot keys for launching applications in the Ubuntu dock (I make other uses for the key combos) …

$ gsettings set hot-keys false


On the login page for some websites (example: using Firefox 64.0 I cannot input any text in the password field. OS is Ubuntu 18.04.1. I narrowed the problem down to ibus (version 1.5.17). If I temporarily unset the environment variable GTK_IM_MODULE and launch Firefox from the terminal the password field works OK …

$ export GTK_IM_MODULE=""

[ Fix! ] I don’t actually require an input-method framework (only using latin characters and multi-key sequences provided by libx11/XKB). Simplest fix is to disable IM and remove ibus packages.

Edit/create ~/.xprofile

export GTK_IM_MODULE="gtk-im-context-simple"
export QT_IM_MODULE="simple"

… and load the new settings into current xsession …

$ source ~/.xprofile

Remove ibus packages …

$ sudo apt --purge remove ibus ibus-gtk ibus-gtk3 ibus-table

Links: Ubuntu 18.04’s ibus package breaks password fields in Firefox and Understanding & setting up different input methods


Xserver-xorg-input-all does not pull in -input-synaptics as a dependency. Touchpad clicks stopped working on a fresh Debian stretch install on my C720 Chromebook.

[ Fix! ] Install the missing synaptics package …

$ sudo apt install xserver-xorg-input-synaptics

… and confirm I have my desired settings in /etc/X11/xorg.conf.d/50-c720-touchpad.conf.


Create a (2G) file which will be used for swap …

$ sudo fallocate -l 1G /swapfile

Only root should be granted read/write access …

$ sudo chmod 600 /swapfile

Create the swap area and activate …

$ sudo mkswap /swapfile
$ sudo swapon /swapfile

Make the change permanent by adding /swapfile none swap sw 0 0 to /etc/fstab.


One of the great cruelties and great glories of creative work is the wild discrepancy of timelines between vision and execution. When we dream up a project, we invariably underestimate the amount of time and effort required to make it a reality. Rather than a cognitive bug, perhaps this is the supreme coping mechanism of the creative mind — if we could see clearly the toil ahead at the outset of any creative endeavor, we might be too dispirited to begin, too reluctant to gamble between the heroic and the foolish, too paralyzed to walk the long and tenuous tightrope of hope and fear by which any worthwhile destination is reached.

– Maria Popova, A Velocity of Being


Arduino Nano (clone from Elegoo) uses mini-usb connector and CH340 chip instead of arduino FT232

$ dmesg -t
usb 1-1: new full-speed USB device number 31 using xhci_hcd
usb 1-1: New USB device found, idVendor=1a86, idProduct=7523
usb 1-1: New USB device strings: Mfr=0, Product=2, SerialNumber=0
usb 1-1: Product: USB2.0-Serial
ch341 1-1:1.0: ch341-uart converter detected
usb 1-1: ch341-uart converter now attached to ttyUSB0
$ lsusb
Bus 001 Device 031: ID 1a86:7523 QinHeng Electronics HL-340 USB-Serial adapter
$ ls /dev/ttyUSB*
crw-rw---- 1 root dialout 188, 0 Nov 12 16:17 /dev/ttyUSB0
$ lsmod
Module                  Size  Used by
ch341                  16384  0
usbserial              49152  1 ch341

So kernel modules exist and device supported. Problem uploading sketch … even after changing board choice to “nano”.

[ Fix! ] Change processor to atmega 328p (old bootloader). Use these settings under Tools

Board: Arduino Nano
Processor: Atmega 328P (Old bootloader)
Port: /dev/ttyUSB0


I regard consciousness as fundamental. I regard matter as derivative from consciousness. We cannot get behind consciousness. Everything that we talk about, everything that we regard as existing, postulates consciousness.

– Max Planck


Install Flash on Debian Stretch. Download the tarball of latest Adobe Flash Player from and unpack …

$ tar xvf flash_player_npapi_linux.x86_64.tar.gz

Identify location of the browser plugins directory, based on Firefox version:

  • Firefox 52.4.0 (64-Bit) is /usr/lib/mozilla/plugins/
  • Firefox 62+ (64-Bit) is ~/.mozilla/plugins/

For my Firefox 62+ I create the plugins directory and copy files …

$ mkdir ~/.mozilla/plugins
$ cp ~/.mozilla/plugins/
$ sudo cp -r usr/* /usr

Link: Flash on Debian


Until you make the unconscious conscious, it will direct your life and you will call it fate.

– Carl Jung


Mount and access storage on Android phone using the FUSE filesystem utility jmtpfs. Install and create a mountpoint …

$ sudo apt install jmtpfs
$ mkdir -p ~/mnt/phone

Mount phone …

$ jmtpfs ~/mnt/phone/
Device 0 (VID=18d1 and PID=4ee2) is a Google Inc Nexus/Pixel (MTP+ADB).
Android device detected, assigning default bug flags

Unmount …

$ fusermount -u ~/mnt/phone/


The price of anything is the amount of life you exchange for it.

– Henry David Thoreau


Install GRUB on USB storage device - /dev/sdb - with a single VFAT - /dev/sdb1 - partition. Mount partition …

# mount /dev/sdb1 /mnt

Ran into error trying to install GRUB to device …

# grub-install --target=i386-pc --boot-directory=/mnt/boot /dev/sdb
Installing for i386-pc platform.
grub-install: warning: Attempting to install GRUB to a disk with multiple partition labels.  This is not supported yet..
grub-install: warning: Embedding is not possible.  GRUB can only be installed in this setup by using blocklists.  However, blocklists are UNRELIABLE and their use is discouraged..
grub-install: error: will not proceed with blocklists.

[ Fix! ] Note the sector where first partition begins …

# fdisk -l /dev/sdb
Device     Boot Start     End Sectors  Size Id Type
/dev/sdb1        2048 2031615 2029568  991M  c W95 FAT32 (LBA)

Zero out the gap between boot sector and first partition …

# dd if=/dev/zero of=/dev/sdb seek=1 count=2047

Second attempt to install GRUB successful …

# grub-install --target=i386-pc --boot-directory=/mnt/boot /dev/sdb
Installing for i386-pc platform.
Installation finished. No error reported.

Link: grub-install warns embedding not possible


Why should Man expect his prayer for mercy to be heard by what is above him when he shows no mercy to what is under him?

– Pierre Troubetzkoy


Setup a USB stick with a single VFAT-format partition using fdisk

$ sudo fdisk /dev/sdb

Format partition (add label if desired using -n NAME option) …

$ sudo mkfs.vfat /dev/sdb1


Time is the substance I am made of. Time is a river which sweeps me along, but I am the river; it is a tiger which destroys me, but I am the tiger; it is a fire which consumes me, but I am the fire.

– Jorge Luis Borges


Modify ~/.xinitrc and use xset to disable DPMS and turn off screen blanking …

xset s off -dpms

Note, however, that Xscreensaver and xfce4-power-manager use their own DPMS settings and override xset configs.


SSH login to a router acting as a OpenWrt bridged repeater. As per my repeater post, the relevant section and IP address is from step 2 …

option ipaddr ''    # for relayd... requires 192.168.x.x address but not used by clients

So to access the bridged repeater using the above address as the root user …

$ ssh root@

Primary AP upstairs changed SSID and passphrase and bridged AP router lost access (and the flow-through config details for clients).

[ Fix! ] 0. Stop networking service.

1. Assign static ip to ethernet interface …

iface enp0s25 inet static

2. Connect ethernet cable from client to router. Start networking service.

3. Bring up ethernet interface …

$ sudo ifup enp0s25

4. Connect to bridged AP router via SSH …

$ ssh root@


Ignore shellcheck error on a case-by-case basis …

Install_pkgs {
    TOOLS="tool-1 tool-2 tool-3"
    # shellcheck disable=SC2086
    apt-get -y install $TOOLS



Virtualbox guest additions from Oracle: Download the VBoxGuestAdditions_VERSION.iso

$ wget -c

In the GUEST window menu, select Devices > Insert Guest Additions CD image to make the image accessible to the VM. Inside the VM: mount the image; run the install script; add user to the vboxsf group; reboot the VM, and as root …

mount /media/cdrom
sh /media/cdrom/
adduser USERNAME vboxsf

If the virtualbox modules need to be rebuilt for any reason for the running kernel …

$ uname -r | sudo xargs -n1 /usr/lib/dkms/dkms_autoinstaller start


Background colour specified by xsetroot in ~/.config/openbox/autostart was not being set. Turns out that the compositing manager that I use - compton - does not read XSetWindowBackground() used by xsetroot.

[ Fix! ] Compton reads _XROOTPMAP_ID or _XSETROOT_ID. Install hsetroot that uses these properties …

$ sudo apt install hsetroot

Add to autostart

hsetroot -solid "#000000"

Link: Compton incompatible with xsetroot


Network-manager and the nm-applet on Openbox: No prompt for the wireless passphrase when connecting to new access points. Confirmed that dbus, gnome-keyring, and polkit were installed and running …

589 /usr/bin/dbus-daemon --system --address=systemd: --nofork --nopidfile --systemd-activation
13763 /usr/bin/gnome-keyring-daemon --start --components=pkcs11,secrets,ssh
22762 /usr/lib/policykit-1/polkitd --no-debug

Noticed that dunst (lightweight notification daemon) was failing to launch, command notify-send was absent, and this error message was cropping up …

Error connecting: Failed to execute child process "dbus-launch" (No such file or directory)

[ Fix! ] Installing these packages fix the issues with nm-applet and notifications …

$ sudo apt install dbus-x11 libnotify-bin


Openbox: Set default that will match all normal windows and maximize + remove decorations when launched. Leave things like dialog windows or panels untouched. Modify ~/.config/openbox/rc.xml

<application type="normal">

… except for VLC …

<application class="vlc">

Links: Launching windows maximized; Finding parameters


Install the latest Firefox Stable on Debian Stretch.

Create ~/opt directory to store programs in $HOME. Download and unpack the latest binaries from the official website, and create a link to the executable in my PATH …

$ wget -c -O FirefoxSetup.tar.bz2 ""
$ tar xvf FirefoxSetup.tar.bz2 -C ~/opt/
$ sudo ln -s ~/opt/firefox/firefox /usr/local/bin/


After running a minimal Ubuntu install on my laptop with LUKS encryption, the boot process would halt for ~30 seconds then generate this message …

Gave up waiting for suspend/resume device

… followed by a prompt for the passphrase to unlock encrypted home, then continue to login.

[ Fix! ] System is looking for a swap device for suspend-to-disk/hibernate and fails to recognize my encrypted swap. I don’t use hibernate, so I disable the task by adding kernel option noresume.

Modify /etc/default/grub


… and update …

$ sudo update-grub

Link: boot delayed by 30sec waiting for suspend/resume device


The Olympus Mons mountain on Mars is so tall and yet so gently sloped that, were you suited and supplied correctly, ascending it would allow you to walk most of the way to space. Mars has a big, puffy atmosphere, taller than ours, but there’s barely anything to it at that level. 30 Pascals of pressure, which is what we get in an industrial vacuum furnace here on Earth. You may as well be in space. Imagine that. Imagine a world where you could quite literally walk to space.



Logwatch reported multiple attempts directed against the SSH port by a single illegal user trying to gain access to my home server.

SSH listens on a non-standard port, password authentication and root login is disabled already in my default setup. Still, attackers should not be given the chance to keep trying their luck, and I installed fail2ban as another line of defense …

$ sudo apt install fail2ban

Auto-starts with reasonable defaults.


Alzheimer’s disease without cognitive loss: From 1994 through 2011, the Religious Orders Study recruited more than a thousand Catholic nuns, priests and brothers, from across the United States, and collected over 350 brains for autopsy. Participants were drawn from a stable background of similar life experiences, education, and living standards (minimizing variables). Primary goals were to collect brain tissue from donors without dementia, and also from persons on whom clinical information had been collected prior to the onset of dementia.

Researchers were surprised to discover in post-mortem examinations that some of the brains displayed all the symptoms of full-blown Alzheimer’s, but the persons had exhibited no cognitive loss while alive. After studying risk factors, the study suggests that a rich cognitive environment and a positive psychology foster a “cognitive reserve” that the brain can enlist as it routes activity around damaged regions. Conversely, clinical depression showed a strong correlation with cognitive decline.


Once upon a time, I dreamt I was a butterfly, fluttering hither and thither, to all intents and purposes a butterfly. I was conscious only of following my fancies as a butterfly, and was unconscious of my individuality as a man. Suddenly, I awake, and there I lay, myself again. Now I do not know whether I was then a man dreaming I was a butterfly, or whether I am now a butterfly dreaming that I am a man.

– Zhuang Zhou (369-286 BC)


Cameron Mott began experiencing life-threatening seizures at three years old. As her condition deteriorated, doctors chose a radical solution: remove the damaged half of her brain, a procedure known as a hemispherectomy. After intensive rehabilitation, she made a remarkable recovery and is now living the life of a normal teenager. The natural property of neuroplasticity empowered her brain to remap the functions of the removed tissue on to the surviving hemisphere. Not all brain surgeries have such successful outcomes, but what kind of technologies could we develop to augment the brain’s natural abilities to self-heal?


Nothing is so firmly believed as that which we least know.

– Michel Eyquem de Montaigne, Of Divine Ordinances


The Guest House

This being human is a guest house.
Every morning a new arrival.
A joy, a depression, a meanness,
some momentary awareness comes
as an unexpected visitor.
Welcome and entertain them all!
Even if they’re a crowd of sorrows,
who violently sweep your house
empty of its furniture,
still, treat each guest honorably.
He may be clearing you out
for some new delight.
The dark thought, the shame, the malice,
meet them at the door laughing,
and invite them in.
Be grateful for whoever comes,
because each has been sent
as a guide from beyond.

– Rumi, translation by Coleman Barks


On my notes page I wanted to make my headers into anchor links with a small graphic to make it easy to link to a specific section of the page.

This post on Stack Overflow was helpful! Hugo already auto-generates an ID tag on each heading. I create a Hugo shortcode - a partial snippet of code that can be inserted into pages - that generates the header link decorated with the calendar icon from Feather Icons.

Create layouts/shortcodes/note-heading.html with …

{{ $id := .Get 0 | lower | replaceRE "[^0-9a-z]" "-" | replaceRE "-+" "-" -}}
<a href="#{{ $id }}">
    <h3 id="{{ $id }}">{{- partial "svg/icons" "calendar" -}} {{ .Get 0 }}</h3>

Then in my markdown document I use {{< note-heading “A note of interest ” >}} for headers.


Wipe the storage on a iMac G5 PowerPC All-in-one using a Lubuntu 16.04 Live Installer.

Download and write lubuntu-16.04-desktop-powerpc.iso to USB stick …

$ sudo dd bs=1M if=lubuntu-16.04-desktop-powerpc.iso of=/dev/sdX

Start the iMac, pressing the Command+Option+O+F keys to enter OpenFirmware. At the prompt, enter …

boot ud:,\\:tbxi

… and - if it works (it did) - Lubuntu live-installer boots. If not, its necessary to get the proper boot string for the USB stick. Check out Ubuntu PowerPC FAQ for details.

When the Lubuntu desktop appears, open a terminal and overwrite the internal drive (example: /dev/sda) with zeros …

$ sudo dd if=/dev/zero of=/dev/sda bs=1M

Takes approximately 75min per 100G.


What lies behind you and what lies in front of you, pales in comparison to what lies inside of you.

– Ralph Waldo Emerson


Access the ISS HDEV (High Definition Earth Viewing) stream using streamlink and display in VLC.

Streamlink is written in python. Install for user via virtualenv

$ sudo apt install virtualenv
$ virtualenv ~/code/streamlink
$ source ~/code/streamlink/bin/activate
(streamlink) $ pip install streamlink

Stream video …

(streamlink) $ streamlink best
[cli][info] Found matching plugin ustreamtv for URL
[cli][info] Available streams: 252p (worst), 360p, 486p, 720p (best)
[cli][info] Opening stream: 720p (hls)
[cli][info] Starting player: /usr/bin/vlc

Exit virtualenv

(streamlink) $ deactivate

Using streamlink without activating the environment …

$ ~/code/streamlink/bin/streamlink ...

Links: streamlink, the HDEV stream, and the ISS tracker


After assigning foo to a new group vboxusers (Virtualbox) I can reload the user’s group assignments without logging out …

$ sudo adduser foo vboxusers
$ su - $USER

Command id will now list the new group.



Tiny Tiny RSS update script was generating warnings that were being mailed to my admin account …

libpng warning: iCCP: known incorrect sRGB profile

[ Fix! ] Send the errors to null in my crontab …

55 * * * * /usr/bin/php /home/dwa/www/ttrss/update.php --feeds --quiet 2>/dev/null


Steps to verify a Ubuntu installer ISO …

0. Download SHA256SUMS and SHA256SUMS.gpg files from

1. Get the key used for the signature from the Ubuntu key server

$ gpg --keyserver hkp:// --recv-keys "8439 38DF 228D 22F7 B374 2BC0 D94A A3F0 EFE2 1092" "C598 6B4F 1257 FFA8 6632 CBA7 4618 1433 FBB7 5451"
$ gpg --list-keys --with-fingerprint 0xFBB75451 0xEFE21092

2. Verify the signature

$ gpg --verify SHA256SUMS.gpg SHA256SUMS

3. Check the Ubuntu ISO with sha256sum against the downloaded sums

$ sha256sum -c SHA256SUMS 2>&1 | grep OK



Install logwatch (log analyser) on server …

$ sudo apt install logwatch

Config file in /usr/share/logwatch/default.conf/logwatch.conf. Default cronjob in /etc/cron.daily/00logwatch.


We don’t see things as they are; we see them as we are.

– Anaïs Nin


Install Firefox quantum on Debian stable …

$ mkdir -p ~/debian/packages; cd ~/debian/packages
$ wget -c -O firefox-latest.tar.bz2 ""
$ tar -xvf firefox-latest.tar.bz2
$ sudo ln -s ~/debian/packages/firefox/firefox /usr/local/bin/


At any rate, here is a principle that is good and true: Bluntness is good in the design of information devices. Power relationships are unavoidable, but are always more ethical when they are stated clearly.

– Jaron Lanier, Dawn of the New Everything, p195


Successful innovators don’t ask customers and clients to do something different; they ask them to become someone different … Successful innovators ask users to embrace - or at least tolerate - new values, new skills, new behaviours, new vocabulary, new ideas, new expectations, and new aspirations. They transform their customers.

– Michael Schrage, Who Do You Want Your Customers to Become?


Slick Greeter for LightDM. Users can create and modify /etc/lightdm/slick-greeter.conf, settings in this files take priority.

I create a new backgrounds directory and copy over my images …

sudo mkdir /usr/local/share/backgrounds
sudo cp foo.jpg /usr/local/share/backgrounds/

Create /etc/lightdm/slick-greeter.conf

# LightDM GTK+ Configuration



Increase the number of items stored in Places->Recent Documents in Ubuntu MATE.

In dconf editor go to org > mate > mate-menu > plugins > recent > num-recent-docs. Set Use default value to off and enter a Custom value.



Create keyboard shortcut to move a window to next monitor in a dual-display setup. Install …

sudo apt install xdotool wmctrl

Download this ‘move-to-next-monitor’ script, save it to ~/bin, and make it executable …

chmod 755 ~/bin/move-to-next-monitor

In Control Center->Hardware-Keyboard Shortcuts create a custom command and shortcut for the script.

Link: How to move a window to the next monitor


Pulseaudio for Ubuntu MATE. Sound works OK (on Thinkpad E520). Configure volume hotkeys in custom .xbindkeysrc.thinkpad_e520 (@DEFAULT_SINK@ was auto-detected) …

# Volume mute/decrease/increase                      
"pactl set-sink-mute @DEFAULT_SINK@ toggle"          
"pactl set-sink-volume @DEFAULT_SINK@ -5%"           
"pactl set-sink-volume @DEFAULT_SINK@ +5%"           

Load custom file with xbindkeys --file ~/.xbindkeysrc.thinkpad_e520.

If @DEFAULT_SINK@ not auto-detected, set manually. First, by detecting the default output source …

pacmd list-sinks | grep -e 'name:' -e 'index'
  * index: 0                                   
        name: <alsa_output.pci-0000_00_1b.0.analog-stereo>

… then set it as the system wide default, by adding the following to /etc/pulse/

set-default-sink alsa_output.pci-0000_00_1b.0.analog-stereo

Restart pulseaudio with pulseaudio -k (kills and restarts).

Link: Pulseaudio examples


Ubuntu MATE 17.10: Custom start page set in Firefox constantly overwritten and reset back to MATE start page.

[ Fix! ] Edit /usr/lib/firefox/ubuntumate.cfg with my preferred start page.


Ubuntu MATE 17.10: Set custom time format on panel using dconf-editor.

Modify /org/mate/panel/objects/clock/prefs/ format from 24 hours to custom, then modify custom-format to preferred setting, example: %j:%d:%H:%M.

Link: Customize panel date-time


Enable periodic TRIM on SSD drives. Create a weekly TRIM job in /etc/cron.weekly/trim

# trim all mounted file systems which support it
/usr/bin/fstrim --all

Make the file executable and test …

$ sudo chmod 755 /etc/cron.weekly/trim
$ sudo /etc/cron.weekly/trim                # check the program runs without errors
$ sudo run-parts --test /etc/cron.weekly    # checks that cron can run the script
    /etc/cron.weekly/trim                   # this should be output of run-parts

Links: Proper way to trim ssd in void linux and HOWTO configure periodic trim


Crappy font rendering in firefox. [ Fix! ]

$ mkdir ~/.config/fontconfig
$ cp /etc/fonts/fonts.conf ~/.config/fontconfig/fonts.conf

Edit fonts.conf

    Fix crappy font rendering in firefox
    <match target="pattern">
        <test name="family" qual="any">
        <edit name="family" mode="assign" binding="same">

Restart firefox and the jagged helvetica font has been replaced by the default sans-serif … which can be seen by running …

$ fc-match Helvetica
DejaVuSans.ttf: "DejaVu Sans" "Book"



Using a dark desktop theme renders input fields for websites viewed in Firefox with very faint text on white background.

[ Fix! ] Create ~/.mozilla/firefox/xxxxxxxx.default/chrome/userContent.css with …

input:not(.urlbar-input):not(.textbox-input):not(.form-control):not([type='checkbox']):not([type='radio']) {
    -moz-appearance: none !important;
    background-color: white;
    color: black;

#downloads-indicator-counter {
    color: white;

textarea {
    -moz-appearance: none !important;
    background-color: white;
    color: black;

select {
    -moz-appearance: none !important;
    background-color: white;
    color: black;

Link: Unreadable input fields with dark GTK+ themes


Using runit init … To stop an enabled service from starting automatically at boot, create a file named down in the service directory …

sudo touch /etc/sv/*service_name*/down


Act without doing;
work without effort.
Think of the small as large
and the few as many.
Confront the difficult
while it is still easy;
accomplish the great task
by a series of small acts.

The Master never reaches for the great;
thus she achieves greatness.
When she runs into a difficulty,
she stops and gives herself to it.
She doesn’t cling to her own comfort;
thus problems are no problem for her.

– Lao Tzu, Tao Te Ching, Ch 63


Pulseaudio for Arch Linux … set default sink.

Set the default output source …

$ pacmd list-sinks | grep -e 'name:' -e 'index'
  * index: 0                                   
        name: <alsa_output.pci-0000_00_1b.0.analog-stereo>

To set it as the system wide default, add the following to /etc/pulse/

set-default-sink alsa_output.pci-0000_00_1b.0.analog-stereo

Restart pulseaudio with pulseaudio -k (kills and restarts).

The default sink can be referred as @DEFAULT_SINK@ in commands, for example …

pactl set-sink-volume @DEFAULT_SINK@ +5%


Since the late 1980s, scientists have been tracking a whale who sings at a sonic frequency higher than any other whale of its species: at 52 hertz, just above the lowest note on a tuba. It sings songs no one answers. Internet societies have been following it for years like sad Ahabs, transposing their own feelings on to it, believing they understand it. Alone in their bedrooms they hunt this whale they believe to be lonely just like them. Talk to scientists and they will say other whales can probably hear it, maybe it’s deaf, maybe the whale’s song is the result of a genetic mutation. But it doesn’t matter: the lonely people have taken this whale as their totem. I’ve followed it for years.



Extend an LVM logical volume and filesystem: the quick and automatic way … If you are growing the LV you can do this while the filesystem is mounted …

sudo lvresize --resizefs --size +100G /dev/vg/home
    Size of logical volume vg/home changed from 238.42 GiB (61035 extents) to 338.42 GiB (86635 extents).
    Logical volume vg/home successfully resized.
    resize2fs 1.43.4 (31-Jan-2017)
    Filesystem at /dev/mapper/vg-home is mounted on /home; on-line resizing required
    old_desc_blocks = 30, new_desc_blocks = 43
    The filesystem on /dev/mapper/vg-home is now 88714240 (4k) blocks long.



Disable system beep on a Thinkpad …

sudo rmmod pcspkr

Permanently … edit /etc/inputrc to disable in console …

set bell-style none

… add to.xinitrc

xset b off

NOTE: this did not work … adding blacklist pcspkr to (add/create) /etc/modprobe.d/blacklist.


Fresh install of Tiny Tiny RSS allows a single URL path to be set. I want multiple URLs to support both local and remote access.

[ Fix! ] Disable URL checks by adding to config.php

define('_SKIP_SELF_URL_PATH_CHECKS', true);

Link: Access by local + domain IP


Enable forward search in Bash history. CTRL-R enables reverse incremental searches through the Bash shell history and CTRL-S runs forward searches. However CTRL-S collides with XON/XOFF flow control in terminal and disables that feature in history.

[ Fix! ] Disable XON/XOFF in $HOME/.bashrc

stty -ixon

Hitting CTRL-S by mistake in vim no longer disables output to the terminal.

Link: Unable to forward search Bash history similarly as with CTRL-r


A simple GIMP recipe for play at making 8-bit pixel images:

  • Open image and select Colors > Brightness-Contrast > Contrast to increase contrast
  • Image > Scale Image > 10% Interpolation: None
  • Image > Scale Image > 400% Interpolation: None

Manipulate the scale image settings to increase/decrease pixelation to satisfaction.


Linuxlogo provides Tux, the Debian swirl, and other distro logos that can be displayed - along with system information - at the console login prompt …

sudo apt-get install linuxlogo
sudo cp /etc/issue /etc/issue.bak
sudo sh -c 'linux_logo -L debian -F ".: Greetings, Carbon-Based Biped :.\n\n#O Version #V\nCompiled #C\n#H \\l" > /etc/issue'


Correct the ‘stripping effect’ in QT applications using the Breeze Dark theme. Example: Transmission-qt would show file listings in alternating background colours, with every other line rendered in light background and foreground colours.

[ Fix! ] Offending colour is #eff0f1. Replaced with #404552 in ~/.config/qt5ct/colors/breeze_dark.conf.


Retrieving Debian release information (depending on what I want) …

  • /etc/debian_version
  • /etc/os-release
  • lsb_release -c


Assign user to new group and reload assignments without logging out …

su - $USER
id        # see the new group



Nmap will quickly identify Internet services hosted by a network connected machine without even requiring to log in to it. Simply call the following command on another machine connected to the same network …


Link: DAH: Network and Processes


Use apt-show-versions to check list of installed packages and available versions. Good way to quickly grep which packages are not part of the default release.

Install …

sudo apt install apt-show-versions

Release is stretch

apt-show-versions | grep -v stretch
  qt5ct:amd64 0.31-2 installed: No available version in archive
  volnoti:amd64 20161215T1244-1 installed: No available version in archive


Configure i3wm to put clients on specific workspaces. Run xprop in a terminal and click on the client to get WM_CLASS: first part is the instance, second part is the class

  WM_CLASS(STRING) = "transmission-qt", "transmission"

Add the change to ~/.config/i3/config

# Assign torrent client to workspace 10
assign [instance="transmission-qt"] 10

Link: Automatically putting clients on specific workspaces


Addon for Firefox: Text Contrast for Dark Themes

Fixs issue with text entry on some websites (white text on white in gmail signin, yahoo search, others) when using the Breeze Dark QT theme.


Find and replace text with sed.

Save back to the original file …

sed -i 's/original/new/g' file.txt

Save to new_file.txt …

sed 's/original/new/g' file.txt > new_file.txt

Multiple text patterns and variables …

sed "s/$original/$new/g; s/$pattern2/$new_again/g" file.txt > new_file.txt



Lots of documentation and config samples are available in /usr/share/doc in gzip’ed format. Non-root user access with the zcat and zless commands. Make use of a config sample by redirecting output. Example …

zcat /usr/share/doc/dunst/dunstrc.example.gz > ~/.config/dunst/dunstrc


Default keyboard layout in Debian is configured in /etc/default/keyboard and is shared between X and the command line …

cat /etc/default/keyboard

Modify this file to set a new default keyboard layout, either manually or run …

sudo dpkg-reconfigure keyboard-configuration


Limit the CPU usage of an application … I tried using handbrake-gtk to convert a video and the application grabbed 100% of all 4 cores, sent system temperature to 98C, and finally crashed the machine.

[ Fix! ] Install cpulimit and set the limit to 80 (20percent * 4 cores) …

sudo cpulimit -e ghb -l 80


Firework sounds for upcoming Canada Day!

sudo apt install sox

Screamer …

play -n synth sine 8000 bend 0.5,-1800,5 flanger 0 3 0 20 10 tri 20 quad trim 0 7

Bottle rocket …

play -n synth whitenoise 200 fade 0.2 1 1 trim 0 0.5 ; sleep 1 ; play -n synth whitenoise 200 fade 0 1 1 trim 0 1

Links: and


Retrieve information about hardware using sudo dmidecode, or much of the same information is available to the non-root user in /sys/devices/virtual/dmi/id.



Switch from default qwerty to the colemak keyboard layout …

setxkbmap -query
  rules:      evdev
  model:      pc105
  layout:     us
setxkbmap us -variant colemak
setxkbmap -query
  rules:      evdev
  model:      pc105
  layout:     us
  variant:    colemak


Generate list of packages installed on one machine running Debian for installation on another machine.

List of packages on first machine …

sudo dpkg --get-selections | grep -v deinstall > deb-pkg-list.txt

Install packages on the second machine …

sudo apt install dselect
sudo dselect update    # update dselect database
sudo dpkg --set-selections < deb-pkg-list.txt
sudo apt dselect-upgrade


VLC not playing mkv files on the chromebook. Generates error message …

libvdpau-va-gl: Decoder::Render_h264(): no surfaces left in buffer

[ Fix! ] In VLC navigated to Tools->Preferences->Input/Codecs and for Hardware-accelerated decoding switched to VA-API video decoder via x11 instead of using VDPAU. Or set avcodec-hw=vaapi_x11 in ~/.config/vlc/vlcrc.



Clearing the shell cache … I originally installed glances via apt to /usr/bin/glances, then removed, then installed via pip to /usr/local/bin/glances. The command would show in PATH but - without an explicit path defined - would continue to try and execute from /usr/bin.

[ Fix! ] Bash caches commands. Clear the cache of paths to executables using hash

type glances
  glances is hashed (/usr/bin/glances)
hash -d glances
type glances
  glances is /usr/local/bin/glances


Configure menu colours in Grub by creating /boot/grub/custom.cfg with settings …

set color_normal=white/black
set menu_color_normal=white/black
set menu_color_highlight=white/green


Stop pulseaudio from respawning after halt (encountered in Ubuntu 16.04) … When I kill pulseaudio with pulseaudio -k or kill -9 ID it immediately restarts …

pgrep pulse
  12808 /usr/bin/pulseaudio --start --log-target=syslog

[ Fix! ] There is a config file /etc/pulse/client.conf with autospawn = yes set by default. I could modify that, but chose instead to create ~/.config/pulse/client.conf and set autospawn = no. It works … pulseaudio stays dead.


Start a new project in Git and host on Github (after setting up a default config in ~/.gitconfig) …

mkdir new_project
cd new_project
touch .gitignore
touch README.rst      # rst will allow github to auto-detect and configure as a project homepage
git init
git add README.rst    #... or 'git add .' to add all files recursively
git status
git commit -a -m 'first commit'   # '-a' option auto-adds all files being tracked and commits them
git log               # to view commit history

Connect with Github …

git remote add origin  # connect my local repo to github for first time
git remote -v  # confirm local knows about remote
git push -u origin master

… and to pull in (download) changes from Github master …

git pull origin master


Stop pinned tabs from auto-loading upon Firefox startup. Goto about:config and set to true

* browser.sessionstore.restore_pinned_tabs_on_demand    default boolean false


Debian stretch/stable xbacklight is acting up …

xbacklight -dec 10
  No outputs have backlight property

I can write to the file directly to increase/decreae display brightness …

cat /sys/class/backlight/intel_backlight/max_brightness 
sudo sh -c 'echo 500 > /sys/class/backlight/intel_backlight/brightness'
sudo sh -c 'echo 937 > /sys/class/backlight/intel_backlight/brightness'

… or use xrandr

xrandr --output eDP-1 --brightness 0.5

This is a known issue.

[ Fix! ] Roll-back from xserver-xorg-core to xserver-xorg-video-intel.

Create /etc/X11/xorg.conf.d/10-video-intel.conf containing …

Section "Device"
    Identifier "Intel"
	Driver "intel"


Trying to install Debian’s flashplugin-nonfree package consistently fails with the error ….

ERROR: wget failed to download

[ Fix! ] Manual install works courtesy of the instructions at


Setup colour scheme for vim. As per Giles recommendation I use tir_black. Place in ~/.vim/colors.

Set as default colour scheme in init.vim

colorscheme tir_black

Colour scheme works when neovim runs in terminal. Does not work inside tmux. Tmux is not seeing the 256 color palette …

tput colors

[ Fix! ] Add to ~/.tmux.conf

set -g default-terminal "rxvt-unicode-256color"

Note: Kill all existing tmux sessions. It is not enough simply to start a fresh session. Helpful!

Launch a new tmux session. Neovim colours work OK!

echo $TERM
tput colors


Created a Debian stretch virtualbox guest but virtualbox-guest-{dkms,utils,x11} packages no longer available … but there are pkgs in sid.

[ Fix! ] Install the sid pkgs. Setup apt-pinning in /etc/apt/preferences

Package: *
Pin: release n=stretch
Pin-Priority: 900

Package: *
Pin: release a=unstable
Pin-Priority: 300

Add unstable to sources.list

deb unstable main contrib non-free

Update and install …

sudo apt -t unstable install virtualbox-guest-dkms virtualbox-guest-utils virtualbox-guest-x11
sudo adduser dwa vboxsf


Local install of Python modules as non-root user. Example …

pip3 install exifread

… libraries are installed to ~/.local/lib/python-ver/ and the bins are placed in ~/.local/bin/.

Add ~/.local/bin to user’s $PATH.


If SSH session is frozen … Use the key-combo Enter, Shift + `, . [Enter, Tilde, Period] to drop the connection.


Microphone problem on Thinkpad x230 running Ubuntu 16.04 … No sound input and mic not detected.

[ Fix! ] Get capture device …

arecord -l                                                                         
  card 0: ... device 0: ...                                                            

… and edit /etc/pulse/ with load-module module-alsa-source device=hw:0,0.

Kill and respawn pulseaudio with pulseaudio -k.


Restart network service on Ubuntu … Sometimes after wake-from-suspend the network connection is down and network-manager’s wifi ap list fails to refresh.

[ Fix! ] Simple systemd way …

sudo systemctl restart NetworkManager.service                             

If that doesn’t work … Try using nmcli to stop and start network-manager directly …

sudo nmcli networking off                                                 
sudo nmcli networking on                                                  

Old-fashioned SysV init script method still works on 16.04 …

sudo /etc/init.d/networking restart                                       
    ... or ...                                                              
sudo /etc/init.d/network-manager restart                                  

Last resort …

sudo ifdown -a  # -a brings down all interfaces                           
sudo ifup -a


Attaching to a wifi network with nmcli (network-manager cli client) …

nmcli radio
nmcli device
nmcli device wifi rescan
nmcli device wifi connect SSID-Name password PASS


Disable Pelican from auto-generating archives.html by adding to


From URL Settings: “If you do not want one or more of the default pages to be created … set the corresponding *_SAVE_AS setting to “ to prevent the relevant page from being generated.”