Using Homebrew eval or something like export PATH=:
in .bashrc completely breaks the Gnome GUI, including flatpaks like Geary. Commenting out default .bash_profile(GDM?) seems to prevent these overrides. I wonder if others share similar experiences or thoughts on this.
Don’t use tools that alter stuff you aren’t expecting
I’ve used GNOME for years, probably never touched .bashrc
and never had anything break it, but it’d only be edited with nano
if I needed to.
I don’t know what brew is doing in that case but I don’t see an obvious reason to be doing anything with shellenv
there on the assumption that the distro package manager should have handled that?
It makes Homebrew binaries takes precedence on PATH, but I assumed this would never translate to GUI environment. I will need to take a better look on the workings of rc and profile shell files.
Added atomic-desktops, bash
Homebrew is not supported by Fedora particularly, even though it may be one great way to get pretty centralized binaries that are in OCI containers.
I agree that Atomic Desktops are very very breakable if you do wrong things.
~/.bashrc sources the default config from /etc/ and I would be a fan of not using the home bashrc at all.
Added homebrew
PATH is PATH, regardless of whether you are in GUI or console mode.
Its almost never correct to change PATH in .bashrc, put these changes into .bash_profile.
What you did ensured that almost every thing that uses bash will break.
GNOME will invoke user’s default shell as login shell to do some initialization stuff and all processes afterwards in a session will inherit the env variables defined by the login shell.
Maybe you can define the PATH variable conditionally on an interactive shell but not for a login shell, or put the definition in a file that only the interactive shell will read.
Note that while bash reads ~/.bash_profile as a login shell and reads ~/.bashrc as an interactive shell, ~/.bashrc is also sourced by default ~/.bash_profile:
# .bash_profile
# Get the aliases and functions
if [ -f ~/.bashrc ]; then
. ~/.bashrc
fi
So putting PATH in ~/.bashrc is not enough, you also need to comment out this snippet.
There’s a workaround to set it only for interactive terminals. This way things in brew’s path only apply when you open a terminal and don’t interfere with the system.
Thnx. I actually started using Homebrew after reading your discussions about it on the Bluefin issue tracker and on a blog post, where I criminally ignored the part that mentions this .