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

edit-in-kitty not found on remote server while using the ssh kitten #5933

Closed AniAggarwal closed 1 year ago

AniAggarwal commented 1 year ago

Describe the bug I am using the ssh kitten to connect to a server (my university's, I do not have sudo permissions). Running the edit-in-kitty command results in a command not found error.

To Reproduce Steps to reproduce the behavior:

  1. kitty +kitten ssh -Y hostname
  2. $ edit-in-kitty
  3. $ edit-in-kitty
    edit-in-kitty: Command not found.

Environment details

kitty 0.26.5 created by Kovid Goyal
Linux ani-xps 5.15.0-58-generic #64-Ubuntu SMP Thu Jan 5 11:43:13 UTC 2023 x86_64
Ubuntu 22.04.1 LTS ani-xps /dev/tty

DISTRIB_ID=Ubuntu
DISTRIB_RELEASE=22.04
DISTRIB_CODENAME=jammy
DISTRIB_DESCRIPTION="Ubuntu 22.04.1 LTS"
Running under: X11
Frozen: True
Paths:
  kitty: /home/ani/.local/kitty.app/bin/kitty
  base dir: /home/ani/.local/kitty.app/lib/kitty
  extensions dir: /home/ani/.local/kitty.app/lib/kitty-extensions
  system shell: /usr/bin/zsh
Loaded config files:
  /etc/xdg/kitty/kitty.conf
  /home/ani/.config/kitty/kitty.conf

Config options different from defaults:
allow_cloning           yes
allow_remote_control    yes
bold_font               Fira Code Bold Nerd Font Complete Mono
bold_italic_font        Fira Code Bold Nerd Font Complete Mono
font_family             Fira Code Regular Nerd Font Complete Mono
font_size               12.0
italic_font             Fira Code Bold Nerd Font Complete Mono
linux_display_server    x11
listen_on               unix:@mykitty
tab_bar_style           powerline
update_check_interval   0.0
Added shortcuts:
    alt+l →  clear_terminal scroll active
    ctrl+enter →  send_text all \x00\r
    ctrl+h →  kitten pass_keys.py neighboring_window left   ctrl+h
    ctrl+j →  kitten pass_keys.py neighboring_window bottom ctrl+j
    ctrl+k →  kitten pass_keys.py neighboring_window top    ctrl+k
    ctrl+l →  kitten pass_keys.py neighboring_window right  ctrl+l
Changed shortcuts:
    kitty_mod+[ →  previous_tab
    kitty_mod+] →  next_tab
    kitty_mod+enter →  launch --cwd=current
    kitty_mod+f →  launch --type=overlay --stdin-source=@screen_scrollback /home/ani/.fzf/bin/fzf --no-sort --no-mouse --exact -i
    kitty_mod+t →  new_tab_with_cwd
Colors:
    active_border_color     #8c00ff   
    background              #282c34   
    color0                  #20232a   
    color1                  #e86671   
    color10                 #98c379   
    color11                 #e0af68   
    color12                 #61afef   
    color13                 #c678dd   
    color14                 #56b6c2   
    color15                 #abb2bf   
    color16                 #d19a66   
    color17                 #f65866   
    color2                  #98c379   
    color3                  #e0af68   
    color4                  #61afef   
    color5                  #c678dd   
    color6                  #56b6c2   
    color7                  #798294   
    color8                  #5c6370   
    color9                  #e86671   
    cursor                  #abb2bf   
    foreground              #abb2bf   
    inactive_border_color   #b0b0b0   
    inactive_tab_background #282c34   
    inactive_tab_foreground #5c6370   
    selection_background    #393f4a   
    selection_foreground    #abb2bf   
    url_color               #98c379   

Important environment variables seen by the kitty process:
    PATH                                /home/ani/.local/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin:/snap/bin
    LANG                                en_US.UTF-8
    SHELL                               /usr/bin/zsh
    DISPLAY                             :1
    USER                                ani
    XDG_SESSION_TYPE                    x11
    XDG_SESSION_CLASS                   user
    XDG_RUNTIME_DIR                     /run/user/1000
    XDG_MENU_PREFIX                     gnome-
    XDG_CURRENT_DESKTOP                 ubuntu:GNOME
    XDG_SESSION_DESKTOP                 ubuntu
    XDG_DATA_DIRS                       /usr/share/ubuntu:/usr/share/gnome:/home/ani/.local/share/flatpak/exports/share:/var/lib/flatpak/exports/share:/usr/local/share/:/usr/share/:/var/lib/snapd/desktop
    XDG_CONFIG_DIRS                     /etc/xdg/xdg-ubuntu:/etc/xdg

Additional context Still receive the same error when using kitty --config NONE. The remote machine I am connected to uses tcsh rather than bash and I am not supposed to change that. Ideally, I would like this to work with minimal changes to the remote machine where possible.

It is entirely possible I am using these tools/commands wrong, just let me know what to change. Thanks in advance!

kovidgoyal commented 1 year ago

Those steps do not reproduce it for me. Make sure your server is using bash, zsh or fish as login shells. And if the version of the shell is truly ancient, it wont work.

AniAggarwal commented 1 year ago

I am on tcsh and am unfortunately not able to change it as it is a university server on which I am required to use tcsh.

Any way to make this work despite that? To be clear, bash, zsh, etc. are installed and accessible on the server but I am not able to figure out how to get edit-in-kitty to work with them.

kovidgoyal commented 1 year ago

Run nightly where edit-in-kitty is now part of the kitten standalone binary. So will work regardless of shell. You just need to run

kitten edit-in-kitty

AniAggarwal commented 1 year ago

Works perfectly, I am very impressed by how well kitty and its features work, even in obscure (and frankly obfuscated in my case) scenarios.

Thanks for the help!

kovidgoyal commented 1 year ago

Just FYI, you can configure the ssh kitten to run bash as your shell instead of tcsh if you want, regardless of what is configured on the server, as long as bash is actually installed on the server.