-
Notifications
You must be signed in to change notification settings - Fork 2.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
bash_profile vs bashrc #173
Comments
I meant to include this snippet from a modern bash manpage:
|
|
.bash_profile is never run on a graphical login in Ubuntu. |
I'm with @bighuggies. logging onto GUI on Ubuntu and derivatives leaves you without bash-it. I tried sourcing it from bashrc but it didn't set the prompt, so I just moved all the relative lines from _profile to rc (for lack of time to debug this). |
Hmm... the decision for @bighuggies, @seefood: any idea why a bash console in the GUI doesn't work? I've used bash-it on Ubuntu Server installs with no problem. |
not without digging the Ubuntu sources or forums to find what was their reasoning. I think it should just be an option. or at least, we should figure out why the prompt is not set when I source _profile from rc. I think the completions and aliases are set ok though. |
.bash_profile is sourced whenever you log in to a login shell (like Ubuntu server). A graphical login doesn't count, hence .bash_profile isn't run. Apparently "~/.profile" is sourced on graphical Ubuntu logins[1], though I haven't tested it. [1]https://help.ubuntu.com/community/EnvironmentVariables#Session-wide_environment_variables |
I know that this is a bit of an old thread however I ended up just splitting out everything from bash-it into a separate " |
Btw I did have a quick test to see what was being sourced on graphical login. I couldn't see the "~/.profile" being sourced. I find this odd as it contradicts the documentation, I wondered if anyone else had seen this behaviour? |
I have symlinked |
According to bash manual: https://www.gnu.org/software/bash/manual/bashref.html#Bash-Startup-Files
I currently use this scenario. |
I'm planning to modify the installer to detect the OS and choose the file to write the config: Mac OS X → .bash_profile Any objections? |
👍 |
Great idea! 👍 |
Also Debian+derivs (Ubuntu, Mint) prefer .bash_profile, I think. |
I use Debian, at home and at work, Unstable and Testing, and in both cases, the scenario is the explained in my previous comment #173 (comment). You can check it viewing the files:
the default config files copied to the home of new created users. If The original idea comes from @tswicegood in this comment #173 (comment) 😅 |
Forgive me if this has been raised and decided, but the issue searchbox did not reveal such...
I'm wondering why this toolkit focuses on wedging into .bash_profile when .bashrc seems to be generally accepted as the starting point for interactive bash sessions?
I follow what I'd gathered to be a generally accepted practice of a trivial bash_profile which exists primarily to invoke .bashrc, whose only other entries are to configure items I'd use from cron or some remote execution tool.
(in fact I carry this a bit further, having a separate .bashrc.interactive or .bashrc.local for the truly local interactive stuff).
I'm busily hacking on my own local branch to refactor for the above, but want to step back and think about how I can give back.
(background: I spend hours logged in as the daemon user for a particular application for administration. I'm hoping this toolkit can help me standardize those admin environments but my prime directive is "First, do no harm" to the app's auto-customized shell environment. I'm leaning toward an installation that requires manual sourcing for that particular environment, but elsewhere, a cleaner merge into existing startup files.)
The text was updated successfully, but these errors were encountered: