ssb-server icon indicating copy to clipboard operation
ssb-server copied to clipboard

Supporting XDG Base Directory Specification

Open ghost opened this issue 8 years ago • 8 comments

Hey everyone,

I've been playing around with ssbc recently, and first of all: Thanks for that wonderful piece of software. 💜

One thing jumped to me: config location was hardcoded to $HOME/.ssb. Would you be interested in supporting the XDG spec?

To be explicit, I'd be willing to make it work myself if need be.

ghost avatar Sep 22 '17 00:09 ghost

I don't think anybody would mind a patch for this :)

arj03 avatar Sep 26 '17 06:09 arj03

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

stale[bot] avatar Nov 01 '18 16:11 stale[bot]

I think the next steps on this would be to:

  • Move ~/.ssb/config to $XDG_CONFIG_HOME, usually ~/.config/ssb/
  • Move ~/.ssb/ to $XDG_DATA_HOME, usually ~/.local/share/ssb/

The only rename would likely be for the config file, maybe ~/.config/ssb/config.json?

christianbundy avatar Nov 13 '18 16:11 christianbundy

I think the only hiccup here is that ssb-config defines only a single path so we'd need to split that into two so that it points to ~/.local/share/ssb while only the config points to ~/.config/ssb/.

christianbundy avatar Dec 03 '18 22:12 christianbundy

i'm :+1: on this: https://github.com/ssbc/ssb-config/pull/26

at the moment, ssb-config uses rc, which gathers up the config from various (non-configurable) sources. i'd be keen if we ditched rc to gather up the config from $XDG_CONFIG_HOME, then pass in $XDG_DATA_HOME as the path for ssb-server (and flume) things, which will hopefully work as i discovered ssb is surprisingly non-configurable with respect to any file paths (there's only a single path config var).

ahdinosaur avatar Feb 04 '19 19:02 ahdinosaur

rc puts the configuration in the traditional places. these are widely understood to be where configuration goes, and many other programs do the same thing. That's the reason rc is unconfigurable - being configurable just means someone can put it in a weird place.

At this point, changing it will have much more impact purely from the cost of the change, that I think it will take quite a bit more effort to fix than this is really worth.

dominictarr avatar Feb 04 '19 21:02 dominictarr

@ahdinosaur does this mean if I set XDG_DATA_HOME to $HOME/.local/share it should just work?

jedahan avatar Dec 09 '19 18:12 jedahan

Is this still relevant? If so, what is blocking it? Is there anything you can do to help move it forward?

stale[bot] avatar Jun 02 '21 17:06 stale[bot]