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

OpenTTD should store its configuration information in XDG paths #5385

Closed
DorpsGek opened this issue Dec 8, 2012 · 3 comments
Closed

OpenTTD should store its configuration information in XDG paths #5385

DorpsGek opened this issue Dec 8, 2012 · 3 comments
Labels
flyspray This issue is imported from FlySpray (https://bugs.openttd.org/)

Comments

@DorpsGek
Copy link
Member

DorpsGek commented Dec 8, 2012

Evropi opened the ticket and wrote:

Program configuration settings, whenever possible, should be stored in ~/.config.

If the configuration settings are things that the user should never need to modify directly with, say, a text editor, there is no reason for them to be stored in ~/.openttd.

It clutters the user's Home directory, and distracts from finding files that the user wants to access.

The standard, complete with environment variables can be viewed here: http://standards.freedesktop.org/basedir-spec/basedir-spec-latest.html

A certain 'Terkhen' in OpenTTD's IRC channel claims that these locations can be changed during compilation. I cannot verify this claim.

Reported version: Version?
Operating system: UNIX


This issue was imported from FlySpray: https://bugs.openttd.org/task/5385
@DorpsGek
Copy link
Member Author

DorpsGek commented Dec 8, 2012

Rubidium wrote:

Interestingly the location of the config file is used to determine the default location of savegames and downloaded content. This is done so one can, relatively easily (i.e. without configuration file editing), make a stand alone OpenTTD without it writing to external paths.

The .config directory is not meant for savegames, so the savegames and such have to be in another path and thus the path of savegames has to be stored in the configuration file. As a result the configuration file has to be editted by the user.

Then there is also the question of backward compatability making everything even worse.

So, if we were to use the .config directory we would be violating your premise that it doesn't need to be changed manually. If we do not use it, we would be 'violating' some spec that barely anyone follows looking at my configuration directory. So for now it is better for our users to not follow that specification.


This comment was imported from FlySpray: https://bugs.openttd.org/task/5385#comment11743

@DorpsGek
Copy link
Member Author

DorpsGek commented Dec 8, 2012

Evropi wrote:

Actually, you're meant to save it using the $XDG_DATA_HOME variable, which defaults to ~/.local/share. Some projects have avoided the spec for this reason. But lots of games have had no problem with this. Besides, how often do you download and save savegames and place them in the folder? How often do you edit them directly? I can safely say that 99% of OpenTTD players load files use the in-game file manager to load their .sav files.

Naev wrote a simple shell script to do this: http://blog.naev.org/2012/02/unix-gets-xdg-compliancy/. Note that Naev is still in beta and not 'complete' so they can afford to do this without pissing lots of people off, but if you do this, you will definitely make some people happier by not spamming their home folder with yet another folder. And those people will see your wisdom and if they create their own game, they will use XDG too. It's one step towards the removal of those annoying hidden folders from one's Home folder.


This comment was imported from FlySpray: https://bugs.openttd.org/task/5385#comment11744

@DorpsGek
Copy link
Member Author

Rubidium closed the ticket.

Reason for closing: Implemented

In r25975


This comment was imported from FlySpray: https://bugs.openttd.org/task/5385

@DorpsGek DorpsGek added Core flyspray This issue is imported from FlySpray (https://bugs.openttd.org/) labels Apr 7, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
flyspray This issue is imported from FlySpray (https://bugs.openttd.org/)
Projects
None yet
Development

No branches or pull requests

1 participant