Bracketed paste should be per-terminal [PATCH]

Bug #1506166 reported by Yury V. Zaytsev
64
This bug affects 23 people
Affects Status Importance Assigned to Milestone
Gnome Virtual Terminal Emulator
Fix Released
Medium
vte (Ubuntu)
Confirmed
Medium
Unassigned
Trusty
Confirmed
Medium
Unassigned
Xenial
Confirmed
Medium
Unassigned
Yakkety
Confirmed
Undecided
Unassigned
vte3 (Ubuntu)
Fix Released
Medium
Unassigned
Trusty
Fix Released
Medium
Yury V. Zaytsev
Yakkety
Confirmed
Undecided
Unassigned

Bug Description

[Impact]

Bracketed paste mode (\e[?2004h) should be per-terminal (as it is for xterm), not per-screen. This was fixed upstream for vte3 0.36.2, however Trusty ships vte3 0.34.2 and it didn't make it:

https://bugzilla.gnome.org/show_bug.cgi?id=729533

This bug is causing annoying garbage appended to every paste in mc:

https://www.midnight-commander.org/ticket/3207

I have backported the fix to Trusty, tested it in my PPA and would appreciate if someone could sponsor an upload in updates, since Trusty is LTS after all.

[Test Case]

Select some text ("test") and copy it into the clipboard buffer. After that, install mc if you don't have it already and start it:

    sudo apt-get install mc
    mc

Press CTRL+O to swap the panels, right click with the mouse button and pick "Paste" from the context menu. You will see that "~0test~1" is pasted into the console instead of "test" as it should be.

For more details, see the bug report on mc bug tracker referenced above.

[Regression Potential]

The patch is taken from the vte3 bug tracker; it has been in trunk for more than a year and is contained in vte3 0.36.2+ releases. Nobody has reported any problems caused by this change so far...

Revision history for this message
Yury V. Zaytsev (zyv) wrote :
tags: added: patch
Iain Lane (laney)
Changed in vte3 (Ubuntu):
status: New → Fix Released
Yury V. Zaytsev (zyv)
description: updated
Revision history for this message
Iain Lane (laney) wrote :

I uploaded this, thanks!

Changed in vte3 (Ubuntu Trusty):
status: New → In Progress
assignee: nobody → Yury V. Zaytsev (zyv)
Revision history for this message
Egmont Koblinger (egmont-gmail) wrote :

@zyv, @laney: On one hand I'm glad you released a fix; on the other hand there are several other important patches that would be safe and easy to cherry-pick, e.g. see lp bug 1433206, but there were other fixes for segfaults and such.

Let me know if you're interested in coming up with another vte release, I'm happy to help locating about a dozen of the most important changes that are also safe to apply.

Revision history for this message
Yury V. Zaytsev (zyv) wrote :

Hi Egmont,

In this case I was simply scratching my personal itch: this bug is making mc unusable for me at work, where I'm running Ubuntu Trusty. I haven't run in any issues quite as bad as this one.

Having this said, if 1) Iain will be willing to make another upload and 2) you will be willing to post vetted patches, I can try to come up with a tested debdiff...

--Yury.

Revision history for this message
Chris J Arges (arges) wrote : Please test proposed package

Hello Yury, or anyone else affected,

Accepted vte3 into trusty-proposed. The package will build now and be available at https://launchpad.net/ubuntu/+source/vte3/1:0.34.9-1ubuntu2 in a few hours, and then in the -proposed repository.

Please help us by testing this new package. See https://wiki.ubuntu.com/Testing/EnableProposed for documentation how to enable and use -proposed. Your feedback will aid us getting this update out to other Ubuntu users.

If this package fixes the bug for you, please add a comment to this bug, mentioning the version of the package you tested, and change the tag from verification-needed to verification-done. If it does not fix the bug for you, please add a comment stating that, and change the tag to verification-failed. In either case, details of your testing will help us make a better decision.

Further information regarding the verification process can be found at https://wiki.ubuntu.com/QATeam/PerformingSRUVerification . Thank you in advance!

Changed in vte3 (Ubuntu Trusty):
status: In Progress → Fix Committed
tags: added: verification-needed
Revision history for this message
Chris J Arges (arges) wrote :

Accepted this into trusty-proposed. Let's verify this first, and get those other patches in for the next update.
Thanks!

Revision history for this message
Yury V. Zaytsev (zyv) wrote :

Hi,

I've been running the package from trusty-proposed for about a week and can confirm that it fixes the problem for me; I also didn't encounter any regressions in that time.

Many thanks!

tags: added: verification-done
removed: verification-needed
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package vte3 - 1:0.34.9-1ubuntu2

---------------
vte3 (1:0.34.9-1ubuntu2) trusty; urgency=medium

  * Add 95_bracketed_paste.patch (LP: #1506166)

 -- <email address hidden> (Yury V. Zaytsev) Tue, 13 Oct 2015 14:41:42 +0200

Changed in vte3 (Ubuntu Trusty):
status: Fix Committed → Fix Released
Revision history for this message
Brian Murray (brian-murray) wrote : Update Released

The verification of the Stable Release Update for vte3 has completed successfully and the package has now been released to -updates. Subsequently, the Ubuntu Stable Release Updates Team is being unsubscribed and will not receive messages about this bug report. In the event that you encounter a regression using the package from -updates please report a new bug using ubuntu-bug and tag the bug report regression-update so we can easily find any regressions.

Revision history for this message
Yury V. Zaytsev (zyv) wrote :

Excellent!

So, Egmont, if you are still interested in support for Trusty, then you can create a new bug and list the most important bugfixes to be backported there. If you subscribe me to it, I will try to have a look and prepare a debdiff, and then we can again see if it can land into updates.

Otherwise, I'm a happy camper now :-)

Mathew Hodson (mhodson)
Changed in vte3 (Ubuntu):
importance: Undecided → Medium
Changed in vte3 (Ubuntu Trusty):
importance: Undecided → Medium
Changed in vte:
importance: Unknown → Medium
status: Unknown → Fix Released
Revision history for this message
Markus Birth (mbirth) wrote :

I have this problem in Ubuntu 15.10 and Guake Terminal 0.8.4 (from the WebUpd8 PPA, as recommended on their homepage).

Revision history for this message
Egmont Koblinger (egmont-gmail) wrote :

Guake uses the ancient and unmaintained gtk2-based vte. Ideally they should rewrite their code against gtk3 and hence a much newer vte.

Revision history for this message
Alexander Drozdov (adrozdoff) wrote :

Vte that uses for GTK+ 2.0 based terminals also affected. XFCE termianl, Mate Terminal uses libvte9 and affected too. Both Trusty and Xenials still ships vte 0.28.2.

Note, upstream bug report contains patch based on 0.28.2, so it can be simple adopted for current package.

Revision history for this message
Alexander Drozdov (adrozdoff) wrote :

Patch from Gnome bug tracker for 0.28.2 adopted to use with exists patches in `vte` source. It should be applied last in patches sequence.

Revision history for this message
Alexander Drozdov (adrozdoff) wrote :

Adopted patch for Xenial VTE package. Works with existing patches.

I also create PPA with patched VTE:
https://launchpad.net/~adrozdoff/+archive/ubuntu/vte

Revision history for this message
Iain Lane (laney) wrote :

(subscribed sponsors to take care of #14 and #15 - thanks, Alexander)

Egmont, if you're still reading this, I'm happy to help with uploading backports of fixes to vte in older releases if you're willing to help identify the commits.

I get a lot of bug mail and there's a good chance I'd miss it if you post it here or on another bug - so if you do take this up then please either subscribe me to the bug or email me (address in LP profile). Cheers.

Changed in vte3 (Ubuntu Xenial):
status: New → Fix Released
Mathew Hodson (mhodson)
no longer affects: vte3 (Ubuntu Xenial)
Changed in vte (Ubuntu):
importance: Undecided → Medium
Changed in vte (Ubuntu Trusty):
importance: Undecided → Medium
Changed in vte (Ubuntu Xenial):
importance: Undecided → Medium
Revision history for this message
bjrke (bjrke) wrote :

the patch of adrozdoff is still needed for yakketi

Revision history for this message
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in vte (Ubuntu Trusty):
status: New → Confirmed
Changed in vte (Ubuntu Xenial):
status: New → Confirmed
Changed in vte (Ubuntu):
status: New → Confirmed
Revision history for this message
Robie Basak (racb) wrote :

Thank you for the patch and sorry for the delay. We're making an effort to clear out languishing items in the sponsorship queue today.

vte needs fixing in Zesty before we can fix it in older releases. Please see https://wiki.ubuntu.com/StableReleaseUpdates#Procedure

We also need a working test case for the vte (as opposed to vte3) case.

But I'm trying to get an initial response to as many outstanding requests today as I can, so I'll move on for now. Please try to follow the SRU procedure if you can, provide a test case for this fix, provide debdiffs for all of Zesty, Yakkety, Xenial and if you wish Trusty, and then resubscribe ~ubuntu-sponsors to the bug when done.

Revision history for this message
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in vte (Ubuntu Yakkety):
status: New → Confirmed
Changed in vte3 (Ubuntu Yakkety):
status: New → Confirmed
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.