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.

terminator: change its window size

terminator --geometry 2400x650+100+1200

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 ""
'';
}

Thursday, March 26, 2026

Friday, March 20, 2026

void linux with docker: distrobox hangs when a container with --init and systemd is created.

Distrobox lets you run any Linux distribution as a container and integrate it into your host system. But if your host is Void Linux, getting a systemd-based box like Arch to boot correctly takes a bit of extra work.

The problem

Void uses runit as its init system, not systemd. When you create a distrobox with --init and ask for a systemd container, it will hang forever printing:

waiting for systemd to come up...
waiting for systemd to come up...
waiting for systemd to come up...

Even after fixing the cgroup setup (which also requires attention on a non-systemd host), systemd inside the container will fail on several units that try to mount kernel filesystems — things like binfmt_misc, hugepages, and sys-kernel-debug. These units make no sense inside a container and will block the boot sequence.

The fix

The solution is to mask those units at creation time, before systemd ever tries to start them. The --init-hooks flag runs a shell command during container setup, so we can pre-create the /dev/null symlinks that systemctl mask would normally create:

distrobox create -i archlinux -n abox -H ~/home-abox --init --additional-packages "systemd" --additional-flags "--privileged" --init-hooks "mkdir -p /etc/systemd/system && for u in proc-sys-fs-binfmt_misc.automount proc-sys-fs-binfmt_misc.mount sys-kernel-debug.mount sys-kernel-tracing.mount dev-hugepages.mount systemd-firstboot.service systemd-udevd.service; do ln -sf /dev/null /etc/systemd/system/\$u; done"

The --privileged flag gives systemd the capabilities it needs to manage its own cgroup namespace. The hook symlinks all the container-hostile units to /dev/null, which is exactly what masking does — just without needing systemctl to be running yet.

Why symlinks instead of systemctl? At hook execution time systemd hasn't started yet, so systemctl mask may not work reliably. Writing symlinks directly achieves the same result and works unconditionally.

Result

After running this command, distrobox enter abox will boot straight through into a fully working Arch Linux shell with a live systemd instance — on a Void Linux host running runit.

Posted March 2026

Tuesday, March 17, 2026

Void Linux: "/" is not a shared mount, this could cause issues or missing mounts with rootless containers

When running distrobox with podman:
"/" is not a shared mount, this could cause issues or missing mounts with rootless containers Just add mount --make-rshared / to your /etc/rc.local

Void Linux, podman and distrobox: unable to apply cgroup configuration

Error: unable to start container "0a58490ca8d4b9cf464483b8a776e53616ebfc60cc89aa25e60b0d910d907eb2": runc: runc create failed: unable to start container process: unable to apply cgroup configuration: rootless needs no limits + no cgrouppath when no permission is granted for cgroups: mkdir /sys/fs/cgroup/0a58490ca8d4b9cf464483b8a776e53616ebfc60cc89aa25e60b0d910d907eb2: permission denied: OCI permission denied
Create ~/.config/containers/containers.conf: [containers]
cgroupns = "host"


[engine]
cgroup_manager = "cgroupfs"
runtime = "crun"

sudo xbps-install -S crun

Remove the container, and install it again, e.g.: distrobox stop abox
distrobox rm abox
podman system reset
distrobox create -i archlinux -n abox -H ~/home-abox
distrobox-enter abox