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

Follow the XDG Base directory specification for storing data like map files #41

Open
PureTryOut opened this issue Mar 24, 2023 · 10 comments

Comments

@PureTryOut
Copy link
Contributor

Right now osmin makes 2 folders in my home folder, "Maps" and "osmin", while those should really be located in $XDG_DATA_HOME/osmin (or ~/.local/share/osmin if the $XDG_DATA_HOME environment variable isn't set).

You can read the full specification on where to store any kind of program data/config file here or read a shortened version on the Arch Linux wiki.

@janbar
Copy link
Owner

janbar commented Aug 10, 2023

Agree. But the application is intended for the end user, who does not know the XDG standard. Finding its data (gpx files, favorites, styles and maps) could be a nightmare if we store them in hidden path. The simplest is the best without breaking your head.

@PureTryOut
Copy link
Contributor Author

Why would "the end user" need to know where the data is stored anyway? They should have no reason to start looking for it. And if they did, it would be best if all applications stored it in the same fashion, thus following the standard.

@AndyM48
Copy link

AndyM48 commented Oct 3, 2023

Not liking a cluttered home directory, and accepting @janbar's comment, could we have a Setting so that the user could choose the location?

@PureTryOut
Copy link
Contributor Author

(which then defaults to the XDG location please)

@omnivagant
Copy link

omnivagant commented Oct 6, 2023

At least for non-Android. I expected to find map files under ~/.local/share/osmin/.

I would also prefer if the config was at ~/.config/osmin.conf or ~/.config/osmin/osmin.conf, $XDG_CONFIG_HOME. The current ~/.config/io.github.janbar/osmin.conf is quite Androidy (or Java?), no other program I have installed does that to its configuration location.

Having just installed osmin, said the above and opened a couple of issues, I want to add that I so far like the overall UX very much.

@PureTryOut
Copy link
Contributor Author

I don't think ~/.config/io.github.janbar/osmin.conf is actually a problem. It's the "fully-qualified" name and is actually becoming normal on desktop Linux as well due to for example Flatpak using that scheme. For Osmin it might not be much of a problem but in general it is used to prevent conflicts between app names and is very effective at that.

@janbar
Copy link
Owner

janbar commented Jul 20, 2024

From version 1.11.0, I reviewed the location of files owned by osmin.

  • On desktop all files are moved to the folder $HOME/osmin . The old folder ~/Maps is therefore no longer used.
  • On Android, all files are stored in the internal storage. Unfortunately, Maps cannot be accessible due to new security rules of Google (Android >= 12). All others resources are available in the app folder using an USB connection, i.e GPX etc.

@PureTryOut
Copy link
Contributor Author

Well 1 folder in $HOME is better than 2, but even better would still be 0 😅

Again, I wonder why a user would need to access these files outside of the app. And if they really do a better option might be adding a button in the app to open a file manager directly to the location.

@janbar
Copy link
Owner

janbar commented Jul 21, 2024

Yo, this folder is required to allow user to add, change, delete, brief manage ...

  • GPX --> install new or backup the gpx files.
  • maps --> add/remove map databases, built by itself or downloaded from an other provider.
  • voices --> add/remove voices built by itself or downloaded from an other provider.
  • resources/favorites.csv --> to load a bulk of favorites or manage them with a better tool, or backup.
  • resources/*.json --> change the provider for map, tiles, voices, or hillshade

Finally, installing OSMIN in desktop computer does not make sense ! It is an app for navigation, and should be installed in a mobile device, having GPS, compass, and sure a battery. The only use for the desktop installation is to develop it, or perhaps to have a view of maps and GPX tracks, but this is a very limited use.

@PureTryOut
Copy link
Contributor Author

I never said I'd consider installing the application on desktops, I am thinking of mobile. Linux mobile that is.
From this comment I'm assuming you consider Linux (non-Android) support at all only for convenience of developing and thus do not care about following the standards there? That would be a shame, I consider Osmin the best option at the moment for turn-by-turn navigation on mobile Linux.

I get your point that it can be useful for the end-user to access the files, but like I said I consider adding an button to just open the file manager there a better solution. And for importing a GPX file an in-app solution to browse the filesystem to add one could be considered more user-friendly as well. Also, ~/.local/share/osmin is not that hard to find. Wouldn't you consider manually putting files in the right place a use-case for advanced users? They would have no problem finding the right location as long as that location follows known standards.

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

4 participants