yay kde-cli-tools
i.e. some stuff and junk about Python, Perl, Matlab, Ruby, Mac X, Linux, Solaris, ...
Saturday, May 09, 2026
gwenview: Does not start due to setting rendering to OpenGL
rm ~/.config/gwenviewrc
distrobox: Opening Images in Native GIMP from IrfanView Running Under Wine in Distrobox
Two things needed fixing before GIMP would even start. First, GIMP's sandboxed image loader (glycin) uses bubblewrap, which cannot create user namespaces inside a container — fixed with GLYCIN_DISABLE_SANDBOX=1. Second, any process launched from the script died the moment the script exited, because Wine kills all child processes when its own child (the Python script) returns.
Even after solving those, GIMP crashed every time it tried to open a file, with a GTK3 assertion failure inside GtkFileChooserWidget. The same command worked perfectly from the shell. The environment variables were identical. The difference turned out to be invisible to env: Wine installs a seccomp filter on its processes, and that filter is inherited by every child process across fork and exec. No amount of environment tweaking or session detachment can clear an inherited seccomp filter. GTK's file chooser widget makes a syscall during initialisation that Wine's filter blocks, and GIMP crashes.
The fix is to launch GIMP as a transient systemd user service with systemd-run --user --no-block. A process started this way is owned by systemd, not Wine — clean process state, no inherited seccomp filter, completely outside Wine's process tree.
#!/usr/bin/python
import os, sys, subprocess
def convert_wine_path(p):
return p.replace('\\', '/').replace('Z:', '')
env = os.environ.copy()
img_file = convert_wine_path(sys.argv[1]) if len(sys.argv) == 2 else None
cmd = [
'systemd-run', '--user', '--no-block',
'--setenv=GLYCIN_DISABLE_SANDBOX=1',
f'--setenv=DISPLAY={env["DISPLAY"]}',
f'--setenv=HOME={env["HOME"]}',
f'--setenv=XDG_RUNTIME_DIR={env["XDG_RUNTIME_DIR"]}',
'/usr/bin/gimp'
]
if img_file:
cmd.append(img_file)
subprocess.run(cmd)
Save it somewhere on your Linux filesystem, point IrfanView's external editor to the Z: path equivalent, and it works. The same trick applies to any native Linux app you need to launch cleanly from within Wine.
Friday, May 08, 2026
gentoo: There was an error during CUPS operation: "No such file or directory".
emerge --ask net-print/cups-filters
End then
systemctl restart cups
gentoo and distrobox: OCI runtime exec failed: exec failed: unable to start container process: error starting setns process: exec: already started
distrobox create --nvidia -i archlinux -n abox -H ~/home-abox --init --additional-packages "systemd"
I was getting:
OCI runtime exec failed: exec failed: unable to start container process: error starting setns process: exec: already started
The solution was to use crun container runtime, instead of default runc. To do this
1. Install crun:
emerge -av app-containers/crun
2. Create `/etc/docker/daemon.json` with the content:
{
"runtimes": {
"crun": {
"path": "/usr/bin/crun"
}
},
"default-runtime": "crun"
}
3. Restart docker
sudo systemctl restart docker
Thursday, May 07, 2026
bedrock linux: share getnoo's /etc/portage with stratas
Add portage to [global] in /bedrock/etc/bedrock.conf:
etc = adjtime, crypttab, default/grub, fstab, group, group+, group-, group.OLD, group.org, gshadow, gshadow+, gshadow-, gshadow.OLD, gshadow.org, hostname, hosts, login.defs, machine-id, modprobe.d/blacklist.conf, passwd, passwd+, passwd-, passwd.OLD, passwd.org, rc.local, resolv.conf, resolvconf/run, shadow, shadow+, shadow-, shadow.OLD, shadow.org, sudoers, portage
Then
sudo brl apply
Tuesday, May 05, 2026
librewolf: dissable adding application for mailto links
about:config
Set:
network.protocol-handler.external.mailto
to false.
xterm: set font size
! Use a truetype font and size.
xterm*faceName: Monospace
xterm*faceSize: 14
Run the following to take effect:
xrdb -merge ~/.Xresources
From: https://askubuntu.com/a/1138738
Monday, May 04, 2026
gentoo: example make.use
# These settings were set by the catalyst build script that automatically
# built this stage.
# Please consult /usr/share/portage/config/make.conf.example for a more
# detailed example.
COMMON_FLAGS="-O2 -pipe -march=native"
CFLAGS="${COMMON_FLAGS}"
CXXFLAGS="${COMMON_FLAGS}"
FCFLAGS="${COMMON_FLAGS}"
FFLAGS="${COMMON_FLAGS}"
# NOTE: This stage was built with the bindist USE flag enabled
# This sets the language of build output to English.
# Please keep this setting intact when reporting bugs.
LC_MESSAGES=C.UTF-8
RUSTFLAGS="${RUSTFLAGS} -C target-cpu=native"
MAKEOPTS="-j4 -l5"
USE="dist-kernel"
# Appending getbinpkg to the list of values within the FEATURES variable
FEATURES="${FEATURES} getbinpkg"
# Require signatures
FEATURES="${FEATURES} binpkg-request-signature"
ACCEPT_LICENSE="*"
EMERGE_DEFAULT_OPTS="--binpkg-respect-use=n"
gentoo: set --binpkg-respect-use in make.use
EMERGE_DEFAULT_OPTS="--binpkg-respect-use=n
Sunday, May 03, 2026
gnome-boxes from flatpak: file selection window does not show
create ~/.config/xdg-desktop-portal/portals.conf:
[preferred]
default=gtk
org.freedesktop.impl.portal.FileChooser=gtk
Friday, May 01, 2026
Open WebUI: Add your OpenCode Go subscription
https://opencode.ai/zen/go/v1
and then your OpenCode Go API keyhttps://i.imgur.com/KU4yEsj.png
Saturday, April 25, 2026
Qwen-Code: Ollama Ignores num_ctx from settings.json
Why It Happens
Ollama's /v1 OpenAI-compatible layer only forwards standard OpenAI parameters. Native Ollama options like num_ctx need to be passed inside an options: {} object in the raw request body. Most OpenAI-compatible clients don't do this, so the parameter is quietly dropped and Ollama falls back to the model's default context size.
The Fix
Bake num_ctx directly into the model via a custom Modelfile. This sidesteps the client entirely.
1. Export the existing Modelfile:
ollama show qwen3.6:27b --modelfile > qwen_custom.Modelfile
2. Add or update the num_ctx parameter in the file:
PARAMETER num_ctx 262144
3. Create a new model from it:
ollama create qwen3.6-256k -f qwen_custom.Modelfile
4. Update your client config to point to the new model name, then verify:
ollama ps
The context size shown in ollama ps should now reflect 262144 instead of 32768.
LibreWolf: Claude.ai freezes
LibreWolf's Resist Fingerprinting (RFP) deliberately reduces Date.now() precision. This can make consecutive calls return the same value. Claude's frontend assumes time always moves forward — when the delta is zero, it loops forever and the tab freezes.
Create ~/.config/librewolf/librewolf/librewolf.overrides.cfg with the content:
defaultPref("privacy.resistFingerprinting", false);
gentoo: mask the use of new nvidia drivers for legacy cards
probe with driver nvidia failed
In this case you can mask the newest driver and force gentoo to use older one. You can do this as follows:
echo '>=x11-drivers/nvidia-drivers-581' > /etc/portage/package.mask/nvidia-drivers
then
emerge -avtDUu @world
Friday, April 24, 2026
Open WebUI: Run as a temprorary container with Ollama support
docker run --rm --network=host -v open-webui:/app/backend/data -e OLLAMA_BASE_URL=http://127.0.0.1:11434 -e WEBUI_AUTH=False --name open-webui ghcr.io/open-webui/open-webui:main
Thursday, April 16, 2026
Distrobox with systemd: "save as" does not work in chromium and brave
systemctl --user mask dbus.socket dbus-broker.service
systemctl --user stop dbus.socket dbus-broker.service
In my case I was using fedora 43 in the container, on gentoo host running systemd and xfce4 (x11). The XDG portal (xdg-desktop-portal-gtk) on host was installed and running.
Wednesday, April 15, 2026
Firefox: disable "Add appliction" notification for outlook and other email portals
2. Enter about:config instead of an address.
3. Agree to the warning.
4. In the search bar, enter browser.mailto.dualPrompt and set it to true (double click it to toggle). Next time you see the prompt, it will have a second button called Not now. Press it.
From: https://superuser.com/a/1932569/871038
Tuesday, April 14, 2026
Qwen-code CLI: Use Qwen 3.6 plus from OpenRouter
"env": {
"OPENROUTER_API_KEY": "your-openrouter-api-key"
},
"modelProviders": {
"openai": [
{
"id": "qwen/qwen3.6-plus",
"name": "Qwen3.6-plus (via OpenRouter)",
"envKey": "OPENROUTER_API_KEY",
"baseUrl": "https://openrouter.ai/api/v1",
"generationConfig": {
"timeout": 120000,
"maxRetries": 3,
"samplingParams": {
"temperature": 0.7
}
}
}
]
}
More here.
Monday, April 13, 2026
fedora: web-ext keep changes in a profile for testing and use firefox developer edition
web-ext run -f firefox-aurora --keep-profile-changes --firefox-profile=test
distrobox: firefox "Show in Folder" opens vscodium, not thunar or other file manager.
xdg-mime default thunar.desktop inode/directory
xdg-mime default thunar.desktop x-scheme-handler/file
bedrock linux: krusader in arch strata does not open files with "Open with" menu from strata
cp /bedrock/strata/arch/usr/share/applications/appname.desktop ~/.local/share/applications/appname.desktop
sed -i 's|^Exec=|Exec=strat arch |' ~/.local/share/applications/appname.desktop
update-desktop-database ~/.local/share/applications/
The simble bash script to do it automatically (fix-strata-desktop.sh) is:
#!/bin/bash
STRATA="arch"
STRATA_ROOT="/bedrock/strata/$STRATA"
SRC="$STRATA_ROOT/usr/share/applications"
SRC_CROSS="$STRATA_ROOT/bedrock/cross/applications"
DEST="$HOME/.local/share/applications"
# Icon search dirs within the stratum, in priority order
ICON_SEARCH_DIRS=(
"$STRATA_ROOT/usr/share/icons/hicolor"
"$STRATA_ROOT/usr/share/icons"
"$STRATA_ROOT/usr/share/pixmaps"
)
ICON_EXTENSIONS=("png" "svg" "xpm")
# Preferred sizes in descending order (hicolor subdirs)
ICON_SIZES=("256x256" "128x128" "96x96" "64x64" "48x48" "32x32" "scalable")
# Resolve an icon name to an absolute path inside the stratum.
# Returns the path on stdout, or nothing if not found.
resolve_icon() {
local icon_name="$1"
# Already an absolute path — verify it exists (possibly via stratum root)
if [[ "$icon_name" == /* ]]; then
[[ -f "$icon_name" ]] && echo "$icon_name" && return
[[ -f "$STRATA_ROOT$icon_name" ]] && echo "$STRATA_ROOT$icon_name" && return
return
fi
# Strip any accidental extension for a clean name-based search
local base_name="${icon_name%.*}"
# 1. Search hicolor theme with preferred sizes first
for size in "${ICON_SIZES[@]}"; do
for ext in "${ICON_EXTENSIONS[@]}"; do
local candidate="$STRATA_ROOT/usr/share/icons/hicolor/$size/apps/$base_name.$ext"
[[ -f "$candidate" ]] && echo "$candidate" && return
done
done
# 2. Check pixmaps directly (flat directory, no subdirs) — catches vscodium, cups, etc.
for ext in "${ICON_EXTENSIONS[@]}"; do
local candidate="$STRATA_ROOT/usr/share/pixmaps/$base_name.$ext"
[[ -f "$candidate" ]] && echo "$candidate" && return
done
# 3. Walk all icon theme dirs (any size/category subdir)
for icon_dir in "${ICON_SEARCH_DIRS[@]}"; do
for ext in "${ICON_EXTENSIONS[@]}"; do
# Direct file in dir (pixmaps style — already handled above, but kept for custom dirs)
local candidate="$icon_dir/$base_name.$ext"
[[ -f "$candidate" ]] && echo "$candidate" && return
# Subdir search (themes with size/category layout)
# Prefer largest size by sorting descending on the size component
while IFS= read -r found; do
echo "$found" && return
done < <(find "$icon_dir" -name "$base_name.$ext" 2>/dev/null \
| sort -t'/' -k1,1 -r | head -1)
done
done
}
mkdir -p "$DEST"
for src_file in "$SRC"/*.desktop "$SRC_CROSS"/*.desktop; do
# Skip broken symlinks or non-files
[[ ! -f "$src_file" ]] && echo "Skipping: $(basename "$src_file")" && continue
filename=$(basename "$src_file")
dest_file="$DEST/$filename"
# FIX 1: Remove existing file first so cp never hits a permission-denied
# on files previously written by root (e.g. from an earlier sudo run).
if [[ -e "$dest_file" && ! -w "$dest_file" ]]; then
echo "Warning: removing unwritable existing file: $dest_file"
rm -f "$dest_file" || { echo "Error: cannot remove $dest_file — skipping"; continue; }
fi
cp -- "$src_file" "$dest_file" || { echo "Error: cp failed for $filename"; continue; }
# Fix Exec= lines that don't already use strat
if ! grep -q "Exec=strat $STRATA" "$dest_file"; then
sed -i "s|^Exec=|Exec=strat $STRATA |" "$dest_file"
fi
# Fix Icon= lines — resolve to absolute path inside the stratum
icon_value=$(grep -m1 "^Icon=" "$dest_file" | cut -d'=' -f2-)
if [[ -n "$icon_value" ]]; then
resolved=$(resolve_icon "$icon_value")
if [[ -n "$resolved" ]]; then
# Escape any special characters for sed
escaped=$(printf '%s\n' "$resolved" | sed 's/[[\.*^$()+?{|]/\\&/g')
sed -i "s|^Icon=.*|Icon=$escaped|" "$dest_file"
echo "Processed: $filename (icon -> $resolved)"
else
echo "Processed: $filename (icon '$icon_value' not resolved — left as-is)"
fi
else
echo "Processed: $filename (no Icon= entry)"
fi
done
update-desktop-database "$DEST"
echo "Done."
Sunday, April 12, 2026
distrobox: firefox does not open file chooser windows
The culprit is XDG Desktop Portals. Firefox tries to detect whether it's running inside a sandboxed environment like Flatpak, and when it thinks it is, it hands off file chooser dialogs to the XDG portal service instead of opening a native GTK window. Distrobox leaks enough container-like environment variables to trigger this heuristic, so Firefox dutifully tries to call the portal over D-Bus — but the portal either isn't reachable from inside the container or isn't running at all. The call fails silently and you never see a dialog.
The fix is a single preference change in about:config:
widget.use-xdg-desktop-portal.file-picker = 0
Setting this to 0 tells Firefox to never use the portal for the file picker, falling back to the plain GTK file chooser. The dialog comes back immediately, no restart required.
The default value of 2 means "auto-detect", which is the right call for a real Flatpak sandbox where portals are properly set up. In a Distrobox environment though, the detection fires incorrectly and there's no graceful fallback. Until Distrobox masks the relevant environment variables or Firefox improves its detection logic, flipping this preference manually is the most reliable workaround.
fedora: krusader can't change default application to open files.
Could not find the "keditfiletype" executable in PATH.
Install:
sudo dnf install keditfiletype
gentoo with systemd: simplescan from flatpak does not open Export save file window
systemctl --user status xdg-desktop-portal-gtk.service
If it is not running enable it:
systemctl --user enable --now xdg-desktop-portal-gtk.service
gentoo with systemd and docker: use Nvidia runtime in distrobox through Nvidia container oolkit
sudo emerge -av nvidia-container-toolkit
restart docker service:
sudo systemctl restart docker
Create and setup /etc/cdi:
mkdir -p /etc/cdi
nvidia-ctk cdi generate --output=/etc/cdi/nvidia.yaml
Check if its working:
nvidia-ctk cdi list
Configure docker to use NVIDIA runtime:
sudo nvidia-ctk runtime configure --runtime=docker
Restart docker service again:
sudo systemctl restart docker
Before creating distrobox container, lets just perfrom basic check if nvidia is avaiable in docker:
docker run --rm --device=nvidia.com/gpu=all ubuntu nvidia-smi
If this shows your Nvidia driver and info about your gpu, than it works.
Create distrobox that uses nvidia (fedora 43 as an example):
distrobox create -i quay.io/fedora/fedora:43 -n fbox -H ~/home-fbox --additional-flags "--device=nvidia.com/gpu=all"
Enter the distrobox container, fbox, in this example, and test using nvidia-smi:
sudo nvidia-smi
This should also give info about your nvidia gpu and its driver.
If inside the distrobox container, nvidia is only avaiable for root user, you have to check what group number is nvidia on the host:
stat -c "%g" /dev/nvidia0
This will show a number, e.g. 27. Then in the distrobox container, fbox in this example, you have to edit /etc/group and:
1. add yourself (i.e. normal user) to video group 2. Change video group number to match the one on the host, e.g. 27. For example, /etc/group in fbox
video:x:27:your-user-name
distrobox with nvidia through NVIDIA Container Toolkit
distrobox create -i archlinux -n abox -H ~/home-abox --additional-flags "--device=nvidia.com/gpu=all" && 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"
nixos: enable nvidia in distrobox container using Nvidia Container Toolkit
distrobox create -i archlinux -n archbox --additional-flags "--device=nvidia.com/gpu=all"
Then in the distrobox container you can check if nvidia is detected, using for example glxinfo. It should show:
name of display: :0.0
display: :0 screen: 0
direct rendering: Yes
server glx vendor string: NVIDIA Corporation
server glx version string: 1.4
server glx extensions:
Put the following in nixos configuration file:
hardware.nvidia-container-toolkit.enable = true;
virtualisation.docker.daemon.settings.features.cdi = true;
Saturday, April 11, 2026
Gentoo and SDDM and Ligthdm: Fixing Inactive Mouse at Display Manager Startup in Gentoo with systemd
This is a race condition. Gentoo's minimal default configuration does not add unnecessary delays or dependencies to services, which means your display manager can start before the kernel input subsystem and udev have finished initializing the mouse device. Other distributions work around this implicitly through their own service configurations, but on Gentoo you have to handle it yourself.
The fix is to make the display manager wait for udev to finish settling before it starts. Systemd has a built-in service for exactly this purpose called systemd-udev-settle. It blocks until udev has finished processing all queued device events, which includes input devices like your mouse. You wire your display manager to it using a systemd drop-in file.
For SDDM, first create the drop-in directory:
mkdir -p /etc/systemd/system/sddm.service.d/
Then create the drop-in configuration file:
cat > /etc/systemd/system/sddm.service.d/wait-for-input.conf << 'EOF'
[Unit]
After=systemd-udev-settle.service
Wants=systemd-udev-settle.service
EOF
If you use LightDM instead, the steps are identical but with a different directory:
mkdir -p /etc/systemd/system/lightdm.service.d/
cat > /etc/systemd/system/lightdm.service.d/wait-for-input.conf << 'EOF'
[Unit]
After=systemd-udev-settle.service
Wants=systemd-udev-settle.service
EOF
After creating the file, reload the systemd daemon so it picks up the change:
systemctl daemon-reload
That is all. On the next reboot, systemd will start systemd-udev-settle before launching your display manager, and it will wait for all input devices to be fully registered before the login screen appears. The mouse will work on the very first try.
The reason this only affects Gentoo is that you compile and configure everything yourself. There is no distribution maintainer quietly patching service files or adding conservative boot ordering on your behalf. That level of control is what makes Gentoo great, but it also means issues like this surface in a way they simply would not on a more opinionated distribution.
If the problem persists after applying this fix, the next thing to investigate is whether your mouse and evdev drivers are compiled as kernel modules rather than built into the kernel, and whether INPUT_DEVICES is correctly set in your /etc/portage/make.conf.
Fedora 43: Install latest foxitreader
wget https://cdn01.foxitsoftware.com/pub/foxit/reader/desktop/linux/2.x/2.4/en_us/FoxitReader.enu.setup.2.4.5.0727.x64.run.tar.gz
tar xzvf FoxitReader*.tar.gz
chmod +x ./"FoxitReader.enu.setup.2.4.5.0727(rb70e8df).x64.run"
sudo ./"FoxitReader.enu.setup.2.4.5.0727(rb70e8df).x64.run"
Follow the prompts.
gentoo with xfce4: krusader does not start from distrobox
kf.i18n: KLocalizedString: Domain is not set for this string, translation will not work. Please see https://api.kde.org/frameworks/ki18n/html/prg_guide.html msgid: "No jobs" msgid_plural: "" msgctxt: ""
Authorization required, but no authorization protocol specified
10:26:41.584-warning qt.qpa.xcb unknown@0 # could not connect to display :0.0
10:26:41.584-warning qt.qpa.plugin unknown@0 # From 6.5.0, xcb-cursor0 or libxcb-cursor0 is needed to load the Qt xcb platform plugin.
10:26:41.584-info qt.qpa.plugin unknown@0 # Could not load the Qt platform plugin "xcb" in "" even though it was found.
10:26:41.584-fatal default unknown@0 # This application failed to start because no Qt platform plugin could be initialized. Reinstalling the application may fix this problem.
Available platform plugins are: linuxfb, wayland-brcm, wayland-egl, wayland, vkkhrdisplay, vnc, offscreen, xcb, minimalegl, eglfs, minimal.
install xhost in gentoo host:
sudo emerge x11-apps/xhost
and allow access to display:
xhost +
now can enter the fedora distrobox
Friday, April 10, 2026
bedrock with hijacked gentoo and xfce4: missing icons from strata in xfce4 application menu
sudo touch /usr/share/icons/hicolor
sudo gtk-update-icon-cache
based on: https://old.reddit.com/r/bedrocklinux/comments/llt5pp/buggy_icons_from_other_stratums_in_gnome/gnuo7tv/
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 ""
'';
}
Thursday, March 26, 2026
Sunday, March 22, 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.
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.
Tuesday, March 17, 2026
Void Linux: "/" is not a shared mount, this could cause issues or missing mounts with rootless containers
"/" 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
Void Linux: podman and distrobox: short-name "archlinux" did not resolve to an alias and no unqualified-search registries are defined in "/etc/containers/registries.con
Error: short-name "archlinux" did not resolve to an alias and no unqualified-search registries are defined in "/etc/containers/registries.conf"
Edit: /etc/containers/registries.conf and add:
unqualified-search-registries = ["docker.io"]
Tuesday, March 10, 2026
Fix: Firefox in Distrobox "Show in Folder" Opens the Wrong App on Linux
inode/directory=thunar.desktop
into ~/.config/mimeapps.list:
[Default Applications]
inode/directory=thunar.desktop
Start libreoffice in dark theme from distrobox on nix os through .desktop file
Exec=env GTK_THEME=Adwaita:dark /run/current-system/sw/bin/distrobox-enter -n abox -- libreoffice --writer %U
Friday, March 06, 2026
flatpak: Kdenlive error: Could not initialize GLX
Could not initialize GLX
Have to **update flatpak** as probably nvidia drivers in flatpaks are much different than on the host.
Friday, February 27, 2026
NixOS: Libreoffice in distrobox does not use Adwaita dark theme
GTK_THEME=Adwaita:dark libreoffic
or set in fish config:
set -x GTK_THEME Adwaita:dark
NixOS: Firefox in distrobox does not use Adwiata theme (no hand mouse cursor)
vim .config/fish/config.fish
set -e XCURSOR_PATH
set -x XCURSOR_PATH /usr/share/icons ~/.icons
When creating launcher for firefox in xfce4, have to reset `XCURSOR_PATH`:
/run/current-system/sw/bin/distrobox-enter -n abox -- bash -c 'XCURSOR_PATH=/usr/share/icons /usr/lib/firefox/firefox %u '
Wednesday, February 25, 2026
terminator: change size and location
terminator --geometry=2420x650+80+800
NixOs: Can't start terminator from distrobox on nixos
TypeError: unknown signal name: changed::font-name
The error TypeError: unknown signal name: changed::font-name occurs because Terminator is trying to connect to a GSettings signal for org.gnome.desktop.interface (font settings), but the required GSettings schemas are missing or inaccessible inside the distrobox container.
distrobox-enter -n abox -- bash -c 'unset LD_LIBRARY_PATH GI_TYPELIB_PATH GIO_MODULE_DIR GSETTINGS_SCHEMA_DIR; terminator'
Friday, January 30, 2026
distrobox-assembly: Install arch with yay and some default packages
[abox]
additional_packages="git base-devel sudo curl"
home=~/home-abox
image=archlinux:latest
init=true
start_now=true
init_hooks='useradd -m -G wheel builder && echo "%wheel ALL=NOPASSWD: ALL" >> /etc/sudoers.d/wheel && su - builder -c "git clone https://aur.archlinux.org/yay-bin.git && cd yay-bin && makepkg -si --noconfirm" && rm -rf /home/builder/yay-bin && su - builder -c "yay -S --noconfirm --needed mc vim htop tmux fd zoxide fzf terminator freerdp rdesktop bash-completion firefox firefox-developer-edition brave-bin vscodium-bin onlyoffice-bin libreoffice-fresh gwenview okular wine krusader krename kdiff3 konsole xdg-desktop-portal-kde ipython tigervnc fluxbox rofi xterm xorg-xeyes masterpdfeditor vlc mpv qt6-imageformats kimageformats vlc-plugins-all fish chromium librewolf-bin go python-uv gimp ttf-roboto otf-font-awesome rar p7zip octave yt-dl sshfs ebook-tools xarchiver kdegraphics-mobipocket gnome-boxes" && cd /etc/xdg/menus && ln -sf ./plasma-applications.menu applications.menu && ln -sf ./plasma-applications.menu gnome-applications.menu && ln -sf ./plasma-applications.menu kde-applications.menu && su - builder -c "NONINTERACTIVE=1 /bin/bash -c \"\$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)\" && eval \"\$(/home/linuxbrew/.linuxbrew/bin/brew shellenv)\" && brew install claude-code gemini-cli opencode qwen-code web-ext" && echo "eval \"\$(/home/linuxbrew/.linuxbrew/bin/brew shellenv)\"" >> ~/.bashrc
nvidia=true
pull=true
root=false
replace=false
Fedora atomic (vauxite xfce4): install nvidia drivers
sudo rpm-ostree install akmod-nvidia xorg-x11-drv-nvidia
sudo rpm-ostree kargs --append=rd.driver.blacklist=nouveau,nova_core --append=modprobe.blacklist=nouveau,nova_core --append=nvidia-drm.modeset=1
https://github.com/eoladil/Fedora-Silverblue-Guides?tab=readme-ov-file#4-install-nvidia-drivers-for-current-geforce-tesla-and-quadro-gpus
Thursday, January 29, 2026
tigvervnc: example vncserver config setup
session=startfluxbox
securitytypes=none
geometry=1800x1100
localhost
alwaysshared
Monday, January 26, 2026
kde plasma: set kde theme from a command line in a distrobox
lookandfeeltool -list
can return
org.kde.breeze.desktop
org.kde.breezedark.desktop
org.kde.breezetwilight.desktop
then
lookandfeeltool -a org.kde.breezedark.desktop
More at: https://askubuntu.com/a/1183309
Bazzite (Fedora atomic): install virtualbox on Bazzite custom image
sudo dnf --enablerepo=rpmfusion-free install virtualbox
This will still NOT install the virtualbox in atomic fedora as its read-only system. But can be useful for building custom atomic images which would contain the virtualbox or other packages.
Example of how the virtualbox can be installed in a custom image of Bazzite is here:
https://github.com/ettfemnio/bazzite-virtualbox
distrobox: Basic programs for archlinux and fedora in distrobox
yay --noconfirm -S mc vim fish htop tmux fd zoxide fzf terminator freerdp rdesktop bash-completion firefox firefox-developer-edition brave-bin vscodium-bin libreoffice-fresh gwenview okular wine krusader krename kdiff3 konsole sshfs xarchiver xdg-desktop-portal-kde tigervnc fluxbox rofi xterm xorg-xeyes vlc mpv vlc-plugins-all chromium ipython librewolf-bin go python-uv gimp ttf-roboto otf-font-awesome rar p7zip octave ebook-tools kdegraphics-mobipocket gnome-boxes qt6-imageformats kimageformats curl wget foxitreader thunar npm kate
sudo dnf -y install vim firefox brave-browser krusader krename konsole kate keditfiletype kdiff3 chromium okular vlc htop tmux mc fish go python-uv codium unrar p7zip nvtop glx-utils xfreerdp rdesktop tigervnc libreoffice gwenview wine sshfs xarchiver xdg-desktop-portal-kde mpv gnome-boxes curl wget fzf zoxide terminator fontawesome-fonts-all firefox-dev librewolf gimp thunar octave yazi nodejs
Note: Will have to add custom repos to fedora for firefox-dev, brave-browser, codium and rpmfusion for codeks
Saturday, January 24, 2026
Use GLM through OpenRouter in Claude Code
ANTHROPIC_AUTH_TOKEN="your-openrouter-api-key" ANTHROPIC_BASE_URL="https://openrouter.ai/api" ANTHROPIC_API_KEY="" claude --model z-ai/glm-4.7
Wednesday, January 14, 2026
arch: Uninstall nvidia-open drivers due to second monitor being not detected
sudo pacman -Rd nvidia-open nvidia-utils
Monday, January 12, 2026
Systemd: autostart Ansys SAM
sudo vim /etc/systemd/system/sam.service
[Unit]
Description=Ansys SAM Web Application Container
Requires=docker.service
After=docker.service
[Service]
Type=simple
User=root
Group=root
WorkingDirectory=/opt/ansys-mbse-server/mbse
ExecStartPre=/usr/bin/docker compose down
ExecStart=/usr/bin/docker compose up
ExecStop=/usr/bin/docker compose down
Restart=always
TimeoutStopSec=30
[Install]
WantedBy=multi-user.target
Saturday, January 10, 2026
SSL certificate keystore for Ansys SAM tomcat server
The files have to be bundled into a keystore (keystore.pfx) for use in tomcat. For this you can use:
openssl pkcs12 -export -in cert1.pem -inkey privkey1.pem -out keystore.pfx -name tomcat -CAfile chain1.pem -caname root -chain
"keystore.pfx" must be renamed to "keystore" and keystore password used when creating keystore.pfx have to be specified in server.xml.
More information at: https://hardwarehacks.org/blog/setting_up_tomcat_with_a_lets_encrypt_certificate/
Friday, January 09, 2026
ssh: LocalForward in ssh config file
Host myserver
HostName serverip
User ubuntu
IdentityFile ~/.ssh/private.pem
LocalForward 5903 localhost:5901
tigervnc: on ubuntu example settings
$session = "startfluxbox";
$SecurityTypes = "none";
$geometry = "2000x1200";
$localhost = "yes";
$AlwaysShared = "yes";
sudo systemctl enable --now tigervncserver@:1