Gtkwave notes

General Gtkwave is a simple and convenient viewer of electronic waveforms. It’s a free software tool at its best: A bit rough to start working with, but after a while it becomes clear that the decisions have been made by someone who uses the tool himself. Really recommended. So here are my jumpstart notes for [...]

gcc: Solving “undefined reference” even when the required library is listed with -l

It worked all so nicely on my Fedora 12 machine, and then on Ubuntu 14.04.1 it failed colossally: $ make gcc -Wall  -O3 -g -lusb-1.0 -c  -o bulkread.o bulkread.c gcc -Wall  -O3 -g -lusb-1.0 -c  -o usberrors.o usberrors.c gcc -Wall  -O3 -g -lusb-1.0 bulkread.o usberrors.o -o bulkread bulkread.o: In function `main’: bulkread.c:39: undefined reference to [...]

XEmacs / VHDL: Stop that annoying “assistance” while typing

Emacs’ (and hence XEmacs’) VHDL mode has an annoying thing about hopping in and “help me” with composing code. Type “if” and it tells me I need to add an expression. Thanks. I wouldn’t have figured it out myself. So here’s how to disable this annoyance: Add in~/.xemacs/custom.el, to the custom-set-variables clause ‘(vhdl-electric-mode nil) ‘(vhdl-stutter-mode [...]

Linux: How to read through all files (checking a backup)

After finishing a backup to a USB stick, I like to verify that all is in place by reading through all files. Using the “tar” utility with verbose file output seemed to be a good idea. But… Don’t $ tar -cv . > /dev/null For whatever reason, the files aren’t really read. Only the names [...]

bash: Jots on exiting the script

Trapping Call a function (byebye in this case) just before exiting a script: trap byebye exit Or a command: trap ‘echo “Farewell cruel world!”‘ exit It’s possible to catch various signals with “trap” as well. Quit on error In short: Have a set -e at the beginning of the script. It’s a global on-off feature, [...]

overlayroot (and permission issues) on Linux Mint 18.1

Introduction Wanting my media center computer to maintain consistent behavior and be tolerant to sudden power outages, I looked for a way to have the root filesystem read-only. This can cause problems with programs that expect to write to all kind of files allover, and media related software has this tendency to break when things [...]

Wallpaper / desktop background + other stuff on Linux Mint 18.1 / Cinnamon

Desktop wallpaper setting Get the current one: $ gsettings get org.cinnamon.desktop.background picture-uri ‘file:///usr/share/backgrounds/linuxmint/default_background.jpg’ And set it to another: $ gsettings set org.cinnamon.desktop.background picture-uri ‘file:///usr/share/backgrounds/linuxmint/edesigner_linuxmint.png’ Notes: The “file://” prefix is mandatory. There also an org.gnome.desktop.background attribute. Apparently, org.cinnamon.desktop.background overrides the former. For an effect on the screen, the “set” command must be run on the active [...]

Linux Mint 18.1 + i915: Updating the Intel Graphics stack

Running Linux Mint 18.1 (kernel 4.4.0-53) on a Gigabyte Brix BACE-3160 (with an i915 graphics controller) , I had all kind of minor graphics artifacts (in particular a sluggish mouse pointer and Kodi felt heavy). So obviously, I went for updating the graphics stack. Intel supplies an tool for doing this automagically on a selected [...]

Script for fixing a lot of git tags

I needed to update a lot of releases, each designated by a tag, with a single fix, which took the form of a commit. This commit was marked with the tag “this”. #!/bin/bash for i in $(git tag | grep 2.0) ; do git checkout $i git cherry-pick this git tag -d $i git tag [...]

My golden Makefiles for compiling C programs

Single-source utilities This is the Makefile I use for compiling a lot of simple utility programs, one .c file per utility: CC=    gcc FLAGS=  -Wall -O3 -g ALL=    broadclient broadserver multicastclient multicastserver all:    $(ALL) clean: rm -f $(ALL) rm -f `find . -name “*~”` %:    %.c Makefile $(CC) $< -o $@ $(FLAGS) The ALL variable [...]