---
** [tickets:#118] tmux 1.8 sends terminal escape characters which causes term
to beep**
**Status:** open
**Created:** Tue Apr 01, 2014 04:21 PM UTC by Clojurian
**Last Updated:** Tue Apr 01, 2014 04:21 PM UTC
**Owner:** nobody
I'm using tmux 1.8 on Mac OS X 10.8.5 (tmux is compiled with MacPorts, although
I've experienced this problem with other versions such as a pkgsrc-compiled
one).
I find that tmux enters into this state where switching to a window (or
attaching) causes the terminal itself to beep and flash. I've tried setting
TERM to xterm and xterm-256color (where the latter is the default) both on the
native Terminal.app and the XQuartz X11's xterm, and I get the same effect.
When I start a new tmux session, I don't get this result, but tmux itself or
certain windows reach a state such that when I switch to them, my terminal
beeps! Furthermore, sometimes the terminal will beep twice. And also, merely
switching to a window will cause the insertion of control characters - I
believe ^[[O at least once (which I discovered by typing C-v, switching
windows, then switching back). And the text appears needlessly underlined in
one case. Also this seems to cause my shell to print a newline and it may in
fact be the shell that is beeping. Here's the output of cat -v on a typescript
of a tmux attach:
^[[?1034hbash-3.2$ tmux attach^M
^[[?1049h^[(B^[[m^[[?1l^[>^[[H^[[2J^[[?12l^[[?25h^[[?1000l^[[?1006l^[[?1005l^[[c^[[>4;1m^[[?1004h^[]112^G^G^[[?25l^[[1;1Husername@localhost:~$
^[[K^M
username@localhost:~$ ^[[K^M
^[[K^M
^[[K^M
(I've supplied the initial indentation).
It's frustrating that switching between windows causes these beeps, and that
doing so also is causing unexpected output to be written to my terminal
windows! I'd like there to be several layers of defense to prevent something
like this from happening. Also, if there might be any parsing of the shell
prompt or otherwise to try to determine the last cwd, then I don't want to do
that. I'm not sure if that's part of the problem. Also I'd prefer to only
have tmux intervene when I type a genuine prefix key (in my case, C-q). For
example if I'm pressing an arrow key, the terminal will send escape codes; I'd
prefer that tmux just pass those through (I believe the related screen option
is maptimeout 0). Anyhow, here's what my .tmux.conf looks like:
set-option -g prefix C-q
unbind-key C-b
bind-key C-q last-window
set-option -g buffer-limit 64
set-option -g escape-time 0
set-option -g exit-unattached off
set-option -g set-clipboard off
set-option -g assume-paste-time 0
set-option -g bell-action any
set-option -g bell-on-alert on
set-option -g default-shell zsh
set-option -g default-terminal screen-256color
set-option -g detach-on-destroy off
set-option -g destroy-unattached off
set-option -g history-limit 4096
set-option -g message-limit 64
set-option -g mouse-resize-pane on
set-option -g mouse-select-pane on
set-option -g mouse-select-window on
set-option -g renumber-windows off
set-option -g repeat-time 0
set-option -g set-remain-on-exit on
set-option -g set-titles off
set-option -g status on
set-option -g status-interval 0
set-option -g status-justify left
set-option -g status-keys vi
set-option -g status-right " [#F#I #P.#D.#T #W #H #S]"
set-option -g status-right-length 64
set-window-option -g aggressive-resize on
set-window-option -g allow-rename off
set-window-option -g alternate-screen on
set-window-option -g automatic-rename off
set-window-option -g c0-change-trigger 0
set-window-option -g clock-mode-style 24
set-window-option -g mode-keys vi
set-window-option -g mode-mouse on
set-window-option -g remain-on-exit on
set-window-option -g wrap-search off
bind h select-pane -L
bind j select-pane -D
bind k select-pane -U
bind l select-pane -R
bind C-p previous-window
bind C-n next-window
bind -r C-h select-window -t :-
bind -r C-l select-window -t :+
bind -r H resize-pane -L 8
bind -r J resize-pane -D 8
bind -r K resize-pane -U 8
bind -r L resize-pane -R 8
setw -g mode-mouse off
set -g default-terminal "screen-256color"
bind -t vi-copy 'v' begin-selection
bind -t vi-copy 'y' copy-selection
set -g default-command "rea -l /bin/zsh"
bind C-s set-window-option synchronize-panes
---
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.
------------------------------------------------------------------------------
_______________________________________________
tmux-users mailing list
tmux-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/tmux-users