Bug 2079078
| Summary: | readline-8.1 enables bracketed paste mode by default | ||
|---|---|---|---|
| Product: | Red Hat Enterprise Linux 9 | Reporter: | Torez Smith <torez> |
| Component: | bash | Assignee: | Siteshwar Vashisht <svashisht> |
| Status: | CLOSED NOTABUG | QA Contact: | Karel Volný <kvolny> |
| Severity: | urgent | Docs Contact: | Šárka Jana <sjanderk> |
| Priority: | urgent | ||
| Version: | 9.0 | CC: | bdonahue, gfialova, kdudka, mcatanza, otte, pasik, riehecky, rstrode, sjanderk, svashisht, tcamuso, toracat, tpelka |
| Target Milestone: | rc | Flags: | pm-rhel:
mirror+
|
| Target Release: | 9.0 | ||
| Hardware: | Unspecified | ||
| OS: | Unspecified | ||
| Whiteboard: | |||
| Fixed In Version: | Doc Type: | Enhancement | |
| Doc Text: |
.Bracketed paste is now enabled in `bash` by default
The bash `readline` library version 8.1 is now available, which enables bracketed paste mode by default. When you paste text to your terminal, `bash` highlights the text, and you must press `enter` to execute the pasted command. Bracketed paste mode is the default setting to avoid accidentally executing malicious commands.
To disable the bracketed paste mode for a specific user, add the following line to `~/.inputrc`:
----
set enable-bracketed-paste off
----
To disable the bracketed paste mode for all users, add the following line to `/etc/inputrc`:
----
set enable-bracketed-paste off
----
When you disable the bracketed paste mode, commands are directly executed on paste, and you do not need to confirm them by pressing `enter`.
|
Story Points: | --- |
| Clone Of: | Environment: | ||
| Last Closed: | 2022-05-31 14:16:51 UTC | Type: | Bug |
| Regression: | --- | Mount Type: | --- |
| Documentation: | --- | CRM: | |
| Verified Versions: | Category: | --- | |
| oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |
| Cloudforms Team: | --- | Target Upstream Version: | |
| Embargoed: | |||
|
Description
Torez Smith
2022-04-26 21:23:57 UTC
I can corroborate Torez's findings. I am experiencing the same problem with RHEL9 and gtk4. You cannot properly paste anything into a terminal that is ssh'd to a RHEL9 system. gnome-terminal doesn't use gtk4, but it's gtk3 based in RHEL 9 (and in fact in upstream as well) your conclusions are wrong. Moving the component to GNOME Terminal (In reply to Torez Smith from comment #0) > It does not matter if you are locally on the system or ssh'ed in, the > behavior is seen. Just for completeness - running an up to date 9.1 VM here and I'm able to copy and paste. (In reply to Tomas Popela from comment #3) > (In reply to Torez Smith from comment #0) > > It does not matter if you are locally on the system or ssh'ed in, the > > behavior is seen. > > Just for completeness - running an up to date 9.1 VM here and I'm able to > copy and paste. Agree with Tomas I'm using 9.0/9.1 for a long time and yes there are problems with copy&paste time to time but we were never able to find the trigger or debug it. How do you copy? - selecting a text, hit the Shift and than copy with muse middle click? - selecting a text, and using copy from the dialog menu and than using paste from the same menu? - something else? - or a combination? Also can you please elaborat more on what do you mean by "The terminal window opens but items such as cut-n-paste, newline, echoe and others are not working."? How is ssh involved here? Are these simpthomps reproducible on e.g. gedit? (In reply to Tomas Pelka from comment #4) > (In reply to Tomas Popela from comment #3) > > (In reply to Torez Smith from comment #0) > > > It does not matter if you are locally on the system or ssh'ed in, the > > > behavior is seen. > > > > Just for completeness - running an up to date 9.1 VM here and I'm able to > > copy and paste. > > Agree with Tomas I'm using 9.0/9.1 for a long time and yes there are > problems with copy&paste time to time but we were never able to find the > trigger or debug it. > > How do you copy? > - selecting a text, hit the Shift and than copy with muse middle click? > - selecting a text, and using copy from the dialog menu and than using paste > from the same menu? > - something else? > - or a combination? > > > Also can you please elaborat more on what do you mean by "The terminal > window opens but items such as cut-n-paste, newline, echoe and others are > not working."? How is ssh involved here? > > Are these simpthomps reproducible on e.g. gedit? please realize I am not a "graphics" person so to indicate there is a problem with gtk4 may not be accurate on my part. What I do know is there is a problem with gnome-terminal, mate-terminal and xfc4-terminal while running on fresh install of RHEL-9. I do not use VMs so can not comment with regards to what that shows. However, while physically logged into RHEL-9 machine, and, while ssh'd into a RHEL-9 machine located in beaker, I fully see this problem. This problem ONLY shows on a system with RHEL-9 installed. I had RHEL-8 initially installed on this same desktop, not a single problem!!! I have 4 other physical machines here in my home office ..... a laptop with Fedora 33, a Desktop with RHEL-8, an All-in-one with RHEL-7 and another bleeding edge laptop from Dell that's running RHEL-8. Each of these systems run gnome and on each I use gnome-terminal to do my development work. Not a single problem with any of them!!! > please realize I am not a "graphics" person so to indicate there is a > problem with gtk4 may not be accurate on my part. I'm not a "graphics" person either. > What I do know is there is a problem with gnome-terminal, mate-terminal and > xfc4-terminal while running on fresh install of RHEL-9. All these applications have the common base - the vte component. > I do not use VMs so can not comment with regards to what that shows. > However, while physically logged into RHEL-9 machine, and, while ssh'd into > a RHEL-9 machine located in beaker, I fully see this problem. Yet you and your colleague are alone reporting this. > I had RHEL-8 initially installed on this same desktop, not a single > problem!!! > > I have 4 other physical machines here in my home office ..... a laptop with > Fedora 33, a Desktop with RHEL-8, an All-in-one with RHEL-7 and another > bleeding edge laptop from Dell that's running RHEL-8. Each of these systems > run gnome and on each I use gnome-terminal to do my development work. Not > a single problem with any of them!!! If you want to have a constructive discussion please use a different communication style. Can you please reply with what tpelka was asking for? (In reply to Torez Smith from comment #5) > (In reply to Tomas Pelka from comment #4) > > (In reply to Tomas Popela from comment #3) > > > (In reply to Torez Smith from comment #0) > > > > It does not matter if you are locally on the system or ssh'ed in, the > > > > behavior is seen. > > > > > > Just for completeness - running an up to date 9.1 VM here and I'm able to > > > copy and paste. > > > > Agree with Tomas I'm using 9.0/9.1 for a long time and yes there are > > problems with copy&paste time to time but we were never able to find the > > trigger or debug it. > > > > How do you copy? > > - selecting a text, hit the Shift and than copy with muse middle click? > > - selecting a text, and using copy from the dialog menu and than using paste > > from the same menu? > > - something else? > > - or a combination? > > > > > > Also can you please elaborat more on what do you mean by "The terminal > > window opens but items such as cut-n-paste, newline, echoe and others are > > not working."? How is ssh involved here? > > > > Are these simpthomps reproducible on e.g. gedit? > > please realize I am not a "graphics" person so to indicate there is a > problem with gtk4 may not be accurate on my part. > > What I do know is there is a problem with gnome-terminal, mate-terminal and > xfc4-terminal while running on fresh install of RHEL-9. > > I do not use VMs so can not comment with regards to what that shows. > However, while physically logged into RHEL-9 machine, and, while ssh'd into > a RHEL-9 machine located in beaker, I fully see this problem. So you have basically two gnome-terminal windows A. local RHEL9 B. ssh to beaker machine with RHEL9 installed and you want to copy from A to B or vise versa, is that correct? What is the gnome-terminal version ("rpm -q gnome-terminal")? How are you connectiong to the beaker machine, simply "ssh -ltest beaker.machine.redhat.com"? Mate or xfce4 are no officially supported on RHEL9 so I guess you are using some third-party repo(s), what repos do you have, EPEL? Isn't it possible that you accidentaly installed gnome-terminal from different repo than RHEL9 one ("dnf info gnome-terminal" should tell you)? > > This problem ONLY shows on a system with RHEL-9 installed. > > I had RHEL-8 initially installed on this same desktop, not a single > problem!!! > > I have 4 other physical machines here in my home office ..... a laptop with > Fedora 33, a Desktop with RHEL-8, an All-in-one with RHEL-7 and another > bleeding edge laptop from Dell that's running RHEL-8. Each of these systems > run gnome and on each I use gnome-terminal to do my development work. Not > a single problem with any of them!!! (In reply to Tomas Pelka from comment #8) > (In reply to Torez Smith from comment #5) > > (In reply to Tomas Pelka from comment #4) > > > (In reply to Tomas Popela from comment #3) > > > > (In reply to Torez Smith from comment #0) > > > > > It does not matter if you are locally on the system or ssh'ed in, the > > > > > behavior is seen. > > > > > > > > Just for completeness - running an up to date 9.1 VM here and I'm able to > > > > copy and paste. > > > > > > Agree with Tomas I'm using 9.0/9.1 for a long time and yes there are > > > problems with copy&paste time to time but we were never able to find the > > > trigger or debug it. > > > > > > How do you copy? > > > - selecting a text, hit the Shift and than copy with muse middle click? > > > - selecting a text, and using copy from the dialog menu and than using paste > > > from the same menu? > > > - something else? > > > - or a combination? > > > > > > > > > Also can you please elaborat more on what do you mean by "The terminal > > > window opens but items such as cut-n-paste, newline, echoe and others are > > > not working."? How is ssh involved here? > > > > > > Are these simpthomps reproducible on e.g. gedit? > > > > please realize I am not a "graphics" person so to indicate there is a > > problem with gtk4 may not be accurate on my part. > > > > What I do know is there is a problem with gnome-terminal, mate-terminal and > > xfc4-terminal while running on fresh install of RHEL-9. > > > > I do not use VMs so can not comment with regards to what that shows. > > However, while physically logged into RHEL-9 machine, and, while ssh'd into > > a RHEL-9 machine located in beaker, I fully see this problem. > > So you have basically two gnome-terminal windows > A. local RHEL9 > B. ssh to beaker machine with RHEL9 installed > and you want to copy from A to B or vise versa, is that correct? > > What is the gnome-terminal version ("rpm -q gnome-terminal")? How are you > connectiong to the beaker machine, simply "ssh -ltest > beaker.machine.redhat.com"? > > Mate or xfce4 are no officially supported on RHEL9 so I guess you are using > some third-party repo(s), what repos do you have, EPEL? Isn't it possible > that you accidentaly installed gnome-terminal from different repo than RHEL9 > one ("dnf info gnome-terminal" should tell you)? Tome, you can see the package versions in the first comment: """ in particular ... the following are installed .... gnome-terminal-3.40.3-1.el9.x86_64 gnome-terminal-nautilus-3.40.3-1.el9.x86_64 """ (In reply to Tomas Popela from comment #9) > (In reply to Tomas Pelka from comment #8) > > (In reply to Torez Smith from comment #5) > > > (In reply to Tomas Pelka from comment #4) > > > > (In reply to Tomas Popela from comment #3) > > > > > (In reply to Torez Smith from comment #0) > > > > > > It does not matter if you are locally on the system or ssh'ed in, the > > > > > > behavior is seen. > > > > > > > > > > Just for completeness - running an up to date 9.1 VM here and I'm able to > > > > > copy and paste. > > > > > > > > Agree with Tomas I'm using 9.0/9.1 for a long time and yes there are > > > > problems with copy&paste time to time but we were never able to find the > > > > trigger or debug it. > > > > > > > > How do you copy? > > > > - selecting a text, hit the Shift and than copy with muse middle click? > > > > - selecting a text, and using copy from the dialog menu and than using paste > > > > from the same menu? > > > > - something else? > > > > - or a combination? > > > > > > > > > > > > Also can you please elaborat more on what do you mean by "The terminal > > > > window opens but items such as cut-n-paste, newline, echoe and others are > > > > not working."? How is ssh involved here? > > > > > > > > Are these simpthomps reproducible on e.g. gedit? > > > > > > please realize I am not a "graphics" person so to indicate there is a > > > problem with gtk4 may not be accurate on my part. > > > > > > What I do know is there is a problem with gnome-terminal, mate-terminal and > > > xfc4-terminal while running on fresh install of RHEL-9. > > > > > > I do not use VMs so can not comment with regards to what that shows. > > > However, while physically logged into RHEL-9 machine, and, while ssh'd into > > > a RHEL-9 machine located in beaker, I fully see this problem. > > > > So you have basically two gnome-terminal windows > > A. local RHEL9 > > B. ssh to beaker machine with RHEL9 installed > > and you want to copy from A to B or vise versa, is that correct? > > > > What is the gnome-terminal version ("rpm -q gnome-terminal")? How are you > > connectiong to the beaker machine, simply "ssh -ltest > > beaker.machine.redhat.com"? > > > > Mate or xfce4 are no officially supported on RHEL9 so I guess you are using > > some third-party repo(s), what repos do you have, EPEL? Isn't it possible > > that you accidentaly installed gnome-terminal from different repo than RHEL9 > > one ("dnf info gnome-terminal" should tell you)? > > Tome, you can see the package versions in the first comment: > > """ > in particular ... the following are installed .... > gnome-terminal-3.40.3-1.el9.x86_64 > gnome-terminal-nautilus-3.40.3-1.el9.x86_64 > """ my bad, sorry Does putting bind 'set enable-bracketed-paste off' in ~/.bashrc change the behavior? Just to confirm, users that are seeing this, see it when they ssh into a RHEL 9 machine from a non-RHEL 9 machine, too? If so, this is likely a shell issue. It would be good to know if trying a different shell beside bash makes the problem go away. (In reply to Ray Strode [halfline] from comment #12) > Just to confirm, users that are seeing this, see it when they ssh into a > RHEL 9 machine from a non-RHEL 9 machine, too? If so, this is likely a > shell issue. It would be good to know if trying a different shell beside > bash makes the problem go away. From my F35 desktop, I can ssh from my gnome terminal into ANY system and freely cut and paste from anywhere in my desktop to the remotely logged-in gnome terminal, EXCEPT a RHEL-9 system. When I ssh into a RHEL9 system from my desktop gnome terminal, I CANNOT cut and paste anything coherently into the gnome terminal anymore UNTIL I log out of the remote RHEL9 system. Then my F35 desktop gnome terminal returns to normal behavior. The cut and paste into the terminal when it's logged into a RHEL9 system sometimes doesn't work at all, sometimes the paste succeeds, but RHEL9 system doesn't see it, or sometimes the past succeeds and the RHEL9 system ignores linefeeds in the pasted text. Behavior is subject to change without notice. Look. This is VERY EASILY reproduceable. Just ssh into a RHEL9 system from a gnome terminal and enjoy the cut-and-paste anomalies. I certainly can't reproduce on my RHEL 9 VM. I'm reserving a beaker system now, maybe it will reproduce there. Tony, given you said this happens with Fedora 35 gnome-terminal/vte, my best guess is this is a bash bug, so assigning there. I mean it's the only software in the loop that's RHEL 9, right? I would still appreciate if anyone who can reproduce this would report the results of trying the things mentioned in comment 11 and comment 12. "When I cut and paste a line that contains a linefeed, the system waits until I press return. " So that behavior I believe is called "bracketed paste" and it's a bash feature that it sounds like you don't like. we can confirm if you try comment 11. I'm not sure what you mean by it doesn't see line feeds though. Are you if you paste a 3 line block of text, it shows up as one line? (In reply to Ray Strode [halfline] from comment #24) > "When I cut and paste a line that contains a linefeed, the system waits > until I press return. " > > So that behavior I believe is called "bracketed paste" and it's a bash > feature that it sounds like you don't like. we can confirm if you try > comment 11. > > I'm not sure what you mean by it doesn't see line feeds though. Are you if > you paste a 3 line block of text, it shows up as one line? No, it appears as 3 separate lines, but doesn't do anything until I press return. I have never seen this before, and I don't have any commands in my .bashrc that address "bracketed paste". I believe the default in RHEL 9 is to intentionally have bracketed paste be enabled (but could be wrong, the bash maintainer will confirm I guess). You can make it behave in the "RHEL 8 way" by doing comment 11. See also bug 1954366 and https://gitlab.gnome.org/GNOME/vte/-/issues/2500 Torez can you confirm your symptoms are the same as Tony's ? By the way, wrt to "bracketed paste": Suggesting that we add something to .bashrc when we never had to do that before is a nonstarter for ANY customer. The old behavior should persist and any new behavior should be optional, especially when a control as obscure as this affects something we do every day. Torez, I think the bulk of this bug report is actually just a designed change in behavior between RHEL 8 and RHEL 9. In RHEL 9 if you paste multiple lines at once, it requires that you confirm the paste with the enter key. I believe this is so that someone doesn't accidentally paste commands into a terminal and have them run automatically, but I don't fully know for sure if that's the rationale for the change. I think we potentially all saw the same behavior, but I recognized it as the new default, the so called "bracketed paste" feature, and you guys just interpreted it as buggy behavior. Anyway, I think it was an upstream bash change that got inherited in RHEL 9. It could be the behavior should be changed so that RHEL 9 matches RHEL 8 by default, not sure. I guess that's up to the bash maintainer to decide. One thing that concerns me is this line of your email though: "There are other problems with the terminal, like no-newlines, etc.," Can you elaborate on that more? (In reply to Ray Strode [halfline] from comment #31) > Torez, I think the bulk of this bug report is actually just a designed > change in behavior between RHEL 8 and RHEL 9. In RHEL 9 if you paste > multiple lines at once, it requires that you confirm the paste with the > enter key. I believe this is so that someone doesn't accidentally paste > commands into a terminal and have them run automatically, but I don't fully > know for sure if that's the rationale for the change. Probably because it's so easy to hide invisible commands in web content. If you paste something that looks like: do-good-thing do-good-thing-again from a naughty website, you could really be pasting: do-good-thing hack-the-person-copying-this do-good-thing-again Without bracketed paste, you have no way to notice until it's too late. Yes, there were customers asking for bracketed paste mode to be enabled by default in RHEL-8 already: bug #1672614 (In reply to Ray Strode [halfline] from comment #31) > Torez, I think the bulk of this bug report is actually just a designed > change in behavior between RHEL 8 and RHEL 9. In RHEL 9 if you paste > multiple lines at once, it requires that you confirm the paste with the > enter key. I believe this is so that someone doesn't accidentally paste > commands into a terminal and have them run automatically, but I don't fully > know for sure if that's the rationale for the change. > > I think we potentially all saw the same behavior, but I recognized it as the > new default, the so called "bracketed paste" feature, and you guys just > interpreted it as buggy behavior. > > Anyway, I think it was an upstream bash change that got inherited in RHEL 9. > It could be the behavior should be changed so that RHEL 9 matches RHEL 8 by > default, not sure. I guess that's up to the bash maintainer to decide. I will prefer not to change this behavior is RHEL 9. Although I agree that it should be documented (probably in a KCS) to avoid flooding customer support with support requests. > > One thing that concerns me is this line of your email though: > > "There are other problems with the terminal, like no-newlines, etc.," > > Can you elaborate on that more? This change in behaviour is now documented in RHEL 9 release notes[1]. I am closing this as not a bug. [1] https://access.redhat.com/documentation/en-us/red_hat_enterprise_linux/9/html/9.0_release_notes/new-features#enhancement_shells-and-command-line-tools |