There’s quite a lot of programs that make use of XDG_CONFIG, with the default set to .config in most distros. However, there’s also quite a few programs that have rejected this, sticking with a format that is not XDG-conforming.

One such example is OpenSSH, as can be seen in the following page - it makes use of the ~/.ssh directory. Why is that OpenSSH does not conform to this specification? Are there any security vulnerabilities? If so, then shouldn’t there be another specification by Freedesktop.org, which allots a secure directory for the same?

  • Lung@lemmy.world
    link
    fedilink
    arrow-up
    1
    arrow-down
    1
    ·
    1 year ago

    My “user directories”? You mean you have more than one $HOME with dotfiles in it?

    It was never a problem to find user specific app data on unix. And XDG obviously didn’t solve it because solutions that require everyone to change their code are dumb. Case in point, this thread

    • pivot_root@lemmy.world
      link
      fedilink
      arrow-up
      1
      ·
      1 year ago

      My “user directories”? You mean you have more than one $HOME with dotfiles in it?

      I meant directories under your $HOME.

      The problem isn’t that finding files is difficult, but that a lack of specifications leads to inconsistencies and programs doing whatever they want under your home directory.

      That worked fine for Unix because programs were designed to be simple. It doesn’t work today where you have programs that constantly save temporary files, caches, and data derived from user input.

      • Lung@lemmy.world
        link
        fedilink
        arrow-up
        1
        ·
        1 year ago

        You used to have to do all that stuff before too. Vim has had history, settings, caching, and plugins for ever. And it all used to sit in ~/.vim. Now it’s in ~/.config/vim. What’s the difference?

        • pivot_root@lemmy.world
          link
          fedilink
          arrow-up
          3
          ·
          edit-2
          1 year ago

          Consistency and separation.

          If I need to clear out any caches or temporary files, I don’t need to dig around in a bunch of dot-directories to figure out what’s safe to delete and what’s a configuration file. I can wholesale rm -rf ~/.cache.

          It’s also convenient for distro hopping or backing up files. If every program kept temporary and transient files in the same directory, you would need filters for each different non-conforming program. For anything conforming to XDG base directory specifications, different types of files are all under well-known directories.

          More subjectively, I hold the opinion that my home directory is mine. Programs shouldn’t be littering the root of my user folder with their crap (looking at you, ~/go).

          All in all, XDG base directories solve a problem that isn’t covered in any other specification. If POSIX defined a similar specification, such as having config files relegated to ~/.local/etc/some-program, I wouldn’t be here.

          • Lung@lemmy.world
            link
            fedilink
            arrow-up
            2
            ·
            1 year ago

            Shit y’know what, fair enough. I never had your particular needs, and I’d probably still have to double check a cache location in case the app didn’t comply, but I feel you