Can kitty-tool be ported to run an Android?
#5805
Replies: 10 comments 8 replies
|
No idea, try it and see. You will need to add the architecture in the build_static_binaries function in setup.py |
|
On Thu, Dec 22, 2022 at 04:37:57AM -0800, salmankhilji wrote:
Before I plunge in, how does `kitty-tool` communicate with the main kitty app?
Over a socket or over a TTY
|
|
I report having successfully tested
I had to cross-compile diff --git a/setup.py b/setup.py
index ee238281..5aaaaa00 100755
--- a/setup.py
+++ b/setup.py
@@ -953,7 +953,7 @@ def run_one(dest: str, **env: str) -> None:
def build_static_binaries(args: Options, launcher_dir: str) -> None:
arches = 'amd64', 'arm64'
for os_, arches_ in {
- 'darwin': arches, 'linux': arches, 'freebsd': arches, 'netbsd': arches, 'openbsd': arches,
+ 'darwin': arches, 'linux': ('amd64', 'arm64', 'arm'), 'freebsd': arches, 'netbsd': arches, 'openbsd': arches,
'dragonfly': ('amd64',),
}.items():
for arch in arches_:The The reason I am requesting Unlike wanting to use the Android has broken core tools like
|
|
You are welcome to send a PR adding linux-arm
You will need to modify both setup.py and ssh/kitty-tool the latter to
use linux-arm on 32 bit hosts automatically.
As for less being broken, its on my TODO list to write a replacement for
less in kitty-tool pager if and when I do, the problem goes away.
|
|
kitty-tool script uses current-version because thats the only way it will work
till kitty is released, since kitty-tool is currently only in nightly
and latest redirects to an actual release.
…On Sat, Jan 14, 2023 at 12:33:38AM -0800, salmankhilji wrote:
Thanks for taking care of building the 32-bit binaries for `linux/arm` by default.
(Having no experience in Python, I did not that one could do: `'linux': arches + ('arm',)`.)
I also see that there is a corresponding change in the `kitty-tool` shell integration script, which downloads `kitty-tool` as needed. My understanding is that this script is meant to be executed on the remote/target machine. Just wanted to let you know that in my use-case, I intend to manually download `kitty-tool` on my development PC and then manually push the binary to the device (using `adb`). (Of course, one must a priori know the target device OS and architecture with such approach.)
The reason being that Android having an embedded system lineage may not even have tools like `curl` or `wget`. (What can we expect of an OS which ships with broken `sed`, broken `tar`, and may even not have `vi`!). This is typical of embedded developmnt where all "real" work is done on a development PC and the built binaries are merely pushed to the device.
Long story short, as long as it is documented where to download the corresponding `kitty-tool` off GitHub, than my use-case should be good-to-go. I see that the URL is of the form:
```
https://github.com/kovidgoyal/kitty/releases/download/$release_version/kitty-tool-$OS-$arch
```
And I think it ought to be enough for me to script the installation of kitty and its corresponding `kitty-tool`.
**PS:** The following commit does away with `current-version.txt` approach:
```
commit ddf3638
Author: Kovid Goyal ***@***.***>
Date: Thu Jan 5 20:09:32 2023 +0530
Dont need to fetch the current version since GitHub provides a redirecting constant download URL
tools/cmd/update_self/main.go
```
However, I see that the `kitty-tool` shell integration script still does something with `current-version.txt`. Hopefully, it is my misunderstanding and not a miss.
--
Reply to this email directly or view it on GitHub:
#5805 (reply in thread)
You are receiving this because you commented.
Message ID: ***@***.***>
--
_____________________________________
Dr. Kovid Goyal
https://www.kovidgoyal.net
https://calibre-ebook.com
_____________________________________
|
|
Note that I just renamed kitty-tool to kitten. So adjust your scripts accordingly. |
|
I'm not a fan of kitty pushing kitten to remote hosts. In order to do
that, it would require a round-trip greatly increasing latency for the
common use case of using ssh over a network as opposed to connect
locally.
If I were to implement it, it would be by adding a per-host config to
the ssh kitten specifying the destination path. However, this is a fair
bit of work for something very easy for end users to script themselves,
in the relatively rare case that the remote machine has no functional
wget/curl.
|
|
No, you cant, edit-in-kitty works by communicating over the tty device,
only one program can communicate over the tty at a time.
…On Thu, Jan 19, 2023 at 02:30:50AM -0800, salmankhilji wrote:
Am I supposed to be able to run `kitten edit-in-kitty` in the background?
It appears that the `edit-in-kitty` feature wants the user to allow opening a file in a different window, tab, or even OS windows (just like ***@***.***`). So I could do, for example:
```
$ kitten edit-in-kitty --type os-window /etc/hosts
```
What happens is that the window where I launch the above command gets tied up like this:
```
$ kitten edit-in-kitty --type os-window /etc/hosts
Waiting for editing to be completed, press Esc to abort...
```
So I can't really do anything else in the original window till I finish my editing session in the new OS window. (Which makes me wonder as to how useful a new window was to me as I could have easily edited in the original window to begin with.)
So I tried putting the command in background:
```
$ kitten edit-in-kitty --type os-window /etc/hosts &
[1] 19139
$ Waiting for editing to be completed, press Esc to abort...
[1] + Stopped (tty output) \kitten edit-in-kitty --type os-window /etc/hosts
```
But then somehow `kitten` binary stops. I wonder if it is an Android limitation. (Haven't tried doing so over SSH.)
--
Reply to this email directly or view it on GitHub:
#5805 (reply in thread)
You are receiving this because you commented.
Message ID: ***@***.***>
--
_____________________________________
Dr. Kovid Goyal
https://www.kovidgoyal.net
https://calibre-ebook.com
_____________________________________
|
|
One more. While running on Android, the clipboard kitten fails to guess the MIME type if input is directly from a file. Piping through (I am reluctant to file these as tickets as broken embedded systems are probably not the main use case.) However, I am wondering if the |
|
It doesn't use file contents, it detects MIME types purely based on extension.
So if youa re using a file without a well known extension you have to
specify MIME type manually.
|

Uh oh!
There was an error while loading. Please reload this page.
I am wondering if
kitty-toolcan be compiled forarmv7orarmv8to allow remote-controlling kitty from within anadbshell session to an Android device.All reactions