I am writing a python/pygtk application that is adding some custom scripts (bash) in a certain folder in $HOME (eg. ~/.custom_scripts).
I want to make that folder available in $PATH. So every time the python app is adding the script, that script could be instantly available when the user is opening a terminal (eg. gnome-terminal).
Where do you suggest to "inject" that $PATH dependecy ? .bashrc, /etc/profile.d, etc. ?
What advantages / disadvantages I might encounter ?
For example if i add a script to export the new path in /etc/profile.d, the path is not being updated until I re-login.
Thanks
.profile would be a reasonable place if it's a per-user install; /etc/profile.d for system-wide installs. (You'll need root to do that, of course.)
Your installer won't be able to change the path of the current shell (unless it's being run via source, which would be...odd.)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With