Hidden data directory (GNU Linux)
Hi Devs, Running jExifToolGUI, it creates two directories in the user's home, these directory I think should be "hidden" as standard GNU Linux. That is, preceded by the point.
Thanks!
Davide
Being a Linux user myself, the first versions (<0.99) did exactly this (for jexiftoolgui_data. There was no logs folder then), but it does work differently on Windows. A folder preceded with a . (dot) is simply a very strange folder on Windows. The 2nd thought was to make it hidden on Linux/MacOS and "normal" on Windows. The 3rd thought was to go for one standard approach: Just make it visible for users on all platforms.
And then I also realised my (and your error): It is a program data folder, hence the name jexiftoolgui_data. You never make a program data folder hidden. You make a Preferences folder hidden.
Next to that: I simply want "less experienced" users to see exactly what is written to their home folder (my thought for the 3rd option.)
And w.r.t. logs: This one should not be hidden either. Linux itself does not hide log(s) files and folders either. So I do it according the Unix policies, although they are not 100% the same on all distributions. I do not write to /var/logs (also different on several distributions), but to the user home folder.
The 3rd folder is the Preferences folder. That is always hidden on all platforms: ~/.java/.userPrefs/org/hvdw/jexiftoolgui.
So that one is also according Linux policies.
Please let me know if you think differently (and why)
And btw: There is currently only one Dev :wink:
Hi hvdwolf and firstly thanks for your work! I've seen and understand what you mean. An idea, could be to add into "preferences" the ability to select an own data folder and an own log folder.
What do you think about? I know, it's not a big problem, just a slight annoyance :-D
PS If you like, I still have some ideas to improve the usability/functionality of your (already splendid) application!
Davide
That could indeed be an option. And what is then your idea about placing the data folder and log folder? Note that writing to the log folder structure on Linux requires special rights. This is exactly what I want to prevent using an all-platform, portable java app. And I absolutely don' t want to use admin rights for installation on windows. Secondly there is the difference in the linux distributions between system logging and systemd logging. And where do you want to place the data folder? Or do you want to make it hidden for yourself?
I like to hear ideas. Some user ideas already improved the application. But I don' t promise anything :wink: Note also that some requests can take time before they are implemented: either because they are complicated or I don' t consider them high-prio (the request to be able to provide image files on the command-line is an old one, but I only implemented that in the coming release as I don' t consider it a necessity for a Gui application. You have command-line tools for that like the excellent exiftool)
I consider both jexiftoolgui_data and logs to be junk that have no business showing up in my home directory.
And, honestly, I think you're overthinking it a bit. Both Linux and Windows have established conventions for where to put things, without requiring admin rights. Please follow them. And if you're afraid users won't be able to find something, just put shortcuts in the UI.
Windows
https://learn.microsoft.com/en-us/windows/win32/shell/known-folders
These are probably the ones you want:
%APPDATA% (usually C:\Users\username\AppData\Roaming)
%LOCALAPPDATA% (usually C:\Users\username\AppData\Local)
Either of these two for configuration, but probably Roaming. Local for logs and cache.
%TEMP% (usually C:\Users\username\AppData\Local\Temp)
Cache and perhaps logs. May be cleaned, so don't put anything that needs to be available long term.
%ProgramData% (usually C:\ProgramData)
Data that isn't user specific.
List of all folders, with descriptions: https://learn.microsoft.com/en-us/windows/win32/shell/csidl
Linux
Linux has the XDG Base Directory specification, which pretty much all distributions support these days. And if not, just use the defaults. https://wiki.archlinux.org/title/XDG_Base_Directory
No specific logs dir, but $XDG_CACHE_HOME seems to be a common choice.
Yes, you are right. We are talking about program data and logs, and (image) cache though. config is already following the platform standards for java. When starting "all this" it was simple using the java "user.home" and put the same foldernames to it for every platform. Following the platform policies, it means I have two write "if .. then .. else" or separate functions/methods for the several platforms with extra checks. And a misunderstanding from me was the request for "to select own data and log folder". I thought the user also wanted to be able to use system logs and the like. I guess that was "the overthinking" you are referring to.
Anyway: It was simply never high on my list, and hardly nothing was done to the code anyway last 6-8 months.