#137897 lrzsz: rz/sz doesn't work from screen

Package:
lrzsz
Source:
lrzsz
Description:
Tools for zmodem/xmodem/ymodem file transfer
Submitter:
Toni Viemero
Date:
2026-06-19 04:01:02 UTC
Severity:
important
#137897#5
Date:
2002-03-11 20:16:22 UTC
From:
To:
rz and sz doesn't work if trying to transfer from 'screen'.

toni@perplex:~$ screen rz
rz waiting to receive.**B0100000023be50

...and it just waits there to be killed, works ok without screen

#137897#10
Date:
2026-06-19 03:53:24 UTC
From:
To:
Hi,

This behavior is not a bug in the lrzsz package, but rather a structural
limitation of how GNU screen handles the terminal stream by default. rz
and sz need an 8-bit transparent, flow-controlled connection. GNU screen
is a terminal emulator, not a transparent pipe.

When you run rz inside screen, rz emits its ZMODEM initialization header
(the **B0100000023be50 line shown in your report). By default screen
renders these bytes as ordinary screen output -- which is exactly the
"garbage" you see -- instead of relaying the raw ZMODEM stream to your
local terminal emulator. Your terminal's ZMODEM handler therefore never
recognizes the transfer and never starts sending, so rz waits forever.

To use rz/sz inside a screen session, tell screen to pass the ZMODEM
stream straight through to your terminal by adding this line to your
~/.screenrc:

    zmodem pass

You can also enable it in a running session: press Ctrl+A, then ":",
then type "zmodem pass" and press Enter.

This works because your local terminal emulator already supports ZMODEM
(which is why the transfer succeeds without screen). If instead you want
screen itself to handle the transfer, see "zmodem" in screen(1).

Since the lrzsz binaries work as intended and this is a question of
terminal-multiplexer configuration, I am closing this report.

Kind regards,

Martin