Shameless plug: I am the author.

    • So yes, “XDG” stands for “Cross-Desktop Group” - but I don’t agree that using the spec assumes a windowing system. The base directory spec involves checking for certain environment variables for guidance on where to put files, and falling back to certain defaults if those variables are not set. It works fine on headless systems, and on systems that are not XDG-aware (I suppose that means systems that don’t set the relevant env vars).

      OTOH as another commenter pointed out the base directory spec can make software work when it otherwise wouldn’t on a system that doesn’t have a typical home directory layout or permissions.

        • Are you saying that you don’t want to write your software according to the XDG spec, or that you don’t want to set the XDG env vars on your system? If it’s the second that’s fine - apps using XDG work just fine if you ignore it. If it’s the first I’d suggest reconsidering because XDG can make things much easier for users of your software who have system setups or preferences that are different from yours; and using XDG doesn’t cause problems for users who ignore it.

          OP’s recommendation is aimed mostly at software authors.

          • I meant the second. But as to the first: I generally write in-house software for headless server environments, and my peers are going to push back if I add irrelevant XDG foo to my PR.

    •  SmokeInFog   ( @SmokeInFog@midwest.social ) 
      link
      fedilink
      English
      12
      edit-2
      2 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.

      🙄

      • 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   ( @SmokeInFog@midwest.social ) 
          link
          fedilink
          English
          3
          edit-2
          2 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
    • 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.

  •  aard   ( @aard@kyu.de ) 
    link
    fedilink
    42 months ago

    Probably half the entries in that list are not GUI apps, and XDG doesn’t apply (though some still support it). For some others there (like emacs) XDG is used if it exists.

      • 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.

        •  dan   ( @dan@upvote.au ) 
          link
          fedilink
          22 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.