Closed goodmind closed 9 years ago
Can you briefly clarify what we are not doing and how we should do it?
Hello,
Place user config directory of Arduino IDE (~/.arduino15
) in folder that defined by $XDG_CONFIG_HOME
or ~/.config
(~/.config/arduino15
)
Thank for you suggestion. However, I'm closing this as wontfix. Many apps store their conf in folders other from .config
. We won't change an old feature such as using ~/.arduino15
, even if not compliant with freedesktop standards
I guess migrating to ~/.config might be useful at some point (perhaps also putting toolchains etc. in ~/.local/lib or so), but it's tricky to get the upgrade path right I'm afraid.
But also many apps use ~/.config
@matthijskooijman Is it that hard?
You can always set ~/.arduino15
as a fallback. No need to deprecate it.
In $CURRENT_CENTURY
there is very little justification for "nah, I dunno what this XDG business is but other random programs don't follow it so we won't either". The fact that ~/.arduino15
contains more than strictly configuration data makes it all the more troublesome. Given the number of thumbs-down votes on @ffissore 's closing the issue with no argument as to why users' preferences shouldn't be respected when there is zero technical downside to doing so, I get the impression I'm not the only one who feels this way.
Would the maintainers reconsider this position? I'd be happy to enter into a discussion if there is any uncertainty about the benefits this would provide to users and also possibly willing to contribute a patch as well.
@matthijskooijman :
I guess migrating to ~/.config might be useful at some point (perhaps also putting toolchains etc. in ~/.local/lib or so), but it's tricky to get the upgrade path right I'm afraid.
It really isn't. Countless applications have done so with seamless backwards compatibility for users expecting their files to be in the previous location. No user intervention, disruption, or even awareness is required, which is a distinct benefit written into XDG spec itself.
And, look, @Perlovka has written a patch! https://github.com/arduino/Arduino/issues/7651#issuecomment-538007411
@cmaglie, @facchinm, I think it might be good to reconsider this issue, maybe at least reopen it to indicate it should be done at some point. Since this update can be done fairly gracefully, it could just be implemented, or we could consider waiting for 1.9 or even 2.0 (alternatively, we could implement this now, and then in 2.0 do an active migration moving files out of ~/.arduino15
).
Looks like there is a patch already (haven't looked at the patch yet). The upgrade path seems to be to use the old directory if it exists, or start using the new standards-compliant paths otherwise.
One migration issue that should also be fixed is that of documentation. The are probably docs that point to ~/.arduino15, which need to be updated. Of course a lot of these are on webpages outside of our control, but I guess they need to update themselves once this is released.
Maybe this is also a good moment to drop the "15" suffix from the config dir (e.g. use ~/.config/arduino
)? And probably also fix the related arduino/arduino-cli#2115.
@mastrolinux @cmaglie can we discuss a bit @matthijskooijman 's proposal ?
Doing this makes sense. I would say lets use @Perlovka's patch but I'm not sure about leaving the file as arduino15, though, I must admit not knowing the exact reason it was called that in the first place.
For flatpak users it is possible to do
$ flatpak override --nofilesystem=home cc.arduino.arduinoide
$ flatpak override --persist=Arduino cc.arduino.arduinoide # Where you store your files
$ flatpak override --persist=.arduino15 cc.arduino.arduinoide
To get rid of HOME
pollution.
This decision should be revisited because it was made five years ago and now is even more outdated than it was back then.
@per1234 says in arduino/Arduino#10486:
If anyone has unique and productive information to add, they should do so in that issue and the developers can make the decision as to whether it is worth reopening. Fragmenting the discussion across multiple duplicate issue reports is unproductive.
I would argue that the discussion here already contains a fairly complete case for fixing this. There's really nothing more to add other than watching more and more people clicking :+1: on the issue because they're frustrated and clicking :-1: on the flippant comment which justified its closure in the first place.
There really isn't any argument against fixing this, it's clearly the right thing to do. At this point I'd say many of us feel that the onus is now on the maintainers to explain why this doesn't even seem to merit reopening.
For flatpak users it is possible to do
$ flatpak override --nofilesystem=home cc.arduino.arduinoide $ flatpak override --persist=Arduino cc.arduino.arduinoide # Where you store your files $ flatpak override --persist=.arduino15 cc.arduino.arduinoide
To get rid of
HOME
pollution.
@A6GibKm I appreciate and thank you so much for this. I really appreciate people like you and awesome software like Flatpak for fixing developers' lazy work.
Although keep in mind that this will make the IDE completely restricted, so you will have to import and save files inside $FLATPAK_APP_ID
, which will be really annoying. I'd advise also running:
flatpak override --filesystem=xdg-desktop --filesystem=xdg-documents --filesystem=xdg-downloads --filesystem=xdg-pictures cc.arduino.arduinoide
to allow saving and importing to/from ~/Desktop
, ~/Documents
, ~/Downloads
and ~/Pictures
. (Maybe --filesystem=xdg-pictures
might be completely useless.)
EDIT: I noticed that you are the maintainer of the Arduino Flatpak. It would be awesome if you can remove --filesystem=home
and allow the directories mentioned above. Most people would be using ~/Documents
to store their Arduino files anyway (right?).
I don't mind submitting an MR. It's just so annoying to have two files (one is acceptable, but two!? WHY?) lurking in your $HOME
.
I think this should be revisited, as now the XDG Base Directory Spec is widely adopted and Arduino should support it, too.
Edit: In fact, it is the only application I use that refuses to follow the spec.
For every program I use that doesn't follow XDG standard I use a wrapper. So I create XDG_FAKEHOME_DIR that directs to $HOME/.local/data. Then I create a folder there specific to the application. So my wrapper would look like this: HOME=${XDG_FAKEHOME_DIR}/arduino exec /usr/bin/arduino "$@"
But this is NOT working with Arduino! It's still creating folders in my HOME, I do not want 3 folders (arduio15, .java and Arduino) cluttering up my system.
Please fix. Or if someone knows what I need to put in my wrapper.
Hi, folks!
Since my issue (https://github.com/arduino/Arduino/issues/7651) been locked for comments, I would like to share new patch here.
This patch will split default arduino files location to three categories:
Note: libraries path changed from Sketch directory to Data dir.
Two stub functions been added to arduino-core/src/processing/app/Platform.java (in addition to existing getSettingsFolder() ):
public File getDataFolder() throws Exception {
return getSettingsFolder();
}
public File getCacheFolder() throws Exception {
return getSettingsFolder();
}
And for Linux system they are overrided in arduino-core/src/processing/app/linux/Platform.java to return proper locations. All related functions have been changed to use these three functions.
Note: If there is already ~/.arduino15 directory, no changes will be made, it is needed to move this dir elsewhere to use new locations.
Aplying patch should be safe for Win and Mac users, but this is not tested. To achieve same behaviour as for Linux system, three above functions should be overriden in proper Platform.java file.
arduino-cli could be patched as well to use same directories, patch could be found here: https://github.com/arduino/arduino-cli/issues/1538 or in my repo on github.
It is really sad to see this being ignored by the Arduino team like this. Even when you are getting a patch suggestions and over and over again being explained why this is important.
Saying that you don't have the time / have more important things to do is 100% fine.
Saying that this is not valid is just ignorant.
Who died and put the jerks at freedesktop in charge anyway? The change is not needed.
@tworthington This change is very needed for Linux on the Desktop to be a nice option, rather than just a tolerable one. I'd suggest you'd appeal to something more constructive than jokes about someone dying.
Not following XDG-BD standard breaks declarative distributions, sandboxing and containerization, backups, roaming home folders, intelligent trash/cache cleanups and by contributing to the mess of nondescript dotfolders in $HOME it also worsens system administration in general.
So please, do elaborate how this is "not needed" without saying something egotistical like "I don't have a need for those use-cases."
I would really like to see this initial mistake to save the config in the wrong folder being reconsidered by the developers. Could the developers confirm that they still stand by the original decision to ignore the suggestion since it was made 7yrs ago and we are not even sure the people involved are still around?
It should be easy to implement ( if there is a ~/.arduino15, propose to transfer to . config/.), clearly matters to users and Arduino IDE is one of the few applications left ignoring this standard.
Waiting for dev team to reconsider.
+1
Thank for you suggestion. However, I'm closing this as wontfix. Many apps store their conf in folders other from
.config
. We won't change an old feature such as using~/.arduino15
, even if not compliant with freedesktop standards
You can always leave the old path as backward compatible. It is really not that hard to satisfy XDG standards while keeping backwards compatibility.
Please 🙏
See: http://standards.freedesktop.org/basedir-spec/basedir-spec-latest.html
Additional context
Additional requests