Shameless plug: I am the author.

  • @[email protected]
    link
    fedilink
    -204 months ago

    But what’s the difference? It’ll be in /home anyways and I heard BSD had some issues with something that could be XDG.

    • @[email protected]
      link
      fedilink
      English
      34 months ago

      To give one example, what if someone wants to have more than one set of options for the same app? That’s something I’ve needed before, and it’s really hard to accomplish if the app always looks in one specific place for its options.

      • @[email protected]
        link
        fedilink
        24 months ago

        Oh so it makes it impossible to change config path? Yea that’s a bit inconvenient but you always can just make many files and replace the file in the right directory with the one you want.

        • @[email protected]
          link
          fedilink
          English
          34 months ago

          Not if you want to use both at the same time. Due example, I’ve wanted to have a local Gnome session that I leave signed in, and another session with different settings that I remote into.

    • @[email protected]
      link
      fedilink
      English
      304 months ago

      For me personally I just hate that I do not know where to find configs, especially when using a dotfiles repo, it becomes harder than if they’re all available under a common path.

    • @[email protected]
      link
      fedilink
      284 months ago

      Better organization and backup / restore. For example if you want to restore config files but don’t want to move over the large “.local” folder, applications that write to $HOME will create diifculty.

    • @[email protected]
      link
      fedilink
      224 months ago

      Because, like /etc, you know there is a designated place for config files. It’s already set for you right there, and there is a standard for it.

      • @[email protected]
        link
        fedilink
        -84 months ago

        /etc can’t be edited on immutable distros and usually apps store the editable config in /home/config and make the /etc one kind of read-only.

        • @[email protected]
          link
          fedilink
          12
          edit-2
          4 months ago

          /etc can’t be edited on immutable distros

          False on at least Fedora Atomic[1], NixOS[2] and openSUSE Aeon[3]

          Which ‘immutable’ distros are you referring to?


          1. On Fedora Atomic, changing /etc is literally identical to how it goes any other distro; or at least 1-to-1 as on traditional Fedora. The bonus is that a pristine copy of the original /etc is kept inside a sub-directory of /usr. Furthermore, all changes compared to the pristine copy are kept track of.
          2. On NixOS, changes have to be applied through configuration.nix. Though, regardless, it’s effectively possible to edit and populate /etc like it is on other distros.
          3. It’s explicitly mentioned that /etc does not belong to the immutable base.
          • @[email protected]
            link
            fedilink
            -6
            edit-2
            4 months ago

            Fedora Atomic allowed it recently afaik. I’m always forgetting this. And NixOS is not immutable because of R/W FS.

            • @[email protected]
              link
              fedilink
              44 months ago

              No sorry, Fedora Atomic has allowed changes to /etc since at least 2019. Regarding NixOS, the consensus is that it’s an immutable distro. The immutability of /nix/store/ suffices for this.

              Your notion on Fedora Atomic was false. So, what other ‘immutable’ distro did you have in mind when making that comment?

              • @[email protected]
                link
                fedilink
                -4
                edit-2
                4 months ago

                Please stop harassing me. And idk. I saw that issue but at this point I think it was just misinformation.

                • @[email protected]
                  link
                  fedilink
                  74 months ago

                  Thank you for your honesty! I only intend for the truth to prevail and/or to reach mutual understanding. So please don’t feel attacked. If somehow I came off as such, my apologies; that has never been my intent.

      • @[email protected]
        link
        fedilink
        -2
        edit-2
        4 months ago

        /etc is a standard, defined in the filesystem hierarchy standard. This is not:

        freedesktop.org produces specifications for interoperability, but we are not an official standards body. There is no requirement for projects to implement all of these specifications, nor certification.

        Below are some of the specifications we have produced, many under the banner of ‘XDG’, which stands for the Cross-Desktop Group.

        Its nit-picking, but this is a specification, i.e a preference, not an official standard. It would be great if everyone would agree on just one of these to use, but that isn’t a foregone conclusion. Even the actual standard, the FHS, isn’t followed by popular OS’s like NixOS.

          • @[email protected]
            link
            fedilink
            -3
            edit-2
            4 months ago

            All specifications exist for a reason, and they all have a clear purpose.

            What happens when you have 15 that are different and all overlap? When any of 15 is “right?”

            • @[email protected]
              link
              fedilink
              English
              14 months ago

              I’ve only ever heard of FHS or XDG. Due to the free nature of linux distros, there is no central authority on how they are to be set up, and so there is no difference between those two options in terms of authority. Standards (which XDG is, colloquially) are followed based on popularity.

              • @[email protected]
                link
                fedilink
                24 months ago

                Yeah, I fully get that. The post and comments were very specific about how if you dont follow XDG, you’re fucking up, while only generally saying that “everything would be better if everyone followed the same standard.”

                I pointed out that there are several standards and asked for a unique reason why XDG was the best to use.

                I still haven’t heard one, which is fine, but it undermines the “If youre not using, XDG youre a idiot” tone of the post and comments.

                • @[email protected]
                  link
                  fedilink
                  English
                  14 months ago

                  I think the logic is that it’s the most used, so to avoid seriously competing standards, it’s better to stick with it.

    • SmokeInFog
      link
      fedilink
      English
      16
      edit-2
      4 months ago

      But what’s the difference?

      I can only imagine someone asking this if they a) don’t use the terminal except if Stackexchange says they should and b) have yet to try and cleanup a system that’s acquired cruft over a few years. If you don’t care about it, then let me flip that around and ask why you care if people use XDG? The people who care about it are the people in the spaces that concern it.

      Off the top of my head this matters because:

      • it’s less clutter, especially if you’re browsing your system from terminal
      • it’s a single, specified place for user specific configs, session cache, application assets, etc. Why wouldn’t such important foundational things required for running apps not be in a well defined specification? Why just dump it gracelessly in the user’s root folder outside of pure sloppy laziness?
      • it makes uninstalling apps easier
      • it makes maintenance easier
      • it makes installing on new machines easier

      It’ll be in /home anyways and I heard BSD had some issues with something that could be XDG.

      🙄

        • SmokeInFog
          link
          fedilink
          English
          2
          edit-2
          4 months ago

          It’s weird to me that you think I think that. I do primarily browse files by terminal, but not always. Before I got into heavy terminal use I was a power user of Nemo. In any case, dumping everything in /home does not make for a better gui file browsing experience, either

          • @[email protected]
            link
            fedilink
            14 months ago

            The implication seemed to be “if you don’t care exactly where all your files are you must not use terminal”. Which I still don’t get. Just about anyone who would even be in a community like this uses terminal a lot anyway.

      • @[email protected]
        link
        fedilink
        7
        edit-2
        4 months ago

        Someone asking a question doesnt merit the insult of saying they “would never ask if they used a terminal.” I have no particular dog in this fight, but not being a dick isn’t that hard.

        As to using this standard, just because this is your preferred standard, doesnt mean its the only standard.

        It may actually be the best now, but so were the 14 others that came before it. Your stated reasons are the same reasons as everyone agreeing to use any other standard. Consistency, predictability, automation,ease of backup/restore, etc.

        What sets this standard apart from all the rest? Based on their own description, they aren’t even an official standard, just one in “very active” use.

        So why this, specifically? Just because its what you’re already doing?

        • SmokeInFog
          link
          fedilink
          English
          5
          edit-2
          4 months ago

          Someone asking a question doesnt merit the insult of saying they “would never ask if they used a terminal.” I have no particular dog in this fight, but not being a dick isn’t that hard.

          This is true, and something that I’m working on. For some reason my brain is uncharitable in these situations and I interpret it not as a simple question but a sarcastically hostile put down in the form of a question. In this case, “Why would you be dumb and not just put things in /home”. That really is a silly interpretation of the OP question, so I apologize.

          As to using this standard, just because this is your preferred standard, doesnt mean its the only standard.

          Sure, but the OP was essentially asking “Why isn’t dumping everything into a user’s /home the standard? Why are you advocating for something different?”

          Based on their own description, they aren’t even an official standard, just one in “very active” use.

          There are a LOT of “unofficial standards” that are very impactful. System D can be considered among those. The page you link to does talk about a lot of specifications, but it also says that a lot of them are already under the XDG specification or the reason for XDG is to bring such a scheme under a single specification, i.e. XDG.

          So why this, specifically? Just because its what you’re already doing?

          • yes I do use it, so I am definitely biased in that regard
          • it bring a bunch of disparate mostly abandoned specification into a single, active one
          • it’s the active specification that has learned from past attempts
  • wvstolzing
    link
    fedilink
    54 months ago

    vim now has an option to put the .vim folder in ~/.config; though I’m not sure if the default plugin/package & syntax folders can be set under ~/.local/share.

    • @[email protected]
      link
      fedilink
      14 months ago

      You can also just use neovim instead, among other improvements, it’s configs are in the xdg dirs

  • @[email protected]
    link
    fedilink
    22
    edit-2
    4 months ago

    Where did i read this… basically, the .file being hidden being a bug in the early unix filesystem, which got misused to hide configuration files.

    Offenders despite XDG-variables set and with no workaround:

    • .android: hardcoded in adb and i guess something in mtp too
    • .pki: some tool/library Firefox and Chromium sometimes use.
    • .steam: yes, that

    Btw, https://wiki.archlinux.org/title/XDG_Base_Directory

    • @[email protected]
      link
      fedilink
      7
      edit-2
      4 months ago

      What language? Python has PyXDG.

      In shell it’s simply

      XDG_DATA_HOME="${XDG_DATA_HOME:-"$HOME"/.local/share}"
      XDG_CONFIG_HOME="${XDG_CONFIG_HOME:-"$HOME"/.config}"
      etc.
      
      • @[email protected]
        link
        fedilink
        14 months ago

        I do. But you might have misunderstood my question. I was not asking for assistance. I was just curious if there are libraries available which allow easy adoption of the XDG specification. I imagine that such abstractions would be useful for multi-platform software and generally to lower the bar for adoption.

        • @[email protected]
          link
          fedilink
          24 months ago

          Depends on the programming language. In C# for example, there’s an API to get special folder paths that works in all supported environments (Windows, Linux, MacOS, Android, and I think iOS too). On Linux, it includes fallbacks in case the environment variables aren’t set.

    • PureTryOut
      link
      fedilink
      114 months ago

      Strange that some apps allow configuring it rather than just doing it automatically…

      • @[email protected]
        link
        fedilink
        14 months ago

        That’s the usual open source way. The config probably came later so they just added the option without changing the default because that would break backward compatibility.

        And there would be too much boring work to build a migration.

    • @[email protected]
      link
      fedilink
      English
      14 months ago

      After running it and properly configure the paths I once again came to the conclusion: I fucking hate Google.

  • dinckel
    link
    fedilink
    1174 months ago

    Golang puts shit specifically in $HOME/go. Not even .go. Just plain go.

    Why is it so difficult to follow industry standards

        • @[email protected]
          link
          fedilink
          104 months ago

          It makes it insofar better to me that you have the option to change it. You can’t change Mozilla programs to use anything but .mozilla (apart from modifying the source code of course) so for me seeing the folder is at least a way of telling me that the variable is unset.

          The better question is which folder is suited the best to store the stuff that goes into $GOPATH

          • fmstrat
            link
            fedilink
            English
            74 months ago

            Just because something is worse, doesn’t make the other thing good. A sane and standard default, as others have mentioned, is a small bar to meet.

      • dinckel
        link
        fedilink
        204 months ago

        Of course, but that’s not the point. There should be a sane default, and there isn’t one

    • Eager Eagle
      link
      fedilink
      English
      54 months ago

      off the shelf go was too annoying for me

      Nowadays I set GOENV_ROOT to an XDG location and use goenv instead.

    • @[email protected]
      link
      fedilink
      English
      12
      edit-2
      4 months ago

      Go pisses me off with that. I separate projects the way I want but go wants every project written in go in one big directory?

      • dinckel
        link
        fedilink
        24 months ago

        I really didn’t like this either. It’s quite surprising, because the rest of Go tooling is quite nice. Not having a venv, or at least something like pnpm-style node_modules is weird

        • @[email protected]
          link
          fedilink
          14 months ago

          Why would go have a virtual environment or dep tree like node_modules equivalent, it’s not interpreted or dynamically linked.

          With modules, dependencies can be vendored.

          • dinckel
            link
            fedilink
            14 months ago

            Obviously it’s not, but you have to download all this shit somewhere before compilation. That’s the whole point

      • @[email protected]
        link
        fedilink
        154 months ago

        What I want in $HOME are the following directories:

        If I’m on a GUI-based environment:

        • Desktop
        • Documents
        • Downloads

        In general:

        • .local
        • my_junk_folder_i_made

        I’d like everything else to live within something like ~/.local thanks

        • @[email protected]
          link
          fedilink
          8
          edit-2
          4 months ago

          Maybe Linux should have .local and .roaming folders like Windows. local = only useful on this system, roaming = good to sync across systems. Config would be in .roaming if it’s not machine-specific.

            • @[email protected]
              link
              fedilink
              6
              edit-2
              4 months ago

              There’s some stuff in~/.config that’s specific to the computer. KDE is a good example - a lot of KDE apps mix config and state in the same file. There’s some solutions for syncing these files, like https://github.com/VorpalBlade/chezmoi_modify_manager which is an addon to Chezmoi that can exclude particular keys when storing an INI-style config file in Git.

              I’m sure there’s some config files in there that are entirely specific to the computer. Things like the Wayland per-monitor scaling settings are in there somewhere I think.

              There’s also things like data files that you may want to keep in sync across machines. They’re not really configs.

          • @[email protected]
            link
            fedilink
            English
            64 months ago

            The only practical difference between Local and Roaming and LocalLow is that developers randomly pick one and dump your game saves in there.

          • @[email protected]
            link
            fedilink
            14 months ago

            There is a .local folder these days.

            Profile roaming hasn’t been solved aside from NFS mounts. I guess Syncthing might work.

            • @[email protected]
              link
              fedilink
              1
              edit-2
              4 months ago

              I know .local exists - My comment was more about .roaming which would be nice to exist, but doesn’t currently exist.

              Profile roaming hasn’t been solved aside from NFS mounts. I guess Syncthing might work.

              I’m using Chezmoi to sync some dotfiles, scripts, etc. to a Git repo and that seems to work well enough for me. I’m not syncing much yet, though.

  • The Doctor
    link
    fedilink
    English
    54 months ago

    BRB, putting in a PR to make /etc mode 1777 by default.

  • Mactan
    link
    fedilink
    94 months ago

    there’s no place like 127.0.0.1

    there’s no place like XDG_CONFIG_HOME.

  • @[email protected]
    link
    fedilink
    38
    edit-2
    4 months ago

    100% agree and I also despise devs who do this on windows, instead of using %appdata% they’re using c:\users\username\.myappisimportantandtotallydeservesthisdir

    • @[email protected]
      link
      fedilink
      34 months ago

      I think that also causes issues for roaming profiles and folder redirection. If roaming is turned on then everything in the %appdata%\roaming folder is synced to a server. %AppData%\Local is not. So if your app is using %AppData%\Roaming for temporary data then you are causing a whole bunch on unnecessary IO. Same for using Documents since that if often synced.

    • @[email protected]
      link
      fedilink
      34 months ago

      Not to mention - this isn’t necessarily the correct place for Windows anyway. That is exactly why they standardized stuff around Vista.

      Plus - what about apps that store an ungodly amount data in there? Personally, I only keep the OS and basic app data (such as configs and cache) on the partition and nothing else.

      Then something like Minecraft comes along and it’s like “humpty dumpty I’m crapping a lumpty” and stores all its data in “.minecraft” right there in your user directory.

      Then you gotta symlink stuff around and it becomes a mess…

    • Tlaloc_Temporal
      link
      fedilink
      14 months ago

      To be fair here, appdata is technically a hidden folder and there are lots of reasons an app would want it’s data accessable by the user.

      • @[email protected]
        link
        fedilink
        84 months ago

        Yes but then just spam the documents folder like anyone else, don’t hoard the home root for no reason except that is a lazy cross platform port