By default, the only search path for subroutines is inside the software install (which on Kinetic is on a read-only partition). I’m about to ask a number of people to install custom g-code subroutines to use a touch probe. I could have them also each add a .ini overlay to add an extra search path for subroutines, but it seems like it would be nice to just have a default search path in the home directory to make it easy to install new subroutines (and custom M codes) for everyone.
I think it would be as simple as updating each of the .ini files as per the below diff:
This sounds like a great idea. Having more ways to customize your machine is definitely on our list of improvements we’d like to make. Generally, I like to have a way to interact with those customizations through the UI, which would require a bit more work than simply adding those paths, but I could certainly make a simple change like this if people are up for ssh’ing into their machine or using scp to copy files.
The path to your namespace would look like $HOME/.config/pocketnc/ for config files ($XDG_CONFIG_HOME/pocketnc/), etc. Probably that G-Code should go in $XDG_DATA_HOME/pocketnc or some such.
I can’t say I care too much, although the current user gcode is already stored in /home/pocketnc/ncfiles, and this isn’t exactly a desktop system where using .config would give any specific benefits.
@jpieper, we added your suggested paths with one difference. We put the library path second in the list so that M codes can be overridden. There’s a bit more responsibility on the user to ensure custom M codes aren’t hiding system ones, but it allows you to copy over the system ones and modify them if necessary. It’s in v5.1.2.
@aybabtme, thanks for the suggestion! We could feasibly look for directories in this location, as well, but I agree with @jpieper that this software isn’t meant to be run on a generic system and the home directory is assumed to have user files relevant to Kinetic Control.