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

^C does not work as expected when using lrzsz #282

Open
ghost opened this issue Mar 13, 2020 · 4 comments
Open

^C does not work as expected when using lrzsz #282

ghost opened this issue Mar 13, 2020 · 4 comments
Labels

Comments

@ghost
Copy link

ghost commented Mar 13, 2020

Describe the bug

  • Run rz and press Ctrl + C. The popup does not disappear.
  • Run rz to receive the selected file and press Ctrl + C. A lot of junk characters appear in the terminal.
  • Run sz to send a file and press Ctrl + C. The terminal is locked.

Environment:

  • OS: Ubuntu 16.04
  • Browser: Chrome 77

Additional context

Related to #99

I thought lrzsz used Ctrl + X to cancel the action.

@ghost ghost added the bug label Mar 13, 2020
@tsl0922
Copy link
Owner

tsl0922 commented Mar 13, 2020

You may need to press Ctrl + C multiple times, I'm not sure if it is an upstream bug.

@tsl0922
Copy link
Owner

tsl0922 commented Mar 23, 2020

rttyd uses a custom protocol without crc check which isn't reliable, you may get corrupted data.

@tsl0922
Copy link
Owner

tsl0922 commented Mar 25, 2020

I don't want to invent a new protocol for file transferring. someone may ssh to another host in a ttyd terminal, if ttyd uses a custom protocol, the user will need to install ttyd on the host to send/recv files.

zmodem is a standard protocol, which means it's package exists in most popular systems, and is easier to install. I agree that the user experience of zmodem on ttyd is not good for now, but I prefer to use it, and will keep improving it.

@ghost
Copy link

ghost commented Jun 16, 2020

On the wire, Ctrl-C is not the method to cancel a Zmodem transfer, it is per the spec (see page 6) five ASCII CAN's (Ctrl-X).

Reading the issue, it sounds like Ctrl-C will cancel the zmodem.js UI part of the transfer, leaving the remote side still trying to send. Press Ctrl-X 5 or more times and that should terminate the remote (l)rzsz.

zmodem is a standard protocol, which means it's package exists in most popular systems, and is easier to install. I agree that the user experience of zmodem on ttyd is not good for now, but I prefer to use it, and will keep improving it.

Zmodem does have one drawback on today's systems: it cannot prevent either side from emitting the ssh termination sequence (~.). It's not too likely to happen in the wild, but I usually ensure I do 'ssh -e none' when I know I might be using Zmodem in a session.

(Kermit can be made ssh-safe, and also terminates with three Ctrl-C's.)

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

No branches or pull requests

1 participant