On 06/04/2013 17:10, simfox3 wrote:
> Mariusz,
> Are you starting tmux on shell login (.bashrc/.bash_profile)? Each pane
> in tmux runs as if launched at login--meaning they execute .bash_profile
> / .bashrc. Fortunately, by default, nested tmux sessions are not
> allowed, but wrap your tmux execution in a conditional to prevent the
> pane from even trying to create a nested session.
>
> Last lines from my .bash_profile:
>
> if [[ "$TERM" != "screen-256color" ]]; then
>        exec tmux -S /var/tmux/$USER new-session -A -s "$USER"
> fi
>
> -Saad

Saad, thanks much.

I did change to my file based on yours and now it work perfectly

if [[ $SHLVL != "2" ]]
then
         tmux -S /var/tmux/$USER new-session -A -s "$USER"
fi

Although i think SHLVL will do make more use for me, i am setting 
TERM=screen-256color for nontmux connections (like from my desktop where 
i already have tmux running on gnome-terminal)


------------------------------------------------------------------------------
How ServiceNow helps IT people transform IT departments:
1. A cloud service to automate IT design, transition and operations
2. Dashboards that offer high-level views of enterprise services
3. A single system of record for all IT processes
http://p.sf.net/sfu/servicenow-d2d-j
_______________________________________________
tmux-users mailing list
tmux-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/tmux-users

Reply via email to