emerge --ask app-emulation/virtiofsd
Short IT recipes
i.e. some stuff and junk about Python, Perl, Matlab, Ruby, Mac X, Linux, Solaris, ...
Friday, April 10, 2026
Thursday, April 09, 2026
tigervnc with fluxbox example setup
session=startfluxbox
securitytypes=none
geometry=2000x1200
localhost
alwaysshared
Gentoo install app-arch/ rar - license
ACCEPT_LICENSE="*"
Monday, April 06, 2026
gentoo: list recently updated packages
sudo genlop -u
Tuesday, March 31, 2026
distrobox: create archlinux container with automatic yay installation
distrobox create -i archlinux -n abox -H ~/home-abox && distrobox enter abox -- bash -c "sudo pacman -Sy --noconfirm git base-devel && git clone https://aur.archlinux.org/yay-bin.git /tmp/yay-bin && cd /tmp/yay-bin && makepkg -si --noconfirm && rm -rf /tmp/yay-bin"
Saturday, March 28, 2026
distrobox: start krusader with dark them from host
/run/current-system/sw/bin/distrobox-enter -n abox -- bash -c 'env GTK_THEME=Adwaita:dark ICON_THEME=Papirus QT_QPA_PLATFORMTHEME=qt6ct krusader -qwindowtitle %c %u'
Fixing KDE App Theming in Distrobox on XFCE
If you run a KDE application (like Krusader) inside a Distrobox container on an XFCE host with a dark theme, you might notice that the icons are dark and nearly invisible against the dark background. This happens because the app inherits a mismatched icon theme from the host, and no Qt platform theme manager is configured inside the container.
The Fix
First, enter your container and install the required packages:
distrobox enter abox
sudo pacman -S papirus-icon-theme qt6ct
Note: check whether your KDE app links against Qt5 or Qt6 before choosing between qt5ct and qt6ct:
ldd $(which krusader) | grep -i qt
Next, tell Qt to use qt6ct as the platform theme. In fish shell, set it as a universal variable so it persists across sessions:
set -Ux QT_QPA_PLATFORMTHEME qt6ct
Then configure the theme and icons by editing the qt6ct config directly:
mkdir -p ~/.config/qt6ct
cat > ~/.config/qt6ct/qt6ct.conf << 'EOF'
[Appearance]
icon_theme=Papirus-Dark
style=Breeze
EOF
Finally, set up kdeglobals so KDE apps pick up the correct color scheme and icon theme:
cat > ~/.config/kdeglobals << 'EOF'
[General]
ColorScheme=BreezeDark
[KDE]
widgetStyle=Breeze
[Icons]
Theme=Papirus-Dark
EOF
Open a fresh container session and launch your KDE app — the icons and theme should now render correctly.
volid linux: install hplip and enable cupsd
sudo xbps-install -S hplip
sudo ln -s /etc/sv/cupsd /var/service
sudo sv status cupsd
Friday, March 27, 2026
shell.nix for golang programming with vscodium
If you use Nix and want a reproducible Go development environment with VSCodium as your editor, a shell.nix file is the cleanest way to get there. The configuration below sets up a full Go toolchain — including the gopls language server, the delve debugger, linters, and code-generation utilities — alongside VSCodium pre-loaded with the official Go extension, GitLens, error highlighting, and a REST client. CGO is enabled together with gcc and sqlite, so packages like go-sqlite3 that rely on C bindings compile without issues. A step-by-step status log is printed during initialisation so you always know what the shell is doing while it loads. All dependencies are pinned to your nixpkgs channel, so every team member or machine gets an identical environment simply by running nix-shell. Once inside the shell, open your project with codium . and everything is ready to go.
{ pkgs ? import <nixpkgs> {
# Required to allow extensions with non-free licenses (e.g. gitlens)
config.allowUnfree = true;
}
}:
let
vscodiumWithExtensions = pkgs.vscode-with-extensions.override {
vscode = pkgs.vscodium;
vscodeExtensions = with pkgs.vscode-extensions; [
# Go language support (official Go team extension)
golang.go
# Git integration
# Note: mhutchie.git-graph is unfree and has been intentionally removed.
# Use VSCodium's built-in git view or install git-graph manually.
eamodio.gitlens
# General productivity
streetsidesoftware.code-spell-checker
usernamehw.errorlens
# REST client for API testing
humao.rest-client
];
};
in pkgs.mkShell {
name = "golang-dev";
buildInputs = [
# ── Go toolchain ──────────────────────────────────────────────────────────
pkgs.go # Go compiler & standard tooling (go build, go test…)
pkgs.gopls # Official Go language server (used by the extension)
pkgs.delve # Go debugger
pkgs.gotools # Extra tools: goimports, godoc, etc.
pkgs.golangci-lint # Fast, multi-linter runner
pkgs.gomodifytags # Struct tag editor (used by vscode-go)
pkgs.gotests # Auto-generate table-driven tests
pkgs.impl # Generate method stubs for interfaces
pkgs.go-outline # JSON representation of Go file outline
pkgs.gotestsum # Prettier `go test` output
# ── Editor ────────────────────────────────────────────────────────────────
vscodiumWithExtensions
# ── C toolchain (required for CGO / go-sqlite3) ───────────────────────────
pkgs.gcc
pkgs.sqlite
# ── Shell / system utilities ──────────────────────────────────────────────
pkgs.git
pkgs.curl
pkgs.jq # Handy for JSON output while developing APIs
];
# ── Environment variables ─────────────────────────────────────────────────
shellHook = ''
echo ""
echo "● Initialising golang-dev shell…"
echo ""
# ── Environment ───────────────────────────────────────────────────────────
echo " [1/4] Setting up environment variables…"
export GOPATH="$HOME/go"
export PATH="$GOPATH/bin:$PATH"
export GOTELEMETRY=off
export CGO_ENABLED=1
echo " GOPATH=$GOPATH"
echo " CGO_ENABLED=$CGO_ENABLED (sqlite3 / cgo support)"
echo " GOTELEMETRY=$GOTELEMETRY"
# ── Go toolchain ──────────────────────────────────────────────────────────
echo ""
echo " [2/4] Verifying Go toolchain…"
echo " go $(go version 2>/dev/null | awk '{print $3, $4}')"
echo " gopls $(gopls version 2>/dev/null | head -1 || echo 'not found')"
echo " delve $(dlv version 2>/dev/null | head -1 || echo 'not found')"
echo " golangci $(golangci-lint --version 2>/dev/null | head -1 || echo 'not found')"
echo " gcc $(gcc --version 2>/dev/null | head -1 || echo 'not found')"
echo " sqlite3 $(sqlite3 --version 2>/dev/null | head -1 || echo 'not found')"
# ── GOPATH bin ────────────────────────────────────────────────────────────
echo ""
echo " [3/4] Checking GOPATH bin directory…"
if [ -d "$GOPATH/bin" ]; then
BIN_COUNT=$(ls "$GOPATH/bin" 2>/dev/null | wc -l | tr -d ' ')
echo " $GOPATH/bin ($BIN_COUNT tools installed)"
else
mkdir -p "$GOPATH/bin"
echo " $GOPATH/bin created (empty — tools will appear after go install)"
fi
# ── Editor ────────────────────────────────────────────────────────────────
echo ""
echo " [4/4] Checking VSCodium…"
if command -v codium &>/dev/null; then
echo " $(codium --version 2>/dev/null | head -1 | sed 's/^/codium /')"
else
echo " codium not found in PATH"
fi
# ── Ready ─────────────────────────────────────────────────────────────────
echo ""
echo "┌─────────────────────────────────────────┐"
echo "│ golang-dev shell ready ✓ │"
echo "│ │"
echo "│ Run 'codium .' to open VSCodium │"
echo "└─────────────────────────────────────────┘"
echo ""
'';
}