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

Plugin: add support for [XYZ]MODEM file transfers #1999

Open
hijkzzz opened this issue Jul 17, 2019 · 56 comments
Open

Plugin: add support for [XYZ]MODEM file transfers #1999

hijkzzz opened this issue Jul 17, 2019 · 56 comments
Labels
Area-Extensibility A feature that would ideally be fulfilled by us having an extension model. Help Wanted We encourage anyone to jump in on these. Issue-Feature Complex enough to require an in depth planning process and actual budgeted, scheduled work. Product-Terminal The new Windows Terminal.
Milestone

Comments

@hijkzzz
Copy link

hijkzzz commented Jul 17, 2019

refer to the title

@hijkzzz hijkzzz added the Issue-Feature Complex enough to require an in depth planning process and actual budgeted, scheduled work. label Jul 17, 2019
@ghost ghost added Needs-Triage It's a new issue that the core contributor team needs to triage at the next triage meeting Needs-Tag-Fix Doesn't match tag requirements labels Jul 17, 2019
@zadjii-msft

This comment has been minimized.

@zadjii-msft zadjii-msft added Issue-Question For questions or discussion Resolution-Answered Related to questions that have been answered and removed Issue-Feature Complex enough to require an in depth planning process and actual budgeted, scheduled work. labels Jul 17, 2019
@hijkzzz
Copy link
Author

hijkzzz commented Jul 17, 2019

@zadjii-msft
I mean it needs to support sz rz like xshell.

1 similar comment
@hijkzzz
Copy link
Author

hijkzzz commented Jul 17, 2019

@zadjii-msft
I mean it needs to support sz rz like xshell.

@xmm1989218
Copy link

@zadjii-msft windows terminal should support sz/rz protocol and popout dialog box, I can't reopen this issue, please reopen it, it is very useful feature.

rz

@qin-nz
Copy link

qin-nz commented Aug 29, 2019

@zadjii-msft I think rz sz is a feature for terminal not shell (e.g. WSL).
rz sz is a program running on server, and also require terminal to support it.
In macOS, iTerm2 implement it instead of bash or zsh.
Please tell us where to request that feature.

@zadjii-msft
Copy link
Member

So I still don't know why the terminal would need to add support for lszrz directly. Seems to me like the lszrz package should be the one to display the file picker on windows itself, and it's not the responsibility of the terminal to display that picker. I'm not sure why a terminal window needs to get involved in the implementation of a commandline application like this.

Maybe I don't understand how sz rz works? If someone can explain why I'm wrong, I'll be happy to re-open and investigate. But this just sounds like an application that needs to be ported to Windows on it's own, and the terminal doesn't need to ship with itself.

@qin-nz
Copy link

qin-nz commented Sep 4, 2019

@zadjii-msft
As a user, I don't really know what happens.

If I want to send a file from server to laptop,
I just run sz -be filename on linux (via Terminal, via shell, via ssh). This means I need to install lszrz on server.
And something should let me select where to put it, then receive and save it on my laptop.

Other Terminal do this, so I think Windows Terminal should do it too.
e.g. iTerm2 on macOS, SecureCRT / XShell on Windows

@qin-nz
Copy link

qin-nz commented Sep 10, 2019

@zadjii-msft
lszrz don't display the file picker on window.
Instead, people are required to run sz/rz on both sides.
This post show what should people do without using a terminal. And this really hard to do for users.

Terminal should support lszrz (and lszrz is required to be installed on PC).
Terminal is ONLY a UI of lszrz.

@qin-nz
Copy link

qin-nz commented Sep 19, 2019

@zadjii-msft

Seems to me like the lszrz package should be the one to display the file picker on windows itself

lszrz is backgroud program, it can't dispaly the file picker. Something(e.g. Terminal) should find a place and run sz/rz command on laptop.

and it's not the responsibility of the terminal to display that picker.

So do you think user should be responsibility to display that picker?
ALL OTHER TERMINALS DO! (out of box or need some configure.)

@DHowett-MSFT DHowett-MSFT added Area-Extensibility A feature that would ideally be fulfilled by us having an extension model. Product-Terminal The new Windows Terminal. and removed Needs-Triage It's a new issue that the core contributor team needs to triage at the next triage meeting Resolution-Answered Related to questions that have been answered labels Sep 19, 2019
@DHowett-MSFT
Copy link
Contributor

I'm reopening this one and putting it on the infinite backlog.

@qin-nz: We're not going to do this ourselves, but it is a valuable feature and it would be good to think about it when plugin support is written (#555)

@zadjii-msft: This is a weird/interesting thing. lszrz is a package that implements the [XYZ]MODEM set of protocols, and is typically used for transferring files over serial connections to remote machines. The deal, though, is that that data must either be multiplexed-with or totally replace the tty stream. It's the terminal emulator's job to stop sending user input and waiting for connection output and instead send encoded file data packets and wait for ACKs (or the other way around.)

lszrz only includes the client portions that "send a file to the terminal" or "receive a file from the terminal," and the terminal needs to be complicit.

@DHowett-MSFT DHowett-MSFT reopened this Sep 19, 2019
@ghost ghost removed the Needs-Tag-Fix Doesn't match tag requirements label Sep 19, 2019
@DHowett-MSFT DHowett-MSFT changed the title We need sz rz command! Plugin: add support for [XYZ]MODEM file transfers Sep 19, 2019
@zadjii-msft
Copy link
Member

Oh my god, that's insane. Well yea of course I didn't understand that, that's a totally different style of application than anything I've ever heard of before. I'd think there would be a better way of doing this, such that the Terminal application didn't have to be directly involved in this process (maybe using a pty or something) but hey if that's how it works, that's how it works.

Sounds like a perfect extension scenario.

@YangZG86

This comment has been minimized.

@DHowett-MSFT DHowett-MSFT added Issue-Feature Complex enough to require an in depth planning process and actual budgeted, scheduled work. and removed Issue-Question For questions or discussion labels Nov 5, 2019
@permissionx

This comment has been minimized.

@zadjii-msft
Copy link
Member

Nope. We'll make sure to update this thread when there is. In the meantime, might I recommend the Subscribe button?
image
That way you'll be notified of any updates to this thread, without needlessly pinging everyone on this thread ☺️

@vaynewang

This comment has been minimized.

@FANGOD

This comment has been minimized.

@Centerful

This comment has been minimized.

@sober-wang

This comment has been minimized.

@esonic
Copy link

esonic commented Dec 22, 2021

I developed a ssh command line tool to support sz/rz for Windows Terminal in WSL.

When rz/sz command is found, it will call OpenFileDialog/FolderBrowserDialog through a powershell script, and then pass the file path to rz/sz to finish upload or download.

I hope it helps somehow.

https://github.com/esonic/sshz

@likebeta

This comment was marked as off-topic.

@zadjii-msft zadjii-msft modified the milestones: Terminal Backlog, Backlog Jan 4, 2022
@qingyunha
Copy link

Hello, I made a ssh wrapper to support rz and sz. I hope you find it useful.

https://github.com/qingyunha/zssh

@zadjii-msft zadjii-msft added the Help Wanted We encourage anyone to jump in on these. label Apr 8, 2022
@shuohao

This comment was marked as off-topic.

@qingyunha

This comment was marked as off-topic.

@hereTac
Copy link

hereTac commented Apr 18, 2022

If u need.
Using rz/sz to transfer files

@Monzale

This comment was marked as spam.

@stratosblue

This comment was marked as off-topic.

@idk500

This comment was marked as off-topic.

@Spinestars
Copy link

If u need. Using rz/sz to transfer files

Security Fortress servers don't seem to work very well when they exist

@Zxis233
Copy link

Zxis233 commented Sep 18, 2022

Yeah, the feature is too useful to transfer my file! Hope to see it soon in WT!

@Asa-Dong

This comment was marked as spam.

@ravn
Copy link

ravn commented Nov 27, 2022

The reason that the request for zmodem support comes for the Terminal application, is because the Zmodem protocol is designed to use a very characteristic character sequence for handshaking between the two ends, which is designed to be easy to recognize for the terminal emulator and start the zmodem client locally on the character stream handled by the terminal app.

It is very useful for situations where you cannot create a direct TCP/IP connection from/to a given network host but you have a serial/telnet connection to the host.

@Ethan-devops
Copy link

This problem has not been resolved for so long, I think it is not a technical problem, but a management problem, who can come forward to coordinate and resolve this matter?

@DHowett
Copy link
Member

DHowett commented Nov 29, 2022

Whether it's "management" or "technical" isn't really up for debate. This feature request is the perfect combination of (1) not important enough to prioritize ahead of other work and (2) already handled better by other software. WT isn't yet intended to be the best--say--serial terminal. It works for that, sure, but it's missing some important things that would make it the best... such as x/y/zmodem support. But it's also missing more basic things like actually opening a serial port as an endpoint.

This is a popular community request, but it is by no means the most popular one. Once we're through with the more important foundational ones, we'll be better equipped to tackle this one.

For now, I'm going to lock the thread. It's been open for a while and the new replies haven't really cleared up the specific requirements for data exchange protocols here, so it'll serve the community better as an upvote aggregator rather than an open-ended discussion about how we just don't have it yet. 😄

(Edited after the fact to add!)
This is one place where we would really benefit from community contribution! Terminal could be the best serial terminal on Windows, but we're too far off the mark there. I would love to understand the use cases and the needs over in the Discussions section 😄 it's just not appropriate to have this discussion on a thread with 39+ participants and an untold number of subscribers.

@microsoft microsoft locked and limited conversation to collaborators Nov 29, 2022
@microsoft microsoft unlocked this conversation Nov 28, 2023
@lonnywong
Copy link
Contributor

lonnywong commented Nov 28, 2023

For anyone stuck on using lrzsz ( rz / sz ) in Windows Terminal #1999. You can try trzsz ( trz / tsz ).

It is recommended to use trzsz-ssh ( tssh ):

# Install trzsz-ssh ( tssh ) in Windows Terminal
scoop install tssh / winget install tssh / choco install tssh

# Log in to the remote server using tssh. It works similar to ssh.
tssh remote_server

# Install trzsz-go on the remote server. Please check https://trzsz.github.io/go
yay -S trzsz / sudo apt install trzsz / sudo yum install trzsz / etc...

# Upload files like rz
trz

# Upload directories
trz -r

# Download files like sz
tsz file
tsz /path/to/file

# Download directories
tsz -r dir
tsz -r /path/to/dir

trzsz-ssh ( tssh ) v0.1.15 supports zmodem lrzsz ( rz / sz ):

# Install trzsz-ssh ( tssh ) in Windows Terminal
scoop install tssh / winget install tssh / choco install tssh

# Install lrzsz ( rz / sz ) on local Windows, or download from https://github.com/trzsz/lrzsz-win32/releases and add it to PATH
scoop install lrzsz / choco install lrzsz

# `tssh -V` should show "trzsz ssh 0.1.15"
tssh -V

# Add the following configuration to C:\Users\xxx\.ssh\config
Host *
    #!! EnableZmodem Yes

# Log in to the remote server using tssh. It works similar to ssh.
tssh remote_server

# Now you can use rz / sz
rz
sz xxx

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area-Extensibility A feature that would ideally be fulfilled by us having an extension model. Help Wanted We encourage anyone to jump in on these. Issue-Feature Complex enough to require an in depth planning process and actual budgeted, scheduled work. Product-Terminal The new Windows Terminal.
Projects
None yet
Development

No branches or pull requests