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

Add a way to force usage of ogranisation name on Linux #66

Open
suve opened this issue Feb 18, 2021 · 6 comments
Open

Add a way to force usage of ogranisation name on Linux #66

suve opened this issue Feb 18, 2021 · 6 comments

Comments

@suve
Copy link

suve commented Feb 18, 2021

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.

@soc
Copy link
Collaborator

soc commented Feb 18, 2021

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

@suve
Copy link
Author

suve commented Feb 18, 2021

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
Copy link
Author

suve commented Feb 18, 2021

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)

@soc
Copy link
Collaborator

soc commented Mar 20, 2021

@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.

@aakside
Copy link

aakside commented Sep 19, 2024

Do you discourage generically-named applications (example bundle ID: com.example.contacts) or is there a recommended approach to avoid collisions on Linux with other similarly-named applications (e.g., always attempt to create a unique sub-directory to namespace the app's config/data)?

@soc
Copy link
Collaborator

soc commented Sep 19, 2024

If there were wider ecosystem consensus, this is something to consider integrating in some way, but this library is intended to support existing conventions, not invent its own.

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

3 participants