trzsz / trzsz-go

trzsz-go is the go version of trzsz, makes all terminals that support local shell to support trzsz ( trz / tsz ).
https://trzsz.github.io/go
MIT License
871 stars 53 forks source link

spawn pty failed: fork/exec /usr/bin/telnet: invalid argument #56

Open gitcnd opened 1 month ago

gitcnd commented 1 month ago

Using wsl1 (Ubuntu) on windows 10N, I get the following:

[cnd:~/Downloads]$ trzsz telnet 192.168.1.106
spawn pty failed: fork/exec /usr/bin/telnet: invalid argument

[cnd:~/Downloads]$ telnet 192.168.1.106
Trying 192.168.1.106...
Connected to 192.168.1.106.
Escape character is '^]'.
Password: 
Welcome to esp32-cam-cb - esp32 Micropython v1.24.0-preview.98.g4d16a9cce on 2024-07-05 on LOLIN_C3_MINI with ESP32-C3FH4

>>> 
telnet> q
Connection closed.

[cnd:~/Downloads]$ 

Not sure what that means, but telnet works fine by itself I know. The telnet protocol is quite simple - should be possible to let trzsz emulate that without needing to use any external program if that helps?

The problem seems to be with trzsz code, not the program it needs to run - same error no matter what program I try to run:

[cnd:~/Downloads]$ trzsz /usr/bin/perl ~/Downloads/mcu_serial.pl -port $PORT -setdtr -setrts -norts -nodtr
spawn pty failed: fork/exec /usr/bin/perl: invalid argument

[cnd:~/Downloads]$ 
lonnywong commented 1 month ago

Which version of trzsz? Is it the Linux version or the Windows version?

lonnywong commented 1 month ago

trzsz in WSL