Skip to content

KITTY_DATA_START ends up in terminal when you CTRL+C out of an SSH-connection while it's not connected. #6254

Closed
@ptrxyz

Description

@ptrxyz

Describe the bug
If you use the SSH kitten and ctrl+c out of the connection request, KITTY_DATA_START is still send to the terminal and interpreted by the user shell.

To Reproduce
Steps to reproduce the behavior:

  1. Use kitty +kitten ssh 141.52.10.20 (some IP that you can not reach. the goal is to make the request last long enough to canel it)
  2. press CTRL+C while it's trying to connect.
  3. See error: the terminal will show "KITTY_DATA_START" followed by a lot of output ending with "KITTY_DATA_END". The output is treated as user input into the running shell.

Screenshots
Peek 2023-05-08 11-55.webm

Environment details

kitty 0.28.1 created by Kovid Goyal
Linux pedrolin 6.3.1-zen1-1-zen #1 ZEN SMP PREEMPT_DYNAMIC Mon, 01 May 2023 17:42:12 +0000 x86_64
Arch Linux 6.3.1-zen1-1-zen (/dev/tty)

Running under: X11
Frozen: False
Paths:
  kitty: /usr/bin/kitty
  base dir: /usr/lib/kitty
  extensions dir: /usr/lib/kitty/kitty
  system shell: /usr/bin/zsh
Loaded config files:
  /home/ptrxyz/.config/kitty/kitty.conf

Config options different from defaults:
active_tab_title_template {title}{'' if layout_name == 'fat' else ' [' + layout_name + ']'}
bold_font                 JetBrains Mono Medium
bold_italic_font          JetBrains Mono Medium,Italic
disable_ligatures         2
enable_audio_bell         False
font_family               JetBrains Mono Light
font_size                 12.0
input_delay               7
italic_font               JetBrains Mono Light,Italic
modify_font:
    cell_height 100%
window_padding_width      FloatEdges(left=15.0, top=15.0, right=15.0, bottom=15.0)
Colors:
	active_border_color       #b7bdf8   
	active_tab_background     #c6a0f6   
	active_tab_foreground     #181926   
	background                #24273a   
	bell_border_color         #eed49f   
	color0                    #494d64   
	color1                    #ed8796   
	color10                   #a6da95   
	color11                   #eed49f   
	color12                   #8aadf4   
	color13                   #f5bde6   
	color14                   #8bd5ca   
	color15                   #a5adcb   
	color16                   #ff52b7   
	color2                    #a6da95   
	color3                    #eed49f   
	color4                    #8aadf4   
	color5                    #f5bde6   
	color6                    #8bd5ca   
	color7                    #b8c0e0   
	color8                    #5b6078   
	color9                    #ed8796   
	cursor                    #f4dbd6   
	cursor_text_color         #24273a   
	foreground                #cad3f5   
	inactive_border_color     #6e738d   
	inactive_tab_background   #1e2030   
	inactive_tab_foreground   #cad3f5   
	mark1_background          #b7bdf8   
	mark1_foreground          #24273a   
	mark2_background          #c6a0f6   
	mark2_foreground          #24273a   
	mark3_background          #7dc4e4   
	mark3_foreground          #24273a   
	selection_background      #f4dbd6   
	selection_foreground      #24273a   
	tab_bar_background        #181926   
	url_color                 #f4dbd6   

Important environment variables seen by the kitty process:
	PATH                                ./node_modules/.bin:/home/ptrxyz/bin:/home/ptrxyz/.local/bin:/home/ptrxyz/.local/share/pnpm:/usr/local/sbin:/usr/local/bin:/usr/bin:/home/ptrxyz/.dotnet/tools:/usr/lib/jvm/default/bin:/usr/bin/site_perl:/usr/bin/vendor_perl:/usr/bin/core_perl
	LANG                                en_US.UTF-8
	EDITOR                              vim
	SHELL                               /usr/bin/zsh
	DISPLAY                             :0
	USER                                ptrxyz
	LC_MONETARY                         de_DE.UTF-8
	XDG_SEAT                            seat0
	XDG_SESSION_TYPE                    x11
	LC_PAPER                            de_DE.UTF-8
	XDG_SESSION_CLASS                   user
	XDG_VTNR                            1
	XDG_SESSION_ID                      2
	LC_CTYPE                            en_US.UTF-8
	XDG_RUNTIME_DIR                     /run/user/1000
	LC_TIME                             de_DE.UTF-8
	LC_COLLATE                          en_US.UTF-8

Additional context
The problem can be reproduced with kitty --config NONE, as well as with different shells (fish, bash).

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions