I actually just make my personal home directory in the root of the filesystem. So /me. If /root can have it, why can't I? It is my machine after all.
Use the XDG Base Directory Specification
111–120 of 214 posts
Re: Use the XDG Base Directory Specification
#112The problem with this is that it's all socially enforced, but it's not a social problem, it's a technical problem. The issue isn't that we haven't put enough pressure on developers to read the correct environment variables. It's that we have such a poor isolation story on UNIX that we have to care about where applications read and write from, rather than letting them do whatever they want in a sandbox.
Many of the open source docker images are on the right track here. Where does the persistent state go? /data. Where does the configuration go? /config. Where does the cached data go? /cache. All in the most obvious places right at the filesystem root. Those applications would be considered "badly behaved" outside the container, but inside, it's much easier to predict what they will do.
Re: Use the XDG Base Directory Specification
#113I actually just make my personal home directory in the root of the filesystem. So /me. If /root can have it, why can't I? It is my machine after all.
Exactly! Fixing /home/ is a lost cause. You can't get thousands of applications to follow a common sense standard. It's more pragmatic to not store the files you care about in the dumping ground that's /home/ .
Re: Use the XDG Base Directory Specification
#114I strongly disagree: the dot files cause very little inconvenience because they’re typically hidden and they’re easier to type and list than the XDG spec stuff
i agree too, All i've seen is a mess of conflicting standards. Is the dotfile now in ~/.local, or ~/.config or what?
If configuration then ~/.config. (which could be empty if you just use the default setup) If for data that the app writes then ~/.local
Re: Use the XDG Base Directory Specification
#115I'll take the other side of this. We have this concept of applications being "well behaved" if they only read and write from parts of the filesystem that users expect. The XDG directories are what most linux and macOS users expect, even if they don't know about the standard. This well-behavedness feeds into the larger idea of high quality software. Hiqh quality means users are more likely to recommend it, engineers a…
Why must applications incorporate implementation details of the deployment environment? Why does the environment owner not have tooling to control where files are placed?
Re: Use the XDG Base Directory Specification
#116I'll take the other side of this. We have this concept of applications being "well behaved" if they only read and write from parts of the filesystem that users expect. The XDG directories are what most linux and macOS users expect, even if they don't know about the standard. This well-behavedness feeds into the larger idea of high quality software. Hiqh quality means users are more likely to recommend it, engineers a…
Exactly. It feels foolish to demand N unrelated applications implement support for the same arbitrary ruleset N different times. Why must applications incorporate implementation details of the deployment environment? Why does the environment owner not have tooling to control where files are placed?
This trust is in some cases clearly not earned, and so one might consider that some applications are not worthy of having access to these APIs
Re: Use the XDG Base Directory Specification
#117For instance, to get rid of Download, Templates, Desktop, Public Share, Documents, Music, Pictures, Videos directories I not only have to point them to somewhere else, I also have to make sure Desktop and Download do not point to the same directory, otherwise my config will not be used.
Here, after literally hours of researching, I figured the config that works:
cat ~/.config/user-dirs.dirs
XDG_DESKTOP_DIR="$HOME/.Desktop"
XDG_DOWNLOAD_DIR="$HOME/tmp"
XDG_TEMPLATES_DIR="$HOME/tmp"
XDG_PUBLICSHARE_DIR="$HOME/tmp"
XDG_DOCUMENTS_DIR="$HOME/tmp"
XDG_MUSIC_DIR="$HOME/tmp"
XDG_PICTURES_DIR="$HOME/tmp"
XDG_VIDEOS_DIR="$HOME/tmp"Re: Use the XDG Base Directory Specification
#118Earlier quoted context omitted.
Being like that for a long time is not a justification for terrible defaults.
That is a better default than a hidden directory. It is obvious and so you can set GOPATH Also works better on Windows where .path is not hidden Also it seems Rob Pike one of the creators of Go and involved with early UNIX thinks that . making hidden files was a mistake. Quote via XahLee http://xahlee.info/UnixResource_dir/writ/unix_origin_of_dot_... - original was Google+ so not existing now.
They had a kb shortcut for it
Re: Use the XDG Base Directory Specification
#119Earlier quoted context omitted.
> That's not in the XDG spec. But it is. In the XDG user dir spec.
Wait, I get to blame XDG for this? I've never cared about dotfiles since they're invisible. But Videos, Pictures, etc. have always been a nuisance.
cat ~/.config/user-dirs.dirs
XDG_DESKTOP_DIR="$HOME/.Desktop"
XDG_DOWNLOAD_DIR="$HOME/tmp"
XDG_TEMPLATES_DIR="$HOME/tmp"
XDG_PUBLICSHARE_DIR="$HOME/tmp"
XDG_DOCUMENTS_DIR="$HOME/tmp"
XDG_MUSIC_DIR="$HOME/tmp"
XDG_PICTURES_DIR="$HOME/tmp"
XDG_VIDEOS_DIR="$HOME/tmp"
Note that XDG_DESKTOP_DIR and XDG_DOWNLOAD_DIR have to point to different directories. In hindsight, this is obvious, but this is also a really stupid "security" bug-o-feature that costed countless hours to countless people.Re: Use the XDG Base Directory Specification
#120Weird how this promotional article is weak re advice for the most popular OS (and personal experience isn't the only source of insight)
> 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)
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)
But even for non x-platform apps that Windows AppData defaults are a dumping ground for app data (not configs) I don't care about and don't need to backup or anything , so if there is an option to put some configs that are more important in a different folder, that's better