Shameless plug: I am the author.

    • PureTryOut
      link
      fedilink
      111 year ago

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

      • @Lifter@discuss.tchncs.de
        link
        fedilink
        11 year 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.

    • @ZeroHora@lemmy.ml
      link
      fedilink
      English
      11 year ago

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

  • @Wispy2891@lemmy.world
    link
    fedilink
    38
    edit-2
    1 year ago

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

    • @xan1242@lemmy.dbzer0.com
      link
      fedilink
      31 year 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…

    • @conorab@lemmy.conorab.com
      link
      fedilink
      31 year 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.

    • Tlaloc_Temporal
      link
      fedilink
      11 year 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.

      • @Wispy2891@lemmy.world
        link
        fedilink
        81 year 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

  • @Telorand@reddthat.com
    link
    fedilink
    281 year ago

    I didn’t know about this (and thankfully, haven’t written anything public). I’ve been trying to fix an install script for an OSS project that doesn’t work on immutable distros, and using the XDG Base Directory specs might just be the panacea I was looking for!

  • @MonkderDritte@feddit.de
    link
    fedilink
    22
    edit-2
    1 year 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

  • dohpaz42
    link
    fedilink
    English
    141 year ago

    Here is a more concise way to achieve the same thing:

    ls -ACd ~/.??*/ | sed -e "s#$HOME/##g"
    
    • palordrolap
      link
      fedilink
      5
      edit-2
      1 year ago

      I think that can be boiled down to only cd; echo .*/

      Maybe throw a ;cd - on the end if the change of directory is unwanted.

  • Mactan
    link
    fedilink
    91 year ago

    there’s no place like 127.0.0.1

    there’s no place like XDG_CONFIG_HOME.

  • wvstolzing
    link
    fedilink
    51 year 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.

  • The Doctor
    link
    fedilink
    English
    51 year ago

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

  • @sfera@beehaw.org
    link
    fedilink
    11 year ago

    Are there abstractions available around the XDG specifications to resolve the proper paths?

    • @MonkderDritte@feddit.de
      link
      fedilink
      7
      edit-2
      1 year 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.
      
      • @sfera@beehaw.org
        link
        fedilink
        11 year 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.

        • @dan@upvote.au
          link
          fedilink
          21 year 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.

  • aard
    link
    fedilink
    01 year 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.

    • Eager Eagle
      link
      fedilink
      English
      81 year ago

      XDG doesn’t apply for CLI apps? About half of dirs I still have cluttering my home are GUI apps whose devs refuse to follow the specification, while I see less friction from CLI/TUI devs, since they’re the ones actually seeing these hidden locations.

      • aard
        link
        fedilink
        01 year ago

        It’s already in the name - XDG stands for X Desktop Group (nowadays freedesktop), which works on interoperability for desktop environments. In a pure shell environment (or even if you’re not running a full desktop) none of the XDG variables are defined, and especially in shell environments the default fallbacks specified by XDG are not necessarily what the operator would expect.

        • @sparr@lemmy.world
          link
          fedilink
          English
          21 year ago

          That name is decades old. XDG stands for “Cross Desktop Group”.

          A “pure” X environment (e.g. startx xterm) also doesn’t define those variables, but many desktop environments do, just like many shell configurations do.

  • davel [he/him]
    link
    fedilink
    English
    -31 year ago

    This would just further complicate things for me. It assumes that 1) the system even has a windowing system/desktop environment or 2) all the installed software is XDG-aware. Most of the time I’m fiddling with headless environments.

    • exu
      link
      fedilink
      English
      251 year ago

      It’s not too hard to check for XDG support first and use a few hardcoded directory paths if that is unavailable.

      • davel [he/him]
        link
        fedilink
        English
        -61 year ago

        It’s even easier to ignore it altogether, which is what I do. I don’t use “a few” non-XDG-aware things; I use lots an lots of them.

        • hallettj
          link
          fedilink
          English
          251 year ago

          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.

          • davel [he/him]
            link
            fedilink
            English
            -81 year ago

            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.

    • hallettj
      link
      fedilink
      English
      241 year ago

      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.

    • Eager Eagle
      link
      fedilink
      English
      11
      edit-2
      1 year ago

      The spec doesn’t make those assumptions at all, idk where that’s coming from.

      I have headless machines with XDG vars configured and ones without them. XDG compliant software works in either case, but I’m less likely to use a piece of software that clutters my $HOME.