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

KITTY_LISTEN_ON and tcp sockets #2569

chmln opened this issue Apr 19, 2020 · 4 comments

KITTY_LISTEN_ON and tcp sockets #2569

chmln opened this issue Apr 19, 2020 · 4 comments


Copy link

chmln commented Apr 19, 2020

It would be really nice if kitty created unix sockets by default in /tmp. I'm aware of #1330 but creating wrapper scripts and aliases are really poor workarounds. So I am currently trying to work with KITTY_LISTEN_ON but for whatever reason it seems to be ignored. See attached screenshots below:

With the env var:

Works as an option:

kitty config:

kitty 0.17.2 created by Kovid Goyal
Linux laptop 5.6.5-1-clear #1 SMP Fri, 17 Apr 2020 14:37:34 +0000 x86_64
Arch Linux \r (\l)
Loaded config files: /home/greg/.config/kitty/kitty.conf
Running under: X11

Config options different from defaults:
active_border_color     Color(red=84, green=88, blue=98)
active_tab_background   Color(red=40, green=44, blue=52)
active_tab_foreground   Color(red=171, green=178, blue=191)
adjust_column_width     0.95
allow_remote_control    y
bold_font               Source Code Pro Bold
bold_italic_font        Source Code Pro Bold Italic
color0                  Color(red=40, green=44, blue=52)
color1                  Color(red=224, green=108, blue=117)
color10                 Color(red=152, green=195, blue=121)
color11                 Color(red=229, green=192, blue=123)
color12                 Color(red=97, green=175, blue=239)
color13                 Color(red=198, green=120, blue=221)
color14                 Color(red=86, green=182, blue=194)
color15                 Color(red=171, green=178, blue=191)
color16                 Color(red=209, green=154, blue=102)
color17                 Color(red=190, green=80, blue=70)
color18                 Color(red=53, green=59, blue=69)
color19                 Color(red=62, green=68, blue=81)
color2                  Color(red=152, green=195, blue=121)
color20                 Color(red=86, green=92, blue=100)
color21                 Color(red=182, green=189, blue=202)
color3                  Color(red=229, green=192, blue=123)
color4                  Color(red=97, green=175, blue=239)
color5                  Color(red=198, green=120, blue=221)
color6                  Color(red=86, green=182, blue=194)
color7                  Color(red=171, green=178, blue=191)
color8                  Color(red=84, green=88, blue=98)
color9                  Color(red=224, green=108, blue=117)
copy_on_select          clipboard
cursor                  Color(red=171, green=178, blue=191)
cursor_blink_interval   0.0
cursor_shape            2
enable_audio_bell       False
font_family             Sauce Code Pro Medium Nerd Font Complete Mono
font_size               14.0
foreground              Color(red=187, green=187, blue=187)
hide_window_decorations 1
inactive_tab_background Color(red=53, green=59, blue=69)
inactive_tab_foreground Color(red=86, green=92, blue=100)
input_delay             0
italic_font             Source Code Pro Italic
open_url_modifiers      4
open_url_with           ['xdg-open']
placement_strategy      top-left
repaint_delay           0
selection_background    Color(red=171, green=178, blue=191)
selection_foreground    Color(red=40, green=44, blue=52)
sync_to_monitor         False
touch_scroll_multiplier 10.0
url_color               Color(red=86, green=92, blue=100)
wheel_scroll_multiplier 10.0
window_border_width     0
Added shortcuts:
	 control+v KeyAction(func='paste_from_clipboard', args=())
Copy link

What's so poor about creating wrapper scripts or aliases?
KITTY_LISTEN_ON will be present in child processes so you can connect to
kitty easily, it does not take the place of the --listen-on directive.

Copy link

chmln commented Apr 19, 2020

it does not take the place of the --listen-on directive

It would be so great if it did, with --listen-on being the override.

What's so poor about creating wrapper scripts or aliases?

Of course those are one way to solve a problem. But there are virtually no drawbacks in binding to a random unix socket, like e.g. neovim does.

Secondly, awesome things like become impossible when users have to apply these workarounds at scale.

Copy link

Sorry what? Why should nvim-ctrl be impossible? Remote control is a security risk, so it is never going to be on by default. Given that, there is absolutely no point in listening to a random socket. Since all messages on said socket will be ignored by default. If you want to write an equivalent of nvim-ctrl, simply have it look for KITTY_LISTEN_ON in the environment and if not found to write to /dev/tty. This is what kitty @ itself does.

And note that environment variables are not passed through ssh, not to mention that over ssh you typically cant access either unix or tcp sockets, unless they are explicitly forwarded.

Copy link

chmln commented Apr 19, 2020

Thanks @kovidgoyal 🎉

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

No branches or pull requests

2 participants