• XOFF (C-s) on ptys works by default

    From Marc SCHAEFER@21:1/5 to All on Tue Nov 5 12:10:01 2024
    Hello,

    Something funny is that on a pty you have XON/XOFF software flow control enabled by default:

    - if you type C-s (XOFF), output will be paused
    - if you type C-q (XON), output will be resumed

    It could have been handy on a real tty -- serial line/port -- although
    when I was using modems I would always disable that and use hardware
    flow and other settings to make the tty 8bit-clean.

    Why is it that it is still enabled for ptys by default in Debian?
    AFAIK it is well possibly that ptys use the same "line discipline" (*)
    that real serial ports (ttys) and that's the reason why it's enabled
    by default.

    It can be annoying because some users will not know that they can
    get out of the "pause" by typing C-q, after they types C-s by
    mistake.

    It can be disabled with: `stty -ixon`, then you can access the C-s
    function of bash, e.g.

    Just curious whether there is a reason why it is not disabled in .bashrc?

    Have a nice day.

    (*) SYSV terminology AFAIR

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Marc SCHAEFER@21:1/5 to Nicolas George on Tue Nov 5 13:00:01 2024
    Hello,

    On Tue, Nov 05, 2024 at 12:11:39PM +0100, Nicolas George wrote:
    It could have been handy on a real tty

    It is very handy on emulated ttys too. You never had the output of
    tcpdump / tail -f /var/log/ / make you wanted to pause to inspect
    something?

    On slow, physical VT100 terminals, indeed, I used that over 20 years
    ago. On virtual ones they are usually to quick to spit out nowadays.

    I usually relauch the command under screen C-a-h or with
    /tmp/blabla 2>&1

    Then the first time it happens to them they will search for 'linux
    terminal frozen' on the web and learn something.

    Yes, that could teach them something.

    Have a nice day.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Nicolas George@21:1/5 to All on Tue Nov 5 12:20:01 2024
    Marc SCHAEFER (12024-11-05):
    It could have been handy on a real tty

    It is very handy on emulated ttys too. You never had the output of
    tcpdump / tail -f /var/log/… / make you wanted to pause to inspect
    something?

    It can be annoying because some users will not know that they can
    get out of the "pause" by typing C-q, after they types C-s by
    mistake.

    Then the first time it happens to them they will search for “linux
    terminal frozen” on the web and learn something.

    Just curious whether there is a reason why it is not disabled in .bashrc?

    Changing random things from defaults in unrelated configuration files is
    not a good practice.

    Regards,

    --
    Nicolas George

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From tomas@tuxteam.de@21:1/5 to Marc SCHAEFER on Tue Nov 5 13:00:01 2024
    On Tue, Nov 05, 2024 at 12:49:46PM +0100, Marc SCHAEFER wrote:
    Hello,

    On Tue, Nov 05, 2024 at 12:11:39PM +0100, Nicolas George wrote:
    It could have been handy on a real tty

    It is very handy on emulated ttys too. You never had the output of
    tcpdump / tail -f /var/log/ / make you wanted to pause to inspect something?

    On slow, physical VT100 terminals, indeed, I used that over 20 years
    ago. On virtual ones they are usually to quick to spit out nowadays.

    FWIW, I still do use that on (mostly) Xterm these days.

    I usually relauch the command under screen C-a-h or with
    /tmp/blabla 2>&1

    Then the first time it happens to them they will search for 'linux
    terminal frozen' on the web and learn something.

    Yes, that could teach them something.

    No need to get all sarcastic if someone disagrees with
    you. Things... happen :-)

    Cheers
    --
    t

    -----BEGIN PGP SIGNATURE-----

    iF0EABECAB0WIQRp53liolZD6iXhAoIFyCz1etHaRgUCZyoH4gAKCRAFyCz1etHa RnPxAJ9WpbfJZk3IvU3L+JauXEUpY5EbZACfehH+wFyTPD8GclPga7iRT9CDDYs=
    =+l03
    -----END PGP SIGNATURE-----

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Chris Green@21:1/5 to Nicolas George on Tue Nov 5 14:00:01 2024
    On Tue, Nov 05, 2024 at 12:11:39PM +0100, Nicolas George wrote:
    Marc SCHAEFER (12024-11-05):
    It could have been handy on a real tty

    It is very handy on emulated ttys too. You never had the output of
    tcpdump / tail -f /var/log/… / make you wanted to pause to inspect something?

    It's handy if you see a warning message while apt-install (or anything
    else) is running, you can stop the output and check whether you need
    to do something about it.

    --
    Chris Green

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Stefan Monnier@21:1/5 to All on Tue Nov 5 15:20:01 2024
    Nicolas George [2024-11-05 12:11:39] wrote:
    Marc SCHAEFER (12024-11-05):
    It could have been handy on a real tty
    It is very handy on emulated ttys too. You never had the output of
    tcpdump / tail -f /var/log/… / make you wanted to pause to inspect something?

    I always use `C-z` for that.


    Stefan

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Chris Green@21:1/5 to Stefan Monnier on Tue Nov 5 18:10:01 2024
    On Tue, Nov 05, 2024 at 09:15:56AM -0500, Stefan Monnier wrote:
    Nicolas George [2024-11-05 12:11:39] wrote:
    Marc SCHAEFER (12024-11-05):
    It could have been handy on a real tty
    It is very handy on emulated ttys too. You never had the output of
    tcpdump / tail -f /var/log/… / make you wanted to pause to inspect something?

    I always use `C-z` for that.

    Yes, I suppose that works too (if in a rather different way).

    --
    Chris Green

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Nicolas George@21:1/5 to All on Tue Nov 5 18:50:01 2024
    Marc SCHAEFER (12024-11-05):
    It is very handy on emulated ttys too. You never had the output of
    tcpdump / tail -f /var/log/ / make you wanted to pause to inspect something?
    On slow, physical VT100 terminals, indeed, I used that over 20 years
    ago. On virtual ones they are usually to quick to spit out nowadays.

    If you think the nature of the terminal will change the speed of the
    output of tail -f or tcpdump, you need to learn what tail -f or tcpdump actually do. Preferably before answering.

    And if make is “quick to spit out” for you, I suggest you try compiling projects more complex than Hello World.

    --
    Nicolas George

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Marc SCHAEFER@21:1/5 to Nicolas George on Wed Nov 6 09:10:01 2024
    Dear contributor,

    On Tue, Nov 05, 2024 at 06:42:07PM +0100, Nicolas George wrote:
    I suggest you try compiling projects more complex than Hello World.

    It is always a sliding slope to assume things about people
    you interact with on mailing-lists.

    When I do compile complex projects, I usually start the compilation
    process under screen, and I record everything using C-a H. You
    might prefer termux, but well, I think I started using screen around
    1990, kind of a bad habit. That's probably about when I stopped
    using C-s (?).

    Or even sometimes I just use script -- or even asciinema (great to
    show commands to others).

    I find the logging approach handier to:

    - spawn another terminal

    - look calmly at what happened

    - take any necessary measures, fixes and documentation
    (having a NOTES file on a third screen terminal is
    something I often do)

    It's also handy to investigate closely when, indeed, the scrolling was
    too quick and you just saw something strange (a warning e.g.) -- in the
    blink of an eye.

    Or, I also use the C-z approach that someone else suggested
    when I forgot to start screen and it's too complicated to
    start a new SSH connection (2FA, etc).

    However, you may prefer C-s, that's your option :)

    To conclude with this thread (at least on my part):

    In any case, if this is necessary, I concur with your affirmation
    that when people get a stuck terminal, they should use a
    search engine and get enlightened. That would be the best way:
    learn something new, as you said!

    Unfortunately, in my recent experience -- this is why I asked the
    question in the first place -- I stumbled on a few cases where people
    had the issue and did not search that answer themselves -- or maybe
    formulated it badly, I did not investigate. They simply closed the
    xterm or mate-terminal window without thinking, and they told me
    something like "oh, that unreliable Linux terminal is stuck again".

    However, as you explainted it to me in your previous message, I
    understand now that changing a global default might not be the road to
    be taken, especially since the consequence, if people do not try to find
    why it happens, would be a closed window.

    I will try harder to convince people to RTFMs (or at least search for
    an answer on a search engine).

    Have a nice day.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)