Skip to Content



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 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.”