question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Allow XDG_CONFIG_HOME on macOS

See original GitHub issue

For many tools, especially those designed for use across Linux/Unix/Mac, it makes sense to use XDG as a common standard. This especially applies to command line tools, for which ~/Library/* breaks inherited convention (and thus breaks interop).

I have previously submitted PRs to resolve this in several applications on macOS, but it would be easier to establish good defaults here instead of sending PRs to patch around it downstream. (This also makes this a blocker for personal usage – at least without vendoring and modifying the module, which isn’t ideal.)

Appdirs issue: https://github.com/ActiveState/appdirs/issues/78

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Reactions:2
  • Comments:33 (16 by maintainers)

github_iconTop GitHub Comments

7reactions
gaborbernatcommented, Jan 2, 2022

This is a contentious topic seems and given there’s no agreement here I’ll need to decline the request to add XDG support on Windows for now.

4reactions
julie777commented, Feb 2, 2022

I am in complete support of using XDG directories on all platforms if defined. I have been working with the XDG spec and trying to adapt it to all platforms in order to make multi-platform development easier.

One of my primary areas of concern is finding a way to determine which python packages can be shared across platforms (pure python) and which need to have distinct directories. XDG talks about using a shared directory structure for a user across multiple platforms and how some directories need to be distinct and some can be shared.

In my case I have a $HOME directory that I am sharing across all platforms and my dot files and .config directory are used for all platforms. In contrast, $HOME/.local/bin is for Linux and $HOME/.local/bin_win is for Windows and set using SDG dirs (Not really because the define the executable directory but don’t provide the variable for it yet. I’m working on it. However for other dirs it works great.)

Read more comments on GitHub >

github_iconTop Results From Across the Web

macos - Equivalents of XDG_CONFIG_HOME and ...
Comparing Apple's documentation for the various paths to the XDG Base Directory specifications approximates to the following locations:.
Read more >
What are the step to move all your dotfiles into XDG directories?
gitconfig to XDG_CONFIG_HOME on OSX. Per the git-config documentation (link omitted due to reputation). Second user-specific configuration file.
Read more >
Location of personal init file (XDG_CONFIG_HOME)
In the case of macOS, the /Users/username/Library/Preferences directory seems to be mainly used for native GUI applications. For command-line ...
Read more >
XDG Base Directory - ArchWiki
Application Legacy Path Supported Since ALSA ~/.asoundrc 577df36 · 1.2.3 Android Studio ~/.AndroidStudioX.X Android Studio 4.1 Anki ~/Anki , ~/Documents/Anki
Read more >
12. Follow XDG-spec I'm so glad to see this included. I don't ...
I don't like $HOME being cluttered with .<app> config directories, but worse than that, far too many when releasing on macOS say Oh...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found