directories-rs icon indicating copy to clipboard operation
directories-rs copied to clipboard

Add a way to force usage of ogranisation name on Linux

Open suve opened this issue 5 years ago • 6 comments

Currently, on Linux, the organisation name is ignored, and e.g. ProjectDirs::config_dir() will return simply ~/.config/appname. This may be enough for applications with some very unique names, but when using some more generic words, can lead to conflicts.

I'd like a way to force the lib to use the organisation name on Linux, so I'd get e.g ~/.config/suve/appname instead of just ~/.config/appname.

suve avatar Feb 18 '21 12:02 suve

Hi @suve, are there examples of existing applications doing this?

soc avatar Feb 18 '21 13:02 soc

While I admit I failed to find FLOSS, there's quite a few proprietary programs doing this, e.g.:

  • Jet Brains IDEs, e.g. ~/.config/JetBrains/CLion2020.2.
  • Microsoft Teams puts its data in ~/.config/Microsoft/Microsoft Teams.
  • Aspyr's Linux ports of Steam games, e.g. ~/.local/share/Aspyr/Sid Meier's Civilisation 5
  • Feral Interactive's ports of Steam games, e.g ~/.local/share/feral-interactive/XCOM

suve avatar Feb 18 '21 15:02 suve

Oh, right. How could I forget. The SDL_GetPrefPath() function in the SDL 2.x library does this, so most games based on SDL2 inherit this behaviour. (Source code)

suve avatar Feb 18 '21 16:02 suve

@suve To be honest, these examples all look like terrible porting jobs (i. e. simply copying Microsoft conventions to a platform that isn't Windows) – exactly the outcomes this library is intended to prevent.

soc avatar Mar 20 '21 12:03 soc