Earlier quoted context omitted.
Maybe your profile location ought to be something that you're able to set through chsh
There is a system-wide /etc/profile or /etc/profile.d/ Likewise, zsh will look for /etc/zshrc And zsh will actually look at $ZDOTDIR/.zshenv $ZDOTDIR/.zprofile $ZDOTDIR/.zshrc $ZDOTDIR/.zlogin $ZDOTDIR/.zlogout So perhaps you can set the value of ZDOTDIR in one of the systemwide locations to use "$HOME/foo/bar/zsh/" and this way zsh will use ~/foo/bar/zsh/ as the location for the user specific .zshrc and other mentio…
Use the XDG Base Directory Specification
161–170 of 214 posts
Re: Use the XDG Base Directory Specification
#162Re: Use the XDG Base Directory Specification
#163Earlier quoted context omitted.
Beware that any directory other than one under /home might not enjoy the same protections by default by other programs, like systemd’s ProtectHome setting. You’ll also probably want to adjust some settings, like AppArmor’s @{HOMEDIRS} setting.
Does systemd really hardcode "/home" rather than use the user's actual home directory?
GP then was cautioning that this leaves your most important files at the whims of Unix's simplistic user permissions model, unless you also point systemd and/or AppArmor towards /me.
Re: Use the XDG Base Directory Specification
#164The second example is a nice start, but I'd really like to see invisible files/folders in ~/ done away with altogether. So starting with that example, I might add a visible ~/Library/ folder, then move ~/.config/ and ~/.local/ in there as ~/Library/Config/ and ~/Library/Local/ as normal visible folders. Same for .bashrc, .profile, etc; put them in ~/Library/Config/ without the dots.
What does Library actually mean though? ;)
This is the problem with preferences: everyone's preferences are different!
Re: Use the XDG Base Directory Specification
#165Yeah, we have a straightforward and widely established standard. Just put the related files in .programname . Now let's bikeshed and scatter them randomly across several places. To make it more fun let's make those locations programmable with environment variables so you won't even know where to start looking for a particular related file. Add lots of categories to create ambiguity. Make some of the default locations…
That has never been a standard as many programs have multiple dotfiles in ~. But even if it was, there are still good arguments for the XDG Basedir Spec: common way to change the location via environement variables as well as ability to split cache and non-cache.
Re: Use the XDG Base Directory Specification
#166Earlier quoted context omitted.
Honestly, when your xdg list gets huge, apps should just use xdg out of the box... my /etc/profile is 35 lines of just xdg junk.
What the heck are you talking about? The XDG basedir spec is three variables. The user dir spec is more but those are not environement variables.
You're welcome.
Re: Use the XDG Base Directory Specification
#167The second example is a nice start, but I'd really like to see invisible files/folders in ~/ done away with altogether. So starting with that example, I might add a visible ~/Library/ folder, then move ~/.config/ and ~/.local/ in there as ~/Library/Config/ and ~/Library/Local/ as normal visible folders. Same for .bashrc, .profile, etc; put them in ~/Library/Config/ without the dots.
> The second example is a nice start, but I'd really like to see invisible files/folders in ~/ done away with altogether. A great many amazing tools shall, by default, skip searching in hidden files (and gain a great speedup thanks to doing that). You'd have to modify all these tools so that they'd skip Library/ by default. Also, related to that, what would you do with .git/? Move prjs/fizzbuz/.git to Library/fizzbuz…
$(infernalpath loc)/version-control/git/path-to-project/name-of-project
$(infernalpath loc)/version-control/fossil/path-to-project/name-of-projectRe: Use the XDG Base Directory Specification
#168Earlier quoted context omitted.
Hmm. I think it's because `ls -a` will not visually differentiate between files and folders and will also show `.`and `..`. and will span contents over columns while find will return a line by found items. Or they are a show-off.
They could have used ls -A -1 -p which should result in the same output. -A is like -a but will not print . and .. directories. -1 prints one file per line. -p appends / to directories. There's a lot more flags in the man page: https://man7.org/linux/man-pages/man1/ls.1.html
Re: Use the XDG Base Directory Specification
#169Earlier quoted context omitted.
> for the most popular OS Android doesn't really do dot files. Or config files that the user can see at all. (And if you'd like to amend to "the most used desktop OS", this is obviously aimed at unix-likes, but actually Windows does have an equivalent standard and programs targeting that platform really should be following it just like programs targeting unix-likes really should follow this)
Just like it's obvious what OS I meant, it's also obvious that the article's aim is not as narrow as you're trying to paint it, otherwise it wouldn't have a section on Windows. And the Mac section is also weak, so even that is not a good excuse; and Mac also has a standard, and it's best to ignore it if a user sets an XDG env var Your advice re. Windows is also bad, for example, for a lot of x-platform tools I care m…
The Windows section stright-up says they don't really know what the situation is over there, and the macOS section says they couldn't find an official recommendation for non-GUI programs.
> Your advice re. Windows is also bad, for example, for a lot of x-platform tools I care more about x-platform consistency and would set the env var to the same ~/.config, e.g., it's much easier to do backup, and I don't care that there is some OS standard (which aren't great to be followed blindly)
If you just want to make your personal stuff do what you expect, then sure, by all means force everything to whatever you like, but that's not good general advice.
Re: Use the XDG Base Directory Specification
#170Earlier quoted context omitted.
Just like it's obvious what OS I meant, it's also obvious that the article's aim is not as narrow as you're trying to paint it, otherwise it wouldn't have a section on Windows. And the Mac section is also weak, so even that is not a good excuse; and Mac also has a standard, and it's best to ignore it if a user sets an XDG env var Your advice re. Windows is also bad, for example, for a lot of x-platform tools I care m…
> otherwise it wouldn't have a section on Windows. And the Mac section is also weak The Windows section stright-up says they don't really know what the situation is over there, and the macOS section says they couldn't find an official recommendation for non-GUI programs. > Your advice re. Windows is also bad, for example, for a lot of x-platform tools I care more about x-platform consistency and would set the env var…
> just want to make your personal stuff do what you expect
That's obviously not "just" what I want, so care to come up with an actual reason why moving from the OS dumping ground to a user's custom folder is not a good general advice?