janbar / osmin

GPS Navigator On-Road/Off-Road for Android and Linux devices
GNU General Public License v3.0
104 stars 17 forks source link

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

Open PureTryOut opened 1 year ago

PureTryOut commented 1 year ago

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 commented 1 year ago

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 commented 1 year ago

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 commented 1 year ago

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 commented 1 year ago

(which then defaults to the XDG location please)

omnivagant commented 1 year ago

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 commented 4 months ago

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 commented 4 months ago

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

PureTryOut commented 4 months ago

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 commented 4 months ago

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

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 commented 4 months ago

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.