---
** [tickets:#64] Imporve tmux emulating virtual console**
**Status:** open
**Created:** Wed Sep 18, 2013 04:09 PM UTC by roucarb
**Last Updated:** Wed Sep 18, 2013 04:09 PM UTC
**Owner:** nobody
Hi,
I use something like this to create virtual console like with tmux, shared
between local and remote access (think about science computation)
if test -z ${TMUX}; then
if tmux has-session -t ${TMUX_SESSION} 2> /dev/null; then
s_id="$(tty)"-"$(date "+%Y%m%d%H%M%N")"
exec tmux new-session -d -s "${s_id}" -t "${TMUX_SESSION}"\;\
new-window \; \
attach-session -t $session_id
else
exec tmux -l new-session -A -s ${TMUX_SESSION}
fi
fi
Will be nice to have some shortcut for some operation:
* create a unique name for the s_id something like the session number (avoiding
the use of the racy $(tty)"-"$(date "+%Y%m%d%H%M%N") ). An option like -S will
be really convinient (preferably not racy)
* tmux new-session -s foo -t fu when no fu session is running fail. Could be
possible to add a flag to say create the session group if not exist like for
instance -T (preferably not racy)
* tmux new-session could be completed by an option -W meaning create a new
window
So the racy and quite complicated command line could be abbreviated to
something like:
test -z ${TMUX} && exec tmux new-session -A -S -W -T ${TMUX_SESSION}
---
Sent from sourceforge.net because tmux-users@lists.sourceforge.net is
subscribed to https://sourceforge.net/p/tmux/tickets/
To unsubscribe from further messages, a project admin can change settings at
https://sourceforge.net/p/tmux/admin/tickets/options. Or, if this is a mailing
list, you can unsubscribe from the mailing list.
------------------------------------------------------------------------------
LIMITED TIME SALE - Full Year of Microsoft Training For Just $49.99!
1,500+ hours of tutorials including VisualStudio 2012, Windows 8, SharePoint
2013, SQL 2012, MVC 4, more. BEST VALUE: New Multi-Library Power Pack includes
Mobile, Cloud, Java, and UX Design. Lowest price ever! Ends 9/20/13.
http://pubads.g.doubleclick.net/gampad/clk?id=58041151&iu=/4140/ostg.clktrk
_______________________________________________
tmux-users mailing list
tmux-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/tmux-users