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

Remote controlling kitty error on MacOS #679

Closed
johnnypea opened this issue Jun 25, 2018 · 4 comments
Closed

Remote controlling kitty error on MacOS #679

johnnypea opened this issue Jun 25, 2018 · 4 comments

Comments

@johnnypea
Copy link

Hi.

I use the released .dmg version for Mac (0.11.1) with following settings.

macos-launch-services-cmdline
--listen-on unix:/tmp/mykitty --single-instance

kitty.conf

startup_session /Users/johnnypea/.config/kitty/default
allow_remote_control yes

/Users/johnnypea/.config/kitty/default

# Set the window layout for the current tab
#layout tall

# Set the working directory for windows in the current tab
cd ~

#launch zsh
new_tab Development
cd ~/Development
launch zsh

#launch Docker monitor
new_tab Docker
title Dry
launch /usr/local/bin/dry

.zshrc

...
alias k='/Applications/kitty.app/Contents/MacOS/kitty @ --to unix:/tmp/mykitty'
...

...and I encounter this error with every command...

λ › k new-window --title Output --keep-focus cat                                                                                                          ~
Traceback (most recent call last):
  File "Python/runpy.py", line 280, in run_path
  File "Python/runpy.py", line 85, in _run_code
  File "kitty/__main__.py", line 96, in <module>
  File "kitty/__main__.py", line 92, in main
  File "kitty/__main__.py", line 21, in remote_control
  File "kitty/remote_control.py", line 159, in main
  File "kitty/remote_control.py", line 113, in do_io
  File "kitty/remote_control.py", line 60, in __exit__
OSError: [Errno 57] Socket is not connected

...but the command is executed in kitty.

k ls outputs nothing just the error.

What am I doing wrong?

How could I verify I'm running just the single instance? Should it be just one process?

Thanks.

@kovidgoyal
Copy link
Owner

Likely some difference in socket semantics between macOS and linux. I've never tested the socket based remote control on macOS. Can I ask why you are using --listen-on and --to at all? They are only needed if you intend to control kitty from outside a kitty window, such as from another terminal or a cron job or similar.

As for checking if single instance works, yes there should be only a single kitty process, every invocation of kitty should just create new windows in the existing process.

@johnnypea
Copy link
Author

Thank you for your answer.

Regarding --listen-on and --to, I would like to control kitty from my Alfred workflows (https://www.alfredapp.com/) and map some actions to my custom keyboard shortcuts structure in Keyboard Maestro (https://www.keyboardmaestro.com/main/).

@kovidgoyal
Copy link
Owner

Ah, OK. Well with my fix you should be fine.

@johnnypea
Copy link
Author

Cool, thank you ;).

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