RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Bug 2079078 - readline-8.1 enables bracketed paste mode by default
Summary: readline-8.1 enables bracketed paste mode by default
Keywords:
Status: CLOSED NOTABUG
Alias: None
Product: Red Hat Enterprise Linux 9
Classification: Red Hat
Component: bash
Version: 9.0
Hardware: Unspecified
OS: Unspecified
urgent
urgent
Target Milestone: rc
: 9.0
Assignee: Siteshwar Vashisht
QA Contact: Karel Volný
Šárka Jana
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2022-04-26 21:23 UTC by Torez Smith
Modified: 2022-05-31 14:16 UTC (History)
13 users (show)

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`.
Clone Of:
Environment:
Last Closed: 2022-05-31 14:16:51 UTC
Type: Bug
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Issue Tracker RHELPLAN-120037 0 None None None 2022-04-26 21:26:13 UTC

Description Torez Smith 2022-04-26 21:23:57 UTC
The terminal command seems to be broken while running fresh install of RHEL9.1.

I have gnome installed by default. The default terminal with gnome is gnome-terminal.

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

The terminal window opens but items such as cut-n-paste, newline, echoe and others are not working.

I then pulled down two other terminal applications to try them ....
xfce4-terminal
mate-terminal

same bad behavior as gnome-terminal ... I'm concluding the gtk-4.0 is problematic

I'd love an option to downgrade graphics to gtk-3 if that is at all doable in RHEL-9.

Another note, one of my co-workers tried a test out on a beaker installed RHEL-9 system, logged in via ssh. He saw the same bad behavior.

The RHEL-9 system I have is locally installed and I am able to physically login to the system.  If I choose to ssh into my system from another system, the same bad behavior.

It does not matter if you are locally on the system or ssh'ed in, the behavior is seen.

Comment 1 Tony Camuso 2022-04-26 21:31:54 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.

Comment 2 Tomas Popela 2022-04-27 06:02:29 UTC
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

Comment 3 Tomas Popela 2022-04-27 06:09:39 UTC
(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.

Comment 4 Tomas Pelka 2022-04-27 06:17:26 UTC
(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?

Comment 5 Torez Smith 2022-04-27 14:01:21 UTC
(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!!!

Comment 6 Tomas Popela 2022-04-27 14:23:33 UTC
> 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?

Comment 8 Tomas Pelka 2022-04-27 14:26:41 UTC
(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!!!

Comment 9 Tomas Popela 2022-04-27 14:29:16 UTC
(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
"""

Comment 10 Tomas Pelka 2022-04-27 14:32:37 UTC
(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

Comment 11 Ray Strode [halfline] 2022-04-27 14:37:48 UTC
Does putting

bind 'set enable-bracketed-paste off'

in ~/.bashrc change the behavior?

Comment 12 Ray Strode [halfline] 2022-04-27 14:46:15 UTC
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.

Comment 13 Tony Camuso 2022-04-27 14:56:48 UTC
(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.

Comment 14 Tony Camuso 2022-04-27 14:58:41 UTC
Look. This is VERY EASILY reproduceable. 

Just ssh into a RHEL9 system from a gnome terminal and enjoy the cut-and-paste anomalies.

Comment 16 Ray Strode [halfline] 2022-04-27 15:05:25 UTC
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.

Comment 24 Ray Strode [halfline] 2022-04-27 16:03:37 UTC
"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?

Comment 25 Tony Camuso 2022-04-27 16:12:46 UTC
(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".

Comment 26 Ray Strode [halfline] 2022-04-27 16:18:09 UTC
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.

Comment 27 Ray Strode [halfline] 2022-04-27 16:21:42 UTC
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 ?

Comment 29 Tony Camuso 2022-04-27 16:55:54 UTC
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.

Comment 31 Ray Strode [halfline] 2022-04-27 17:06:50 UTC
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?

Comment 32 Michael Catanzaro 2022-04-27 21:21:21 UTC
(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.

Comment 33 Kamil Dudka 2022-04-28 07:12:56 UTC
Yes, there were customers asking for bracketed paste mode to be enabled by default in RHEL-8 already: bug #1672614

Comment 34 Siteshwar Vashisht 2022-05-12 06:28:27 UTC
(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?

Comment 43 Siteshwar Vashisht 2022-05-31 14:16:51 UTC
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


Note You need to log in before you can comment on or make changes to this bug.