I would like to know if there is a way to get tmux to behave like screen -D -R so I could say, have the command as a default command in Putty.
These screen switches would force detach of an existing screen session for my user (even if it was still active and logged-in somewhere else) and reattach it to the current session. Also, in the case that no screen session existed, it would create a new one.
I like tmux and can see clear benefits over screen, but the existence of this feature would really seal the deal.
tmux attach doesn't seem to create a new session if there isn't one.
The man page for tmux says:
If no server is started, attach-session (attach) will attempt to start it; this will fail unless sessions are created in the configuration file.
I'm not sure exactly what the section in bold means: I can't find an example of creating a session in the conf file.
Any suggestions?
Thanks.
tmuxcommands which are executed in sequence when the server is first started." -- you could actually haveattachornew-sessionas a line in your.tmux.conf. – sr_ Mar 5 '12 at 13:35new-sessionwould have just happened anyway... – Chris Down Mar 5 '12 at 13:36