News for hackers. Stuff that matters.
Re:Show HN: Restore tmux environment after a system restart by ixtli on Saturday August 30, 2014 @11:57AM (#8246742)
Great! Now can someone tell me how to configure tmux so that I can have two connected term emulators use multiple virtual consoles in one session? Screen allows you to do this and I've been searching for a way to get tmux to behave the same way.

(In fact, I've had a real problem getting tmux to behave well at all when multiple term emulators are connected to the same session. I've had weird window resizing problems.)

Re:Show HN: Restore tmux environment after a system restart by pyre on Saturday August 30, 2014 @12:15PM (#8246792)
Shameless plug: https://github.com/bsandrow/tmux.sh

I wrote that in response to the last thread complaining about said feature came up.

Re:Show HN: Restore tmux environment after a system restart by ixtli on Saturday August 30, 2014 @01:04PM (#8246917)
well done. i'll have a go at making byobu execute this script instead of tmux itself to see if that fixes things.
Re:Show HN: Restore tmux environment after a system restart by AceJohnny2 on Saturday August 30, 2014 @01:56PM (#8247070)
If I undertstand you correctly:

tmux new-session -t <existing_session_name>

(Do a "tmux ls" to see existing sessions)

The one problem with this approach is that each session created this way (i.e. one that "attaches" to an existing session) actually creates a new "mirror" (?) session that will eventually clutter up your list of existing sessions.

My workaround is to create an initial named session (tmux new-session -s name), then attach to that named session. I never use "tmux ls" :p

You may also want to add "set-window-option -g aggressive-resize on" to your .tmux.conf (or prepend with "tmux" and run it in an existing session). To quote the manpage: "will resize the window to the size of the smallest session for which it is the current window, rather than the smallest session to which it is attached".

Re:Show HN: Restore tmux environment after a system restart by low_key on Saturday August 30, 2014 @12:01PM (#8246755)
From the 2nd, 3rd, etc terminal you can see the list of sessions with 'tmux ls'. After that, attach to one of them with 'tmux a -t [session-number]'.
Re:Show HN: Restore tmux environment after a system restart by rich90usa on Saturday August 30, 2014 @12:01PM (#8246754)
One workaround is to detach the other sessions when you connect.

tmux a -d

Re:Show HN: Restore tmux environment after a system restart by ixtli on Saturday August 30, 2014 @12:07PM (#8246771)
The bottom of this page seems to deal with this issue: http://mutelight.org/practical-tmux