It certainly isn't magical, but that's what I use the tabs of a gui-terminal
for.
Currently I use xfce4-terminal, 1 tab for my local machine and 1 tab for my
ssh session to $work.
Ctrl-PgUp and Ctrl-PgDn switch b/t tabs.

I launch my gui terminal from a script when I boot my laptop in the morning
and pass arguments to the terminal to make it initiate the tabs.

I suppose you could launch your local tmux from a script with a while loop
and a confirmation to connect to the remote, something like:

#!/bin/bash
while true; do
  tmux attach; # local; detach tmux to move to next line
  echo "connect to remote? "
  read conf
  if echo "$conf" | grep -qE "$(locale yesexpr)"; then
    ssh remote tmux attach; # remote; detach to move to next line
    continue; # restart the loop to reattach the local tmux
  else
    break; # done for the day
  fi
done

On Thu, Jun 2, 2011 at 11:20 AM, Stephen Prater <steph...@agrussell.com>wrote:

> So, I have an auto-attaching tmux session on my local machine, and an
> auto-attaching tmux-session on my remote machine.  What I would like
> to do is ssh into the remote and have it completely replace the local
> tmux session, so that it doesn't result in a nested session.
>
> Ideally, detaching from the remote session would reattach the local
> session.
>
> Anybody have any ideas for shell incantations or tmux preferences to
> get this to work?
>
>
> ------------------------------------------------------------------------------
> Simplify data backup and recovery for your virtual environment with
> vRanger.
> Installation's a snap, and flexible recovery options mean your data is
> safe,
> secure and there when you need it. Discover what all the cheering's about.
> Get your free trial download today.
> http://p.sf.net/sfu/quest-dev2dev2
> _______________________________________________
> tmux-users mailing list
> tmux-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/tmux-users
>
------------------------------------------------------------------------------
Simplify data backup and recovery for your virtual environment with vRanger.
Installation's a snap, and flexible recovery options mean your data is safe,
secure and there when you need it. Discover what all the cheering's about.
Get your free trial download today. 
http://p.sf.net/sfu/quest-dev2dev2 
_______________________________________________
tmux-users mailing list
tmux-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/tmux-users

Reply via email to