Setting $HOME/Documents/Arduino as systemwide default sketchbook folder #2115
Labels
os: linux
Specific to Linux operating system
topic: code
Related to content of the project itself
type: enhancement
Proposed improvement
I am currently trying to deploy the Arduino IDE to a bunch of Linux machines in a teaching environment. (disclaimer : I am not an Arduino user myself)
I am facing some difficulty with the way the IDE selects the sketchbook folder for a new user. In my tests it is located in
~/Arduino
, and this is consistent with my understanding of the corresponding method in the Platform class for Linux.I suggest it would be interesting to use
$(xdg-user-dir DOCUMENTS)/Arduino
which by default would be~/Documents/Arduino
. I am not proposing xdg-compliance just for the sake of it : in our concrete working environment with both Windows and Linux workstations,~/Documents
(and what is under it) is mounted to a CIFS network share that is accessible from Windows workstations as well, while~
and~/Arduino
cannot be.I tried to tweak the
sketchbook.path
preference in the global defaultpreferences.txt
but it does not seem to support variables like~/Documents/Arduino
or$HOME/Documents/Arduino
.I understand there has already been discussions about xdg directory structure compliance (#3915) and the migration problems a change would cause (arduino/Arduino#7651 (comment)).
So my suggestion is to maybe not make this default behaviour but allow for a
xdg-compliance
preference in the default, globalpreferences.txt
(would be ignored if present in a user's file) that a system administrator could enable. This would make it possible to leave existing installations untouched while progressively adapting things, in a manner consistent with e.g. the linux install script which goes at lengths to use the xdg API.Different but related : what is the rationale for reverting to the default sketchbook folder when the folder set in the preferences does not exist, instead of creating it (as is done for the default path anyway) ?
The text was updated successfully, but these errors were encountered: