While trying out kitty from the package manager nix on macOS, I noticed that I had the same issues as I had when I tried to run the Address sanitiser version of kitty, so I investigated. I found that executing kitty.app/Contents/MacOS/kitty works as expected but creating a symlink with ln -s ../kitty.app/Contents/MacOS/kitty kitty and executing that makes me unable to type anything in kitty. Even though kitty looks like it has focus, all key strokes go to the app last focused before that, which also looks focused.
Steps to reproduce:
cd /path/to/kittymake appmkdir bincd bin../kitty.app/Contents/MacOS/kittyln -s ../kitty.app/Contents/MacOS/kitty kitty./kittyPS: Sorry for opening this issue without content, I hit the wrong button on my phone.
I dont really see what I can do about that, it's likely macOS does not recognize the app as belonging to a bundle when lanched via a symlink.
A little weird though that almost everything works, just not this one thing. I tried doing the same with iTerm and System Preferences and they don't even start, only printing the error message "No Info.plist file in application bundle or no NSPrincipalClass in the Info.plist file, exiting".
kitty comes from Linux, so it is far more flexible about running outside
application bundles, this particular issue will come from the OS,
not kitty itself, kitty is perfectly fine without all the bundle guff that
Apple demands.
Hmm, the keyboard input works in Alacritty when starting via symlink, maybe we can also manage to do that. I don't know what it does though.
Maybe an explicit call to focus the first window after creation will do the trick. I cant think of anything else. The Nuclear option is of course to detect when launched via symlink and re-exec using the final binary.
@Luflosi I have not tested this as I dont have access to a mac right now. You should now be able to have your symlink point to kitty-deref-symlink and everything should just work.
It works 馃帀
Can confirm, awesome, thanks @kovidgoyal!
Any idea when this change will land in a release?
Opened a PR with a patch to https://github.com/NixOS/nixpkgs meanwhile https://github.com/NixOS/nixpkgs/pull/61369
It might very well take a long time for the next version to be released, there are still some broken things in the master branch. This is the longest pause between releases ever, as far as I can tell. 0.13.3 was released on January, the 19th.
@kovidgoyal maybe it is time to switch to a different release model, https://nvie.com/posts/a-successful-git-branching-model/ sounds reasonable although I have never used it personally.
There are no significant broken things left in master that I can reproduce. I am traveling for a couple of weeks so will likely make the next release when I return.
Could we detect if the binary is being called via a symlink and automatically do the right thing? That way we wouldn't need an extra binary and people using symlinks wouldn't need to worry about linking to the right binary.
Doing that means extra overhead for everybody to support a fringe use
case. Only people using symlinks should have to pay that overhead.