I understand this type of question has been asked
But I'm having a hard time understanding it.
I've got an Ubuntu machine setup so it connects to Jenkins as a slave. On this machine I've edited /etc/bash.bashrc and exported PATH with additional tools.
When I run a terminal (from the GUI) and execute
I see the extra values on PATH.
When I run a sh script (from the GUI) which executes
the extra values are missing.
If the same script is executed via "Startup Applications" the extra values are also missing from PATH.
Since I'm connecting to Jenkins using this approach that's a problem for me. i.e. It means my build jobs fail.
The only 'fix' I've found is to add the values to /etc/environment. When placed here the extra entries on the PATH appear in both scenarios.
But... only after the user logs back in/restarts. Which is not ideal.
How can I configure the machine so the extra entries are add to path for all scenarios?
FYI: I'm using Chef to configure the machine so it'll need to set these variables.