Re: tmux lead to terminal suspended animation on FreeBSD 8.1
this is a bug in libevent, you need to either - use libevent 2 - use libevent 1.4 from their git repo (not the released version) - in the tmux 1.4 source, go to configure and remove HAVE_BROKEN_KQUEUE from the FreeBSD section (this will break tmux on FreeBSD older than 7) On Tue, Jan 25, 2011 at 11:26:19AM +0800, alphachi wrote: >After upgrading to 1.4, tmux is often similar suspended animation: mouse >and keyboard are invalid, but if killing the terminal from ssh and using >tmux attach, tmux can continue to use. >Beginning to think the problem is the configuration file, but trying to >use the default configuration file is still the case. >When Suspended animation, the cpu% is normal, the memory is not to 10MB. >This is not a particular case. Our forum's discussing is here: >[1]http://www.freebsdchina.org/forum/topic_51129.html (Chinese) > > [2]http://translate.google.com/translate?u=http%3A%2F%2Fwww.freebsdchina.org%2Fforum%2Ftopic_51129.html&sl=zh-CN&tl=en&hl=&ie=UTF-8 >(English, thanks for Google Translate) >What should we do? Thanks! > > References > >Visible links >1. http://www.freebsdchina.org/forum/topic_51129.html >2. > http://translate.google.com/translate?u=http%3A%2F%2Fwww.freebsdchina.org%2Fforum%2Ftopic_51129.html&sl=zh-CN&tl=en&hl=&ie=UTF-8 > -- > Special Offer-- Download ArcSight Logger for FREE (a $49 USD value)! > Finally, a world-class log management solution at an even better price-free! > Download using promo code Free_Logger_4_Dev2Dev. Offer expires > February 28th, so secure your free ArcSight Logger TODAY! > http://p.sf.net/sfu/arcsight-sfd2d > ___ > tmux-users mailing list > tmux-users@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/tmux-users -- Special Offer-- Download ArcSight Logger for FREE (a $49 USD value)! Finally, a world-class log management solution at an even better price-free! Download using promo code Free_Logger_4_Dev2Dev. Offer expires February 28th, so secure your free ArcSight Logger TODAY! http://p.sf.net/sfu/arcsight-sfd2d ___ tmux-users mailing list tmux-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/tmux-users
Close session on single pane exit?
hi, I'd like to achieve following feature: i'm starting tmux, with single window, 2 panes, with layout like this: +---+-+ | | | | | | | | | | | | +---+-+ in both panes i run some programs, but I'd like to make it work the way that if i'd ever close the right pane, the left pane program would get killed and the session will be ended (there would be no more windows in this session). is it possible in any way? background: mutt in right pane, plus custom program that scans mailboxes and shows list of mailboxes with number of emails - because mutt doesn't have it's own sidebar, and the unofficial sidebar causes problems, and it lags with releases for new versions of mutt. Best regards, depesz -- Linkedin: http://www.linkedin.com/in/depesz / blog: http://www.depesz.com/ jid/gtalk: dep...@depesz.com / aim:depeszhdl / skype:depesz_hdl / gg:6749007 -- Special Offer-- Download ArcSight Logger for FREE (a $49 USD value)! Finally, a world-class log management solution at an even better price-free! Download using promo code Free_Logger_4_Dev2Dev. Offer expires February 28th, so secure your free ArcSight Logger TODAY! http://p.sf.net/sfu/arcsight-sfd2d ___ tmux-users mailing list tmux-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/tmux-users
Re: Close session on single pane exit?
Run eg "top; tmux kill-session -t mutt" in the righthand pane. On Tue, Jan 25, 2011 at 10:48:24AM +0100, hubert depesz lubaczewski wrote: > hi, > I'd like to achieve following feature: > > i'm starting tmux, with single window, 2 panes, with layout like this: > > +---+-+ > | | | > | | | > | | | > | | | > +---+-+ > > in both panes i run some programs, but I'd like to make it work the way > that if i'd ever close the right pane, the left pane program would get > killed and the session will be ended (there would be no more windows in > this session). > > is it possible in any way? > > background: > mutt in right pane, plus custom program that scans mailboxes and shows > list of mailboxes with number of emails - because mutt doesn't have it's > own sidebar, and the unofficial sidebar causes problems, and it lags > with releases for new versions of mutt. > > Best regards, > > depesz > > -- > Linkedin: http://www.linkedin.com/in/depesz / blog: http://www.depesz.com/ > jid/gtalk: dep...@depesz.com / aim:depeszhdl / skype:depesz_hdl / gg:6749007 > > -- > Special Offer-- Download ArcSight Logger for FREE (a $49 USD value)! > Finally, a world-class log management solution at an even better price-free! > Download using promo code Free_Logger_4_Dev2Dev. Offer expires > February 28th, so secure your free ArcSight Logger TODAY! > http://p.sf.net/sfu/arcsight-sfd2d > ___ > tmux-users mailing list > tmux-users@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/tmux-users -- Special Offer-- Download ArcSight Logger for FREE (a $49 USD value)! Finally, a world-class log management solution at an even better price-free! Download using promo code Free_Logger_4_Dev2Dev. Offer expires February 28th, so secure your free ArcSight Logger TODAY! http://p.sf.net/sfu/arcsight-sfd2d ___ tmux-users mailing list tmux-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/tmux-users
Re: Close session on single pane exit?
On Tue, Jan 25, 2011 at 10:17:34AM +, Nicholas Marriott wrote: > Run eg "top; tmux kill-session -t mutt" in the righthand pane. quite simple, thanks. Best regards, depesz -- Linkedin: http://www.linkedin.com/in/depesz / blog: http://www.depesz.com/ jid/gtalk: dep...@depesz.com / aim:depeszhdl / skype:depesz_hdl / gg:6749007 -- Special Offer-- Download ArcSight Logger for FREE (a $49 USD value)! Finally, a world-class log management solution at an even better price-free! Download using promo code Free_Logger_4_Dev2Dev. Offer expires February 28th, so secure your free ArcSight Logger TODAY! http://p.sf.net/sfu/arcsight-sfd2d ___ tmux-users mailing list tmux-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/tmux-users
Maybe you'll find it useful (or some bugs/problems with it?)
hi, i'm using (as headers show) mutt as my mail client. And i'm not using it on my computer, but rather on remote server via ssh. Since ssh connections sometimes die, I tend to run mutt on screen (previously) or tmux (lately). To help me with it, I wrote simple script (attached to this mail), which perhaps you will find useful. when running: tmux-auto-reattach mutt (mutt is only example, it can be used for any other program too, of course). script checks first if there is session that is running mutt (based on name of session). if such session exists, and is detached, instead of launching new copy of mutt - it simply attaches to the previously existing session. if such session doesn't exist, or does, but is already attached - it creates new session to run another copy of mutt (this is to let me have multiple copies of mutt running at the same time). additionally - if there are more than one detached mutt sessions - it shows "nice" menu with list of these sessions to let me choose which one to attach to (or start new session altogether). the only requirements for this script are bash, whiptail (can be changed easily to use dialog instead), grep and wc. as additional comment/question. I noticed that when doing: tmux new-session "some program" tmux runs the "some program" via /bin/sh. can it be changed somehow? I mean - I don't use /bin/sh, and my own $SHELL is /bin/bash, and would very much prefer if tmux used *my* shell, and not some other. I know I can "exec bash -c \".\"" but it just doesn't seem nice. Best regards, depesz -- Linkedin: http://www.linkedin.com/in/depesz / blog: http://www.depesz.com/ jid/gtalk: dep...@depesz.com / aim:depeszhdl / skype:depesz_hdl / gg:6749007 #!/bin/bash # This script is used to automatically run programs in tmux environment. # Upon running it checks if there is previously running, but detached copy # of given program. If there is such session - it is attached, instead of # running new copy. # If there is no detached copy - scripts starts new session for given # program. # If there are many detached sessions for given program - user is presented # with menu to choose which session to attach to. # Optionally user can pass "-s" option to make the script operate under only # 1 session all the time - if the session exists, it will be attached, even # if it's attached somewhere else. show_help_and_exit () { if (( $# > 0 )) then FORMAT="ERROR:\n$1\n\n" printf "$FORMAT" "${@:2:$#}" >&2 fi cat <<_EO_HELP_ Syntax: $0 [-s] [-n session-name] program [arg1] [arg2] [arg3] Where: -s - singleton mode - only 1 session of given name is allowed. If it exists, even when not detached - it will be attached here. -n - name of session to use for this program. If not provided - it will be equal to basename of program binary. program (with args) - what to run in the tmux session Example: $0 mails mutt will start new tmux session named "mails" with executing mutt inside, as long as there are no detached sessions with this name if there is single detached session with "mails" name - it will attach to it if there are multiple detaches sessions - you will be presented with menu of sessions to choose the one you want to attach to (or create new one) $0 -s news slrn will start new session only if there is no "news" session already existing (it's attached/detached state doesn't matter). if such session exists - tmux will attach to it. Since tmux doesn't let you to have multiple sessions with the same name - if such case would be needed (like starting two copies of "$0 mails mutt") subsequent sessions will be named "[session-name]-x", where x will be integer incrementing from 0. Because of above, if you'll have multiple "mails" sessions, their names can be "mails" and "mails-0", but can be even "mails-14" and "mails-60" if you started 62 mails sessions, and then closed all except those two. _EO_HELP_ exit } singleton=0 session_name= while getopts ':hsn:' opt do case "$opt" in s) singleton=1 ;; n) session_name="$OPTARG" ;; h) show_help_and_exit ;; :) show_help_and_exit "Option -%s requires argument!" "$OPTARG" ;; \?) if [[ "$OPTARG" == "?" ]] then show_help_and_exit fi show_help_and_exit "Unknown option -%s" "$OPTARG" ;; esac done shift $(( $OPTIND - 1 )) if [[ "$1" = -- ]] then shift fi if [[ -z "$1" ]] then show_help_and_exit "You didn't provide name of the program to run" fi if [[ -z "$session_name" ]] then session_name="${1##*/}" fi stringified_command_for_tmux="$( printf '%q ' "$@" )" if (( "$singleton" == 1 )) then if tmux has -t "$session_name" > /dev/null 2>&1 then exec tmux attach-session -t "$session_n
Re: Close session on single pane exit?
* hubert depesz lubaczewski [01-25-11 04:50]: > > background: > mutt in right pane, plus custom program that scans mailboxes and shows > list of mailboxes with number of emails - because mutt doesn't have it's > own sidebar, and the unofficial sidebar causes problems, and it lags > with releases for new versions of mutt. > I use mutt 1.5.21 (2010-09-15) compiled by openSUSE w/sidebar patch. You can dl the applied patch from: http://wahoo.no-ip.org/~pat/mutt-1.5.21.sidebar-fix.dif http://wahoo.no-ip.org/~pat/patch-1.5.21.sidebar-aa6aa.txt.bz2 -- Patrick Shanahan Plainfield, Indiana, USAHOG # US1244711 http://wahoo.no-ip.org Photo Album: http://wahoo.no-ip.org/gallery2 Registered Linux User #207535@ http://counter.li.org -- Special Offer-- Download ArcSight Logger for FREE (a $49 USD value)! Finally, a world-class log management solution at an even better price-free! Download using promo code Free_Logger_4_Dev2Dev. Offer expires February 28th, so secure your free ArcSight Logger TODAY! http://p.sf.net/sfu/arcsight-sfd2d ___ tmux-users mailing list tmux-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/tmux-users
Re: tmux config: cannot "bind -t vi-copy C-PPage"
Micah Cowan wrote: > (01/24/2011 02:41 PM), clemens fischer wrote: >> On Tue-2011/01/18-21:47 clemens fischer wrote in >> gmane.comp.terminal-emulators.tmux.user (MID >> ): >> >>> tmux github version from today (the master branch), on Linux >>> 2.6.36.3-spott i686 and rxvt-unicode-256color-9.07-10. >>> >>> I have the following lines in $HOME/.tmux.conf: >>> >>> bind-key -t vi-copy C-PPage page-up bind-key -t vi-copy C-NPage >>> page-down bind-key -t vi-copy C-Up page-up bind-key -t vi-copy >>> C-Down page-down >>> >>> I need them because repeatedly doing PPage doesn't bring me up, >>> I need that prefix "to get higher". Tmux complains: >>> >>> "usage: bind-key [-cnr] [-t key-table] key command [arguments]" >> >> Just wanted to ask: can someone reproduce this? > > If it's the bug I think it is, and especially if it had been working > at one point and then ceased working, then try again with the latest > CVS, should be fixed in cmd-bind-key.c 1.31. Right on the spot where it threw bubbles! Yes, I gladly confirm that those bindings work again. Thank you very much, Micah! clemens -- Special Offer-- Download ArcSight Logger for FREE (a $49 USD value)! Finally, a world-class log management solution at an even better price-free! Download using promo code Free_Logger_4_Dev2Dev. Offer expires February 28th, so secure your free ArcSight Logger TODAY! http://p.sf.net/sfu/arcsight-sfd2d ___ tmux-users mailing list tmux-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/tmux-users
Freezing the input state machine
I've noticed that tmux can be "frozen" by doing something like this: $ echo -e '\e_' This probably shouldn't be much of a surprise given the definition of the state machine used in input.c, and maybe it's considered OK. A quick test show that xterm also has this problem, but VTE (gnome-terminal) doesn't. I wanted to call attention to this in case it is cause for concern. In case it's not clear what is happening when it is "frozen", sending a prefix for certain states will cause the terminal to remain in that state until a termination sequence (usually just anything beginning with ESC) is encountered in the input. The lack of a shell prompt makes it impossible (or not?) to send anything to the input stream to cause a return to the default state. -Kevin -- Special Offer-- Download ArcSight Logger for FREE (a $49 USD value)! Finally, a world-class log management solution at an even better price-free! Download using promo code Free_Logger_4_Dev2Dev. Offer expires February 28th, so secure your free ArcSight Logger TODAY! http://p.sf.net/sfu/arcsight-sfd2d ___ tmux-users mailing list tmux-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/tmux-users
Re: Freezing the input state machine
Well, it doesn't really freeze tmux, it input from one pane. We used to abort the sequence when the buffer was full but now we have INPUT_DISCARD. Could get rid of that but it would need some way to throw a state change back up. You can do it if you like but if not IMO it is enough to say "don't do that then". gnome-terminal is not a good implementation to model behaviour from, how xterm handles it is usually the right way. Cheers On Tue, Jan 25, 2011 at 02:11:00PM -0800, Kevin Goodsell wrote: > I've noticed that tmux can be "frozen" by doing something like this: > > $ echo -e '\e_' > > This probably shouldn't be much of a surprise given the definition of > the state machine used in input.c, and maybe it's considered OK. A > quick test show that xterm also has this problem, but VTE > (gnome-terminal) doesn't. > > I wanted to call attention to this in case it is cause for concern. > > In case it's not clear what is happening when it is "frozen", sending > a prefix for certain states will cause the terminal to remain in that > state until a termination sequence (usually just anything beginning > with ESC) is encountered in the input. The lack of a shell prompt > makes it impossible (or not?) to send anything to the input stream to > cause a return to the default state. > > -Kevin > > -- > Special Offer-- Download ArcSight Logger for FREE (a $49 USD value)! > Finally, a world-class log management solution at an even better price-free! > Download using promo code Free_Logger_4_Dev2Dev. Offer expires > February 28th, so secure your free ArcSight Logger TODAY! > http://p.sf.net/sfu/arcsight-sfd2d > ___ > tmux-users mailing list > tmux-users@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/tmux-users -- Special Offer-- Download ArcSight Logger for FREE (a $49 USD value)! Finally, a world-class log management solution at an even better price-free! Download using promo code Free_Logger_4_Dev2Dev. Offer expires February 28th, so secure your free ArcSight Logger TODAY! http://p.sf.net/sfu/arcsight-sfd2d ___ tmux-users mailing list tmux-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/tmux-users
Re: Freezing the input state machine
Oh and you can also get the pty /dev node from "tmux info" and send a \033 to it :-). On Tue, Jan 25, 2011 at 10:24:57PM +, Nicholas Marriott wrote: > Well, it doesn't really freeze tmux, it input from one pane. > > We used to abort the sequence when the buffer was full but now we have > INPUT_DISCARD. Could get rid of that but it would need some way to throw > a state change back up. You can do it if you like but if not IMO it is > enough to say "don't do that then". > > gnome-terminal is not a good implementation to model behaviour from, how > xterm handles it is usually the right way. > > Cheers > > > On Tue, Jan 25, 2011 at 02:11:00PM -0800, Kevin Goodsell wrote: > > I've noticed that tmux can be "frozen" by doing something like this: > > > > $ echo -e '\e_' > > > > This probably shouldn't be much of a surprise given the definition of > > the state machine used in input.c, and maybe it's considered OK. A > > quick test show that xterm also has this problem, but VTE > > (gnome-terminal) doesn't. > > > > I wanted to call attention to this in case it is cause for concern. > > > > In case it's not clear what is happening when it is "frozen", sending > > a prefix for certain states will cause the terminal to remain in that > > state until a termination sequence (usually just anything beginning > > with ESC) is encountered in the input. The lack of a shell prompt > > makes it impossible (or not?) to send anything to the input stream to > > cause a return to the default state. > > > > -Kevin > > > > -- > > Special Offer-- Download ArcSight Logger for FREE (a $49 USD value)! > > Finally, a world-class log management solution at an even better price-free! > > Download using promo code Free_Logger_4_Dev2Dev. Offer expires > > February 28th, so secure your free ArcSight Logger TODAY! > > http://p.sf.net/sfu/arcsight-sfd2d > > ___ > > tmux-users mailing list > > tmux-users@lists.sourceforge.net > > https://lists.sourceforge.net/lists/listinfo/tmux-users > > -- > Special Offer-- Download ArcSight Logger for FREE (a $49 USD value)! > Finally, a world-class log management solution at an even better price-free! > Download using promo code Free_Logger_4_Dev2Dev. Offer expires > February 28th, so secure your free ArcSight Logger TODAY! > http://p.sf.net/sfu/arcsight-sfd2d > ___ > tmux-users mailing list > tmux-users@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/tmux-users -- Special Offer-- Download ArcSight Logger for FREE (a $49 USD value)! Finally, a world-class log management solution at an even better price-free! Download using promo code Free_Logger_4_Dev2Dev. Offer expires February 28th, so secure your free ArcSight Logger TODAY! http://p.sf.net/sfu/arcsight-sfd2d ___ tmux-users mailing list tmux-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/tmux-users
Re: Freezing the input state machine
You can also type (say) "echo -e '\e\\'" blindly. You're still getting a prompt, it's just being sent to the window title, like everything else. \e\\ (and its equivalent \e]0;) is a pretty special case, though, I doubt there are other sequences that can freeze up the term so solidly. They're special since they have to accept virtually every character that follows as a valid part of the sequence, until they see the expected terminator. With most other sequences, hitting a few random keys is likely to break you out. -mjc On 01/25/2011 02:28 PM, Nicholas Marriott wrote: > Oh and you can also get the pty /dev node from "tmux info" and send a > \033 to it :-). > > > On Tue, Jan 25, 2011 at 10:24:57PM +, Nicholas Marriott wrote: >> Well, it doesn't really freeze tmux, it input from one pane. >> >> We used to abort the sequence when the buffer was full but now we have >> INPUT_DISCARD. Could get rid of that but it would need some way to throw >> a state change back up. You can do it if you like but if not IMO it is >> enough to say "don't do that then". >> >> gnome-terminal is not a good implementation to model behaviour from, how >> xterm handles it is usually the right way. >> >> Cheers >> >> >> On Tue, Jan 25, 2011 at 02:11:00PM -0800, Kevin Goodsell wrote: >>> I've noticed that tmux can be "frozen" by doing something like this: >>> >>> $ echo -e '\e_' >>> >>> This probably shouldn't be much of a surprise given the definition of >>> the state machine used in input.c, and maybe it's considered OK. A >>> quick test show that xterm also has this problem, but VTE >>> (gnome-terminal) doesn't. >>> >>> I wanted to call attention to this in case it is cause for concern. >>> >>> In case it's not clear what is happening when it is "frozen", sending >>> a prefix for certain states will cause the terminal to remain in that >>> state until a termination sequence (usually just anything beginning >>> with ESC) is encountered in the input. The lack of a shell prompt >>> makes it impossible (or not?) to send anything to the input stream to >>> cause a return to the default state. >>> >>> -Kevin >>> >>> -- >>> Special Offer-- Download ArcSight Logger for FREE (a $49 USD value)! >>> Finally, a world-class log management solution at an even better price-free! >>> Download using promo code Free_Logger_4_Dev2Dev. Offer expires >>> February 28th, so secure your free ArcSight Logger TODAY! >>> http://p.sf.net/sfu/arcsight-sfd2d >>> ___ >>> tmux-users mailing list >>> tmux-users@lists.sourceforge.net >>> https://lists.sourceforge.net/lists/listinfo/tmux-users >> >> -- >> Special Offer-- Download ArcSight Logger for FREE (a $49 USD value)! >> Finally, a world-class log management solution at an even better price-free! >> Download using promo code Free_Logger_4_Dev2Dev. Offer expires >> February 28th, so secure your free ArcSight Logger TODAY! >> http://p.sf.net/sfu/arcsight-sfd2d >> ___ >> tmux-users mailing list >> tmux-users@lists.sourceforge.net >> https://lists.sourceforge.net/lists/listinfo/tmux-users > > -- > Special Offer-- Download ArcSight Logger for FREE (a $49 USD value)! > Finally, a world-class log management solution at an even better price-free! > Download using promo code Free_Logger_4_Dev2Dev. Offer expires > February 28th, so secure your free ArcSight Logger TODAY! > http://p.sf.net/sfu/arcsight-sfd2d > ___ > tmux-users mailing list > tmux-users@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/tmux-users -- Micah J. Cowan http://micah.cowan.name/ -- Special Offer-- Download ArcSight Logger for FREE (a $49 USD value)! Finally, a world-class log management solution at an even better price-free! Download using promo code Free_Logger_4_Dev2Dev. Offer expires February 28th, so secure your free ArcSight Logger TODAY! http://p.sf.net/sfu/arcsight-sfd2d ___ tmux-users mailing list tmux-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/tmux-users