Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Consider supporting XDG Base Directory or allowing for a definable directory. #1455

Closed
Earnestly opened this issue Apr 4, 2015 · 6 comments

Comments

@Earnestly
Copy link

In the struggle against dotfiles, a UNIXv2 bug, there have been a few efforts involving creating LD_PRELOAD hacks such as libetc and even FUSE filesystems such as rewritefs to combat the increasing complexity of HOME.

The XDG Base Directory Specification was created by Waldo Bastian to address these issues on the Linux desktop much like OSX and Windows have their own schemes such as Application Data and Local Application Data which has existed since Windows 98. OSX provides HOME/Library (barring /Library and /System/Library which are OSX-only).

Although some people think that only a few support XDG Basedir or that only desktop applications are meant to make use of it, many low level projects such as git, util-linux and jack have since migrated to it along with most major software from blender to chromium.

Other older software also provides mechanisms which allows one to specify an alternative directory such as gdb -nh -x "${XDG_CONFIG_HOME:-$HOME/.config}"/gdb/init or environment variables such as ELINKS_CONFDIR, SLRNHOME, GNUPGHOME, etc.

It would then be very nice if rr could support XDG Basedir (along with keeping legacy HOME/.rr behaviour) or allowing users to specify alternative directories.

Thanks

@rocallahan
Copy link
Collaborator

I'm not really sure how to apply that specification to rr.

@rocallahan
Copy link
Collaborator

You can override the base directory by setting _RR_TRACE_DIR.

@Earnestly
Copy link
Author

Yes, _RR_TRACE_DIR is perfectly fine too. The ultimate result of this specification is really to give users control over where configuration and data is stored in their HOME on Linux systems.

Environment variables which expose this kind of control is fine as well, so long as they're documented somewhere.

This is another issue, but I can't seen to find any documentation for this setting, the doc/rr.html doesn't appear to work on my system. The only other place which mentions it seems to be in src/test/util.sh and src/TraceStream.cc.

Thanks :-)

@Yamakaky
Copy link
Contributor

A default directory following XDG specification would be better!

@rocallahan
Copy link
Collaborator

I'd accept a PR for that as long as the default directory for most users remains $HOME/.rr.

@nickolay
Copy link

nickolay commented Nov 8, 2015

There was a followup 02e7d41 , but even after that the default changed from ~/.rr to $XDG_DATA_HOME/rr, so I updated the wiki: https://github.com/mozilla/rr/wiki/Usage/_compare/dd3b33ffa9db21b3313a2edf9cfa159cbff75cb9...96f9297ebb16ef3d14d855698d3630a1294c3e82

szager-chromium pushed a commit to szager-chromium/rr that referenced this issue Dec 7, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants