kovidgoyal / kitty

Cross-platform, fast, feature-rich, GPU based terminal
https://sw.kovidgoyal.net/kitty/
GNU General Public License v3.0
24.11k stars 972 forks source link

SSH kitten doesn't play well with Zellij #5900

Closed pkosel closed 1 year ago

pkosel commented 1 year ago

Describe the bug Using the ssh kitten like "alias ssh='kitty +kitten shh'" inside of Zellij causes the ssh connection to hang.

To Reproduce Steps to reproduce the behavior:

  1. Add an alias to your shell: alias ssh='kitty +kitten shh'
  2. Install and start Zellij
  3. Connect to a remote server per ssh
  4. See error

Screenshots If applicable, add screenshots to help explain your problem.

Environment details

kitty 0.26.5 created by Kovid Goyal
Linux bridget 5.15.86 #1-NixOS SMP Sat Dec 31 12:14:48 UTC 2022 x86_64

<<< Welcome to NixOS 23.05pre-git (x86_64) - /dev/tty >>>

Run 'nixos-help' for the NixOS manual.

DISTRIB_CODENAME=stoat
DISTRIB_DESCRIPTION="NixOS 23.05 (Stoat)"
DISTRIB_ID=nixos
DISTRIB_RELEASE="23.05"
LSB_VERSION="23.05 (Stoat)"
Running under: X11
Frozen: False
Paths:
  kitty: /nix/store/4r5zlcrmacc04mg4a4s4j1rrclnlvfmm-kitty-0.26.5/bin/kitty
  base dir: /nix/store/4r5zlcrmacc04mg4a4s4j1rrclnlvfmm-kitty-0.26.5/lib/kitty
  extensions dir: /nix/store/4r5zlcrmacc04mg4a4s4j1rrclnlvfmm-kitty-0.26.5/lib/kitty/kitty
  system shell: /run/current-system/sw/bin/fish
Loaded config files:
  /home/philipp/.config/kitty/kitty.conf

Config options different from defaults:
initial_window_height (540, 'px')
initial_window_width  (960, 'px')
linux_display_server  x11
remember_window_size  False
tab_bar_style         powerline

Important environment variables seen by the kitty process:
    PATH                                /nix/store/4r5zlcrmacc04mg4a4s4j1rrclnlvfmm-kitty-0.26.5/bin:/nix/store/3q6hxl7cxk9cn5s3xm5359w29010yv5h-imagemagick-7.1.0-57/bin:/nix/store/nd9lrc8pqsib5bz9l1i224jgs6ljxykg-ncurses-6.3-p20220507-dev/bin:/run/wrappers/bin:/home/philipp/.nix-profile/bin:/etc/profiles/per-user/philipp/bin:/nix/var/nix/profiles/default/bin:/run/current-system/sw/bin
    LANG                                en_US.UTF-8
    EDITOR                              nano
    SHELL                               /run/current-system/sw/bin/fish
    DISPLAY                             :0
    WAYLAND_DISPLAY                     wayland-0
    USER                                philipp
    XDG_CONFIG_DIRS                     /etc/xdg:/home/philipp/.nix-profile/etc/xdg:/etc/profiles/per-user/philipp/etc/xdg:/nix/var/nix/profiles/default/etc/xdg:/run/current-system/sw/etc/xdg:/nix/store/5krf2l4sbqnkcfkyy1acinx98bz5r7xx-gnome-settings-daemon-43.0/etc/xdg
    XDG_MENU_PREFIX                     gnome-
    LC_MONETARY                         de_DE.UTF-8
    XDG_SESSION_DESKTOP                 gnome
    XDG_SESSION_TYPE                    wayland
    XDG_CURRENT_DESKTOP                 GNOME
    XDG_SESSION_CLASS                   user
    XDG_DESKTOP_PORTAL_DIR              /nix/store/llldg33wwgn64z796c9a93g6qqfm32pj-xdg-portals/share/xdg-desktop-portal/portals
    XDG_RUNTIME_DIR                     /run/user/1000
    LC_TIME                             de_DE.UTF-8
    XDG_DATA_DIRS                       /nix/store/c82lrirsvbnfss7al8fassszbzflcfk4-shared-mime-info-2.2/share:/nix/store/8lvkmz1k8h3llxdf5q4nh6pmwrfhx1cl-gnome-shell-43.2/share:/nix/store/rv6nydaizz3n8s3l3jv6pss0pzxn3yzm-gtk+3-3.24.35/share/gsettings-schemas/gtk+3-3.24.35:/nix/store/ky4x4764dls53cl1ja3884fnf5i9a9vm-gsettings-desktop-schemas-43.0/share/gsettings-schemas/gsettings-desktop-schemas-43.0:/nix/store/llsrq57rbh3fi8x7f8xbsz4cdgavhxa9-gnome-keyring-42.1/share/gsettings-schemas/gnome-keyring-42.1:/nix/store/pq6lkn015dzxpb6776c2s08kmxapwcld-mutter-43.2/share/gsettings-schemas/mutter-43.2:/nix/store/l2bk3i89hjipa3gqppm5p9whli53sl8k-evolution-data-server-3.46.2/share/gsettings-schemas/evolution-data-server-3.46.2:/nix/store/nxb37gpb5rikxrppjd72rc1d3x91w13l-gtk4-4.8.3/share/gsettings-schemas/gtk4-4.8.3:/nix/store/zn3z4zvsc5m1lnb0ahbambqy5w9cypdg-gdm-43.0/share/gsettings-schemas/gdm-43.0:/nix/store/wgdddsmqdbxgxcjni8g4z6c62z6a3gfz-gnome-clocks-43.0/share/gsettings-schemas/gnome-clocks-43.0:/nix/store/r0kddp2gddk562rw2lxh1qpjavfiibmb-ibus-1.5.27/share/gsettings-schemas/ibus-1.5.27:/nix/store/5krf2l4sbqnkcfkyy1acinx98bz5r7xx-gnome-settings-daemon-43.0/share/gsettings-schemas/gnome-settings-daemon-43.0:/nix/store/s1zlac36crk4r7zzm4y5q8k9g3s7mymv-libgweather-4.2.0/share/gsettings-schemas/libgweather-4.2.0:/nix/store/q6b8dpmv4snlr42880xqr9bqbpfrqlhb-libnma-1.10.4/share/gsettings-schemas/libnma-1.10.4:/nix/store/8lvkmz1k8h3llxdf5q4nh6pmwrfhx1cl-gnome-shell-43.2/share/gsettings-schemas/gnome-shell-43.2:/nix/store/7mcp9lr4v05hp5hxap67r2y0877r8nsx-gnome-mimeapps/share:/nix/store/99w8wx4b7pgs80i6nnpgkmzyv31dniln-desktops/share:/home/philipp/.nix-profile/share:/etc/profiles/per-user/philipp/share:/nix/var/nix/profiles/default/share:/run/current-system/sw/share:/nix/store/8lvkmz1k8h3llxdf5q4nh6pmwrfhx1cl-gnome-shell-43.2/share/gsettings-schemas/gnome-shell-43.2:/nix/store/z735s520adqdmwlyc9i5hx5fp2ql6lyf-gnome-shell-extensions-43.1/share/gsettings-schemas/gnome-shell-extensions-43.1:/nix/store/qyivdm9v3s1f0nkgh86br7zywadkl09k-gnome-session-43.0/share:/nix/store/ky4x4764dls53cl1ja3884fnf5i9a9vm-gsettings-desktop-schemas-43.0/share/gsettings-schemas/gsettings-desktop-schemas-43.0:/nix/store/rv6nydaizz3n8s3l3jv6pss0pzxn3yzm-gtk+3-3.24.35/share/gsettings-schemas/gtk+3-3.24.35:/nix/store/5krf2l4sbqnkcfkyy1acinx98bz5r7xx-gnome-settings-daemon-43.0/share/gsettings-schemas/gnome-settings-daemon-43.0:/nix/store/qyivdm9v3s1f0nkgh86br7zywadkl09k-gnome-session-43.0/share/gsettings-schemas/gnome-session-43.0:/nix/store/8lvkmz1k8h3llxdf5q4nh6pmwrfhx1cl-gnome-shell-43.2/share

Additional context Try to reproduce the problem with kitty --config NONE if you cannot then post a minimal kitty.conf that reproduces the problem. If the problem involves interaction with some other terminal program post a minimal config for that program to reproduce the problem as well.

kovidgoyal commented 1 year ago

zellij will likely block the two way communication over the tty the kitten relies on. Get it to stop doing that and you will be fine.

kovidgoyal commented 1 year ago

Oh and just to note the ssh kitten has builtin support for tmux (it turns on tmux passthrough mode and uses it when it detects tmux. Assuming zellij supports something similar you are welcome to submit a PR for it. Though I guess it doesnt. https://github.com/zellij-org/zellij/issues/775