Reputation: 4002
I am writing an application, which needs to save some settings to be persistent between runs (last opened file, user preferences, etc...). Where is a good place to save it on Linux?
Upvotes: 2
Views: 139
Reputation: 49171
According to the latest convention and XDG standards you should use
${HOME}/.config/your-app-name
which ought to be defined in XDG_CONFIG_HOME
environment variable
If you plan to distribute your application with snap then you will be provided with path inside ${HOME}/snap
with SNAP_USER_DATA
environment value.
Upvotes: 3
Reputation: 97130
Depends how you define good, but how about:
${HOME}/.your-app-name
Checking my own home folder, that seems what the likes of Atom, Gimp, Mozilla, SSH, Vim, etc. are doing.
Upvotes: 2