How to prevent tmux from reading .profile/.zprofile/.bash_profile
The initial inquiry
Is it feasible to bypass tmux
is default practices of implementing .[z|bash_]profile
files on every new session, window and also pane?
To put it simply, I would certainly like it to just execute just the pertinent .[zsh|bash]rc
manuscript, i.e. for the new session/window/pane to act like an xterm
or urxvt
, not like a tty
.
Extra especially (edit)
I would love to stay clear of transforming anything to my .*profile
and also .*rc
manuscripts. I'm seeking a means to ask tmux
to open non - login coverings in its new sessions, home windows and also panes by effectively configuring it in .tmux.conf
, in order to maintain the previous ideology of placing just real 'login' guidelines on .*profile
manuscripts, as advised as an example below:
I realize on just how to prevent the concern by hacking as an example .zprofile
as was responsed to , yet the inquiry is of just how to do it from .tmux.conf
Secondary inquiry
Why does tmux
load the .*profile
manuscripts by default, on every session, window and also pane, whereas subshells on any kind of context and also all (or at the very least most) versions of X terminals do not?
Some history details (not always pertinent)
I hardly began making use of tmux
(just periodically, in the meantime), yet I do have an ever before - advancing arrangement, making use of zsh
as my shell of selection, in which .zprofile
anticipates to be called from a tty
and also do pertinent things (like determining to run startx
or otherwise based upon whether it gets on a laptop computer and also the tty number), the .zshrc
manuscript anticipates to be called from any kind of interactive setting and also the .zshenv
manuscript anticipates to be filled whether on an interactive setting or otherwise.
EDIT: Solution (based upon remarks listed below)
Adding the adhering to line to .tmux.conf
bypasses tmux
is practices and also defaults to beginning non - login interactive coverings (zsh in this instance) on new sessions, home windows and also panes:
set-option -g default-command zsh
Related questions