HeadlinesBriefing favicon HeadlinesBriefing.com

Modetc: Linux Kernel Module for Dotfile Management

Hacker News: Front Page •
×

A new Linux kernel module called modetc rewrites file paths in real-time, allowing programs to access dotfiles from non-standard locations without changing their code. It targets stubborn applications that ignore the XDG basedir standard, moving files like `~/.ssh` to `~/var/lib/ssh` transparently.

The tool uses kprobes to intercept Virtual File System calls, modifying path arguments in kernel space before operations execute. This approach works with statically linked binaries and programs bypassing libc. Compared to userspace solutions like `rewritefs`, it claims minimal I/O overhead since it doesn't require a FUSE filesystem mount.

Configuration happens via module parameters and a rules file supporting simple text substitutions. The project is licensed under GPLv3 and supports NixOS integration. For developers managing cluttered home directories, this offers a radical alternative to manual symlinks or environment variable overrides.