latest patch breaks OSC 52 clipboard access

Bug #2040080 reported by Claudio Leite
20
This bug affects 2 people
Affects Status Importance Assigned to Milestone
tmux (Ubuntu)
Fix Released
Undecided
Unassigned
Mantic
Fix Released
Undecided
Mitchell Dzurick

Bug Description

[ Impact ]

When using tmux with "set -g mouse on" in ~/.tmux.conf, you should be able to highlight text and have that copied to your clipboard. This bug is preventing that from happening.

[ Test Plan ]
1. Launch an Ubuntu Desktop VM
$ lxc launch images:ubuntu/23.10/desktop ubuntu --vm -c limits.cpu=4 -c limits.memory=4GiB --console=vga

In the VM:

$ sudo apt update -y
$ sudo apt install -y tmux alacritty
$ echo "set -g mouse on" > ~/.tmux.conf:
$ alacritty
$ tmux
# Write text, highlight with mouse, try to paste by double clicking on it, opening a text editor and hitting Ctrl-C.

[ Where problems could occur ]
* the fix removes tparm() commands, perhaps there is a parameter that is relying on this code to work properly that isn't seen yet

Related branches

Revision history for this message
Claudio Leite (leitec) wrote :
Revision history for this message
Ubuntu Foundations Team Bug Bot (crichton) wrote :

The attachment "corrected patch" seems to be a patch. If it isn't, please remove the "patch" flag from the attachment, remove the "patch" tag, and if you are a member of the ~ubuntu-reviewers, unsubscribe the team.

[This is an automated message performed by a Launchpad user owned by ~brian-murray, for any issues please contact him.]

tags: added: patch
Revision history for this message
Romain Francoise (rfrancoise) wrote :

Oops, sorry about that. Thank you for pointing out the issue, I will fix it in Debian unstable.

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

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

Changed in tmux (Ubuntu):
status: New → Confirmed
Revision history for this message
Lucas Kanashiro (lucaskanashiro) wrote :

Thanks for taking the time to report this bug and trying to make Ubuntu better.

The bug was already fixed in version 33a-5 in Debian unstable by Romain (thanks!):

https://tracker.debian.org/news/1472848/accepted-tmux-33a-5-source-into-unstable/

It should be fixed in the development release (noble) soon, once it is sync'ed from Debian.

However, the affected version is also present in Mantic, so adding a task for it.

tags: added: bitesize
Revision history for this message
Mitchell Dzurick (mitchdz) wrote :

Reproduction is easy:

$ lxc launch images:ubuntu/23.10/desktop ubuntu --vm -c limits.cpu=4 -c limits.memory=4GiB --console=vga

In the VM:

$ sudo apt update -y
$ sudo apt install -y tmux alacritty
$ echo "set -g mouse on" > ~/.tmux.conf:
$ alacritty
$ tmux
# Write text, highlight with mouse, try to paste and see no text is copied

Testing the fix with current debian unstable package
$ wget http://ftp.us.debian.org/debian/pool/main/t/tmux/tmux_3.3a-5_amd64.deb
$ sudo dpkg -i tmux_3.3a-5_amd64.deb
$ tmux
# write some text, highlight with mouse, and see text will be pasted

Changed in tmux (Ubuntu Mantic):
assignee: nobody → Mitchell Dzurick (mitchdz)
Revision history for this message
Mitchell Dzurick (mitchdz) wrote :

Test package here - https://launchpad.net/~mitchdz/+archive/ubuntu/lp2040080-tmux-clipboard Checked in a VM that the clipboard works.

Revision history for this message
Mitchell Dzurick (mitchdz) wrote :

Staged the fix[1]. We will have to wait until Noble gets a package sync before SRUing into Mantic.

[1] - https://code.launchpad.net/~mitchdz/ubuntu/+source/tmux/+git/tmux/+merge/454437

tags: added: server-todo
Changed in tmux (Ubuntu):
status: Confirmed → Fix Committed
Changed in tmux (Ubuntu Mantic):
status: New → In Progress
description: updated
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package tmux - 3.3a-5

---------------
tmux (3.3a-5) unstable; urgency=medium

  * Fix backport of commit bf636d9575 which breaks OSC 52 clipboard
    access, with thanks to Claudio Leite (LP: #2040080).

 -- Romain Francoise <email address hidden> Sun, 22 Oct 2023 16:34:17 +0200

Changed in tmux (Ubuntu):
status: Fix Committed → Fix Released
description: updated
description: updated
Changed in tmux (Ubuntu Mantic):
status: In Progress → Fix Committed
Revision history for this message
Timo Aaltonen (tjaalton) wrote : Please test proposed package

Hello Claudio, or anyone else affected,

Accepted tmux into mantic-proposed. The package will build now and be available at https://launchpad.net/ubuntu/+source/tmux/3.3a-4ubuntu1 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 on 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, what testing has been performed on the package and change the tag from verification-needed-mantic to verification-done-mantic. If it does not fix the bug for you, please add a comment stating that, and change the tag to verification-failed-mantic. In either case, without details of your testing we will not be able to proceed.

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

N.B. The updated package will be released to -updates after the bug(s) fixed by this package have been verified and the package has been in -proposed for a minimum of 7 days.

tags: added: verification-needed verification-needed-mantic
Revision history for this message
Ubuntu SRU Bot (ubuntu-sru-bot) wrote : Autopkgtest regression report (tmux/3.3a-4ubuntu1)

All autopkgtests for the newly accepted tmux (3.3a-4ubuntu1) for mantic have finished running.
The following regressions have been reported in tests triggered by the package:

vim-ultisnips/3.2-2 (amd64, armhf)

Please visit the excuses page listed below and investigate the failures, proceeding afterwards as per the StableReleaseUpdates policy regarding autopkgtest regressions [1].

https://people.canonical.com/~ubuntu-archive/proposed-migration/mantic/update_excuses.html#tmux

[1] https://wiki.ubuntu.com/StableReleaseUpdates#Autopkgtest_Regressions

Thank you!

Revision history for this message
Claudio Leite (leitec) wrote :

Hello,

The issue is fixed for me with 3.3a-4ubuntu1. Thank you!

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

This bug was fixed in the package tmux - 3.3a-4ubuntu1

---------------
tmux (3.3a-4ubuntu1) mantic; urgency=medium

  * d/p/lp2040080-fix-upstream-bf636d9575-OSC52-clipboard.patch:
    fix upstream patch to allow OSC52 clipboard access (LP: #2040080).

 -- Mitchell Dzurick <email address hidden> Tue, 07 Nov 2023 15:49:10 -0700

Changed in tmux (Ubuntu Mantic):
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 tmux has completed successfully and the package is now being 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.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

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