modetc: Move your dotfiles from kernel space
28 points by eBPF
28 points by eBPF
This reminds me of https://pages.stern.nyu.edu/~marriaga/software/libtrash/ which I used for a while.
why not symlink?
why do people keep replying with "just symlink lol" whenever this topic comes up? the problem is still there because the top level of your home dir still has garbage
Because symlinks don't solve the problem: they have to exist on-disk in the application's expected location, and the point of this kind of tool is to force files to live in proper locations instead of strewn about at the whims of noncompliant applications.
OK, but now you're maintaining some file on disk instead that has a list of all the remappings. I don't see a difference, except that one is the discoverable solution that works on anything unix-y, and the other is a globally-implemented hack in the kernel that no standard tools work with.
And personally I don't mind the mess. The files are hidden for a reason :)
You might not mind the mess, but a huge amount of users do. Hidden files are a hack, not a solution.
a globally-implemented hack in the kernel that no standard tools work with.
Oh no! Anyway, it actually seems to work just fine with all standard tools that persist configuration to the filesystem.
the other is a globally-implemented hack in the kernel that no standard tools work with
Isn't the point that all standard tools would work with it?
I second this. Its likely a joke rewriting paths as a kernel module. The ux is also terrible.
Looks neat. Doing this on kernel module level makes sense. I'd carefully analyze the source though. String handling in C is very error prone and on quick glance i dont see the module checking return value of snprintfs for example. I would've prob written this in zig which has properly bound checked slices.
There's actually a really good application of this idea: you could make certain programs only able to read their own dotfiles and store the real copy on an encrypted volume somewhere else. This would be a useful mod for pesky programs that insist on storing credentials in dotfiles, so other programs couldn't leak them.