Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Random letters written to Terminator as I move mouse after closing/detaching from catmux session #14

Open
smihael opened this issue Nov 24, 2021 · 3 comments

Comments

@smihael
Copy link

smihael commented Nov 24, 2021

After running

$HOME/.local/bin/catmux_create_session $(python3 -m catmux.prefix)/share/catmux/example_session.yaml \
  --tmux_config $(python3 -m catmux.prefix)/share/catmux/tmux_default.conf \
  --session_name example_session \
  --overwrite show_layouts=True,replacement_param="new catmux user"

and tmux kill-session or pressing CTRL-b,d, the terminal (terminator, Ubuntu 20.04, with KDE Plasma desktop) gets flooded by seemingly random characters as I move the mouse over the terminator window.

image

This has to be something with combination of catmux and Terminator as I am unable to reproduce this neither with Konsole or gnome-terminal + catmux nor with Terminator and plain tmux.

@fmauch
Copy link
Owner

fmauch commented Nov 27, 2021

Thanks for the report!

I've experienced this kind of behavior in different situations in the past, often involving terminated ssh sessions, so this seems to be something happening in certain situations (I'm using KDE's Konsole on a daily basis).

However, if this is reproducible as you described it, it could be something worth investigating further. Maybe an easy test would be to omit the --tmux-config parameter and see whether it happens without that, as well.

As terminator has not been developed since a long time (as far as I remember), there might be issues with some newer tmux configuration options used in catmux's default config.

@smihael
Copy link
Author

smihael commented Dec 20, 2021

This behavior is reproducible both with and without --tmux_config parameter.

This seems to be mouse mode specific issue - I can reproduce it whenever I open right-click menu for splitting views even with "vanilla tmux" with mouse mode enabled.

Probably this bug report can be closed and reported upstream?

@fmauch
Copy link
Owner

fmauch commented Dec 26, 2021

This seems to be mouse mode specific issue - I can reproduce it whenever I open right-click menu for splitting views even with "vanilla tmux" with mouse mode enabled.

This seems you do indeed have a custom tmux config, that might cause the problem. I wasn't able to reproduce this on both my systems:

  • Ubuntu 20.04, terminator 1.91, tmux 3.0a
  • Archlinux, terminator 2.1.1, tmux 3.2a

So, the issue might be connected to your actual tmux config. Remember, when playing around with tmux configs, that when changing the tmux config you should make sure to start a new tmux process (e.g. by killing all existing tmux sessions), otherwise you might run into config reload issues

For reference, my tmux config, with which I am not able to reproduce the problem:

bind-key -T copy-mode-vi 'v' send-keys -X begin-selection

# Copy selection to clipboard, which can be pasted using Ctrl-v
bind -T copy-mode-vi y send-keys -X copy-pipe-and-cancel 'xclip -in -selection clipboard'
bind -T copy-mode-vi C-S-c send-keys -X copy-pipe-and-cancel 'xclip -in -selection clipboard'

# Copy mouse selection to primary clipboard, which can be pasted using middle button
bind -T copy-mode-vi MouseDragEnd1Pane send-keys -X copy-pipe 'xclip -in -selection primary'



# Get almost perfect use of mouse. Remember to press shift for select and paste
set -g mouse on

# Use CTRL-left/right for word navigation
set-window-option -g xterm-keys on

# Otherwise pressing esc in vim inside tmux lags.
set -s escape-time 0

set-window-option -g window-status-current-style "bg=red"

# Use Alt-arrow keys without prefix key to switch panes
bind -n M-Left select-pane -L
bind -n M-Right select-pane -R
bind -n M-Up select-pane -U
bind -n M-Down select-pane -D

# easily toggle synchronization (mnemonic: e is for echo)
# sends input to all panes in a given window.
bind e setw synchronize-panes on
bind E setw synchronize-panes off
bind-key h select-pane -L
bind-key l select-pane -R
bind-key j select-pane -D
bind-key k select-pane -U
bind-key K confirm-before kill-session

set -g history-limit 500000

# reload config file (change file location to your the tmux.conf you want to use)
bind r source-file ~/.tmux.conf

set -g default-terminal "tmux-256color"
set -ga terminal-overrides ",*256col*:Tc"

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants