Earlier quoted context omitted.
As a defence of hardcoded paths might go, I could've done better myself. What else from your OS 30 years ago might you keep just because it's 30+ years old?
I keep it because it's worked for 30 years without issues and it's still working. Must you always replace something, just because a newer thing is "out there"? On the other hand, this is hackernews, and rewriting everything, from a text editor to a file browser, into a (ruby, go, rust,...) is a thing.
Show HN: boxxy – Control where Linux programs put files, without symlinks
241–250 of 250 posts
Re: Show HN: boxxy – Control where Linux programs put files, without symlinks
#242Earlier quoted context omitted.
Personally I see a lot of young people use emacs and BSD licences, but because I'm an older engineer and have the wisdom and experience of time, I use vim and GPL.
I'm also a Vim user; in my Vim wisdom and experience I made it follow the damn XDG spec; if hidden files are a feature, I want it to be a feature for my use-cases, not program clutter.
Re: Show HN: boxxy – Control where Linux programs put files, without symlinks
#243Earlier quoted context omitted.
If, as you say > most all of the Linux software dumping dotfiles in my homedir then is it really true, that the standard is in fact "well established"?
Right now I have in my home folder 4 undesirable dot something which should be somewhere else and I can't change it. Meanwhile, I have 63 folders in my .config which means most of the applications I'm using do respect the XDG base directory specification, only a few entitled or extremely legacy ones don't.
Re: Show HN: boxxy – Control where Linux programs put files, without symlinks
#244This is neat! What's so bad about symlinks though?
i was using a similar bind-mount trick as Boxxy for a good 6 months or so, and then reworked it to prefer symlinks a couple months ago. nearly everything behaves as you’d expect with symlinks if you’re just symlinking within ~, and it’s easier to tell what’s going on or debug stuff. notably, at some point i decided to encrypt my valuables: password store, PII, etc, and have them unlocked on login via PAM. i also want…
Could you please share a general outline for configuring something like this?
Re: Show HN: boxxy – Control where Linux programs put files, without symlinks
#245Earlier quoted context omitted.
i was using a similar bind-mount trick as Boxxy for a good 6 months or so, and then reworked it to prefer symlinks a couple months ago. nearly everything behaves as you’d expect with symlinks if you’re just symlinking within ~, and it’s easier to tell what’s going on or debug stuff. notably, at some point i decided to encrypt my valuables: password store, PII, etc, and have them unlocked on login via PAM. i also want…
> have them unlocked on login via PAM Could you please share a general outline for configuring something like this?
if you can make a /etc/fstab entry for your filesystem, then you can configure pam_mount using the same options as the fstab entry and it should work.
for the actual encrypted filestore, i’m using gocryptfs. it’s a more actively developed alternative to eCryptfs: mostly a drop-in replacement. there’s a lot of options here: dm-crypt over a dedicated partition is probably what a cryptographer would recommend, everything else is making tradeoffs (e.g. leaking metadata like file size/directory entry count) for better UX elsewhere. read the wiki to pick the best for your needs :)
on the off-chance you’re using NixOS, i configure these parts here:
- https://git.uninsane.org/colin/nix-files/src/commit/bcfd8e17... - https://git.uninsane.org/colin/nix-files/src/commit/bcfd8e17...
Re: Show HN: boxxy – Control where Linux programs put files, without symlinks
#246Earlier quoted context omitted.
Right now I have in my home folder 4 undesirable dot something which should be somewhere else and I can't change it. Meanwhile, I have 63 folders in my .config which means most of the applications I'm using do respect the XDG base directory specification, only a few entitled or extremely legacy ones don't.
Out of curiosity, what are the misbehaving ones?
.npm - NPM
.pki - Chromium-based software
.SpaceVim.d - My fault, I should write my own vimrc but I'm lazy
.steam and .steampath and .steampid - Steam
.vscode-oss - VS Codium
.w3m - w3m cli browser
These are the ones I couldn't change the behavior of, in my dotfiles I've managed to fix at least a dozen of programs that were previously misbehaving but offered environment variables to change their behaviors.
The thing that bothers me most about these is that most of these folders are simply cache and logs, I can always delete them and the application will keep working, but of course the folders will be recreated. It's truly mind-numbing.
Re: Show HN: boxxy – Control where Linux programs put files, without symlinks
#247Earlier quoted context omitted.
Out of curiosity, what are the misbehaving ones?
.mozilla - Firefox .npm - NPM .pki - Chromium-based software .SpaceVim.d - My fault, I should write my own vimrc but I'm lazy .steam and .steampath and .steampid - Steam .vscode-oss - VS Codium .w3m - w3m cli browser These are the ones I couldn't change the behavior of, in my dotfiles I've managed to fix at least a dozen of programs that were previously misbehaving but offered environment variables to change their be…
# Save shell wrapper as '~/.local/bin/firefox'
{ while kill -0 $$ 2> /dev/null; do rm -rf $HOME/.mozilla; done; } &
/bin/firefox --profile $XDG_DATA_HOME/firefox $@
NPM # set env variable
export NPM_CONFIG_USERCONFIG=$XDG_CONFIG_HOME/npm/npmrc
# and in npmrc:
prefix=${XDG_DATA_HOME}/npm
cache=${XDG_CACHE_HOME}/npm
tmp=${XDG_RUNTIME_DIR}/npm
init-module=${XDG_CONFIG_HOME}/npm/config/npm-init.js
Steam Steam actually creates only symlinks for backward
compatibility as some games (may) expect them in $HOME.
You can safely launch it with modified HOME variable:
$ HOME="$XDG_DATA_HOME/Steam" steam
(and/or put it into a wrapper script like with Firefox)
Vim I don't know how it's with SpaceVim,
but with regular vimrc you can make it follow the spec:
https://blog.joren.ga/vim-xdg
w3m export W3M_DIR="$XDG_DATA_HOME/w3m"Re: Show HN: boxxy – Control where Linux programs put files, without symlinks
#248Earlier quoted context omitted.
.mozilla - Firefox .npm - NPM .pki - Chromium-based software .SpaceVim.d - My fault, I should write my own vimrc but I'm lazy .steam and .steampath and .steampid - Steam .vscode-oss - VS Codium .w3m - w3m cli browser These are the ones I couldn't change the behavior of, in my dotfiles I've managed to fix at least a dozen of programs that were previously misbehaving but offered environment variables to change their be…
Firefox # Save shell wrapper as '~/.local/bin/firefox' { while kill -0 $$ 2> /dev/null; do rm -rf $HOME/.mozilla; done; } & /bin/firefox --profile $XDG_DATA_HOME/firefox $@ NPM # set env variable export NPM_CONFIG_USERCONFIG=$XDG_CONFIG_HOME/npm/npmrc # and in npmrc: prefix=${XDG_DATA_HOME}/npm cache=${XDG_CACHE_HOME}/npm tmp=${XDG_RUNTIME_DIR}/npm init-module=${XDG_CONFIG_HOME}/npm/config/npm-init.js Steam Steam act…
Re: Show HN: boxxy – Control where Linux programs put files, without symlinks
#249Earlier quoted context omitted.
Fun fact, one layer of App Engine's sandbox from a couple years ago was implemented using ptrace. It will redirect filesystem IO to in-memory files.
Interesting! That makes perfect sense, I just don't think I'm smart enough to use ptrace properly right now :P
Re: Show HN: boxxy – Control where Linux programs put files, without symlinks
#250This is neat! What's so bad about symlinks though?
> What's so bad about symlinks though? I am not smart and will regularly forget the syntax to ln(1)
`mklink [[/d] | [/h] | [/j]] ` `ln [OPTION]... [-T] TARGET LINK_NAME`