Ctrl-Shift-C issues a Break command

Bug #971918 reported by Phill Whiteside on 2012-04-02
106
This bug affects 21 people
Affects Status Importance Assigned to Milestone
LXDE
Unknown
Unknown
lxterminal (Ubuntu)
Medium
Julien Lavergne
Quantal
Undecided
Unassigned

Bug Description

SRU explanation:

[Impact]
This bug impacts the usability of lxterminal, since we can't use Copy without generate a break. As it affects many users and an important functionality, I think it can be SRUed.

[Test Case]
See the description of the bug :
- highlighting text in the terminal
- use Ctrl+Shift+C to Copy to pasteboard
- It will generate a break (end of the opération, back to a new line for the terminal).

[Regression Potential]
Shortcut with keyword may be affected, but the patch is applied upstream and tested. It should be quite safe.

Original bug report :
When highlighting text in the terminal, it is the practice to use Ctrl+Shift+C to Copy to pasteboard. In 12.04 this also Generates a Ctrl-C (Break) function. The text is copied and can be pasted with Shift-Crtl-V as expected.

ProblemType: Bug
DistroRelease: Ubuntu 12.04
Package: lxterminal 0.1.11-2ubuntu1
ProcVersionSignature: Ubuntu 3.2.0-21.34-generic 3.2.13
Uname: Linux 3.2.0-21-generic x86_64
ApportVersion: 2.0-0ubuntu2
Architecture: amd64
Date: Mon Apr 2 22:19:57 2012
InstallationMedia: Lubuntu 12.04 "Precise Pangolin" - Beta amd64 (20120402)
ProcEnviron:
 LANGUAGE=en_GB:en
 TERM=xterm
 PATH=(custom, user)
 LANG=en_GB.UTF-8
 SHELL=/bin/bash
SourcePackage: lxterminal
UpgradeStatus: No upgrade log present (probably fresh install)

Phill Whiteside (phillw) wrote :
Launchpad Janitor (janitor) wrote :

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

Changed in lxterminal (Ubuntu):
status: New → Confirmed
mikey (abc-mikey) wrote :

I am experiencing exactly the same issue. It has caused me to inadvertently cancel a backup operation. I have a clean install of lubuntu 12.04 with all packages updated post install. Here's my setup:

Distributor ID: Ubuntu
Description: Ubuntu 12.04 LTS
Release: 12.04
Codename: precise
Package: lxterminal
Versions: 0.1.11-2ubuntu1

mikey (abc-mikey) wrote :

Just a note that I've noticed that Shift+Control+V also sends a Control+V signal to the terminal, it's just less obtrusive than the Control+C situation.

Urs Fleisch (ufleisch) wrote :

I am not a GTK specialist, but it seems that TRUE has to be returned from the accelerator callback functions. Here is a patch which fixes the problem:

diff -ru lxterminal-0.1.11.orig/src/lxterminal.c lxterminal-0.1.11/src/lxterminal.c
--- lxterminal-0.1.11.orig/src/lxterminal.c 2011-07-27 23:07:54.000000000 +0200
+++ lxterminal-0.1.11/src/lxterminal.c 2012-05-18 17:58:40.483588501 +0200
@@ -77,9 +77,9 @@
 static void terminal_close_tab_activate_event(GtkAction * action, LXTerminal * terminal);
 static void terminal_close_tab_accelerator(LXTerminal * terminal, guint action, GtkWidget * item);
 static void terminal_copy_activate_event(GtkAction * action, LXTerminal * terminal);
-static void terminal_copy_accelerator(LXTerminal * terminal, guint action, GtkWidget * item);
+static gboolean terminal_copy_accelerator(LXTerminal * terminal, guint action, GtkWidget * item);
 static void terminal_paste_activate_event(GtkAction * action, LXTerminal * terminal);
-static void terminal_paste_accelerator(LXTerminal * terminal, guint action, GtkWidget * item);
+static gboolean terminal_paste_accelerator(LXTerminal * terminal, guint action, GtkWidget * item);
 static void terminal_name_tab_response_event(GtkWidget * dialog, gint response, LXTerminal * terminal);
 static void terminal_name_tab_activate_event(GtkAction * action, LXTerminal * terminal);
 static void terminal_name_tab_accelerator(LXTerminal * terminal, guint action, GtkWidget * item);
@@ -433,9 +433,10 @@
 }

 /* Handler for accelerator <CTRL><SHIFT> C. Copy to the clipboard. */
-static void terminal_copy_accelerator(LXTerminal * terminal, guint action, GtkWidget * item)
+static gboolean terminal_copy_accelerator(LXTerminal * terminal, guint action, GtkWidget * item)
 {
     terminal_copy_activate_event(NULL, terminal);
+ return TRUE;
 }

 /* Handler for "activate" signal on Edit/Paste menu item.
@@ -447,9 +448,10 @@
 }

 /* Handler for accelerator <CTRL><SHIFT> V. Paste from the clipboard. */
-static void terminal_paste_accelerator(LXTerminal * terminal, guint action, GtkWidget * item)
+static gboolean terminal_paste_accelerator(LXTerminal * terminal, guint action, GtkWidget * item)
 {
     terminal_paste_activate_event(NULL, terminal);
+ return TRUE;
 }

 /* Handler for "response" signal on Name Tab dialog. */

The attachment "Fix Shift-Ctrl-C sending Ctrl-C and Shift-Ctrl-V sending Ctrl-V to terminal" of this bug report has been identified as being a patch. The ubuntu-reviewers team has been subscribed to the bug report so that they can review the patch. In the event that this is in fact not a patch you can resolve this situation by removing the tag 'patch' from the bug report and editing the attachment so that it is not flagged as a patch. Additionally, if you are member of the ubuntu-reviewers team please also unsubscribe the team from this bug report.

[This is an automated message performed by a Launchpad user owned by Brian Murray. Please contact him regarding any issues with the action taken in this bug report.]

tags: added: patch
mario (mariusz-brzezik) wrote :

Thanks a lot for Your patch! I am not programmer at all, but You helped me to make fix also for new tab (CTRL+SHIFT+T), close tab (CTRL+SHIFT+W), new window (CTRL+SHIFT+N), name (CTRL+SHIFT+R, but this one is not used instead there is CTRL+SHIFT+I).

Walter Lapchynski (wxl) wrote :

i can confirm mariusz' patch to work for:
CTRL-V
CTRL-C
CTRL-SHIFT-T
CTRL-SHIFT-W
CTRL-SHIFT-N
CTRL-SHIFT-I

Walter Lapchynski (wxl) wrote :

Bug reporting for LXDE components apparently still happens on Sourceforge, so, per gilir's suggestion, I've posted the patch over there:
https://sourceforge.net/tracker/?func=detail&aid=3538518&group_id=180858&atid=894871
Might want to make a note there if you want to get this finally integrated in lxterminal.

I now have this working in a vm, on a IBM ThinkPad RM60 laptop, and an Asus eeePC 1005ha netbook, so I'm pretty well convinced it does the trick.

Julien Lavergne (gilir) on 2012-09-07
Changed in lxterminal (Ubuntu):
status: Confirmed → In Progress
assignee: nobody → Julien Lavergne (gilir)
Julien Lavergne (gilir) wrote :

The fix was apply upstream, but it will be available in the next version of lxterminal

Changed in lxterminal (Ubuntu):
assignee: Julien Lavergne (gilir) → nobody
status: In Progress → Triaged
importance: Undecided → Medium
Urs Fleisch (ufleisch) wrote :

Unfortunately, this is still not fixed in quantal. I have provided a patch on 2012-05-18, I have informed upstream about the patch on 2012-08-16 and it was applied there on the same day. As I do not want to live with this bug until a new upstream version is released, I provide here a new patch derived from the commit http://lxde.git.sourceforge.net/git/gitweb.cgi?p=lxde/lxterminal;a=commit;h=ac4f84c88ab6526d78efa2b9639cca614a67bc3a and adapted to the source of the current Ubuntu package. I have also attached a fixed debian archive, so creating a new fixed package should be only a matter of unpacking it and calling "dpkg-source -b". If there is more I can do to help, please let me know.

Urs Fleisch (ufleisch) wrote :

And here the fixed lxterminal_0.1.11-4ubuntu3.debian.tar.xz.

Julien Lavergne (gilir) on 2012-11-06
Changed in lxterminal (Ubuntu):
status: Triaged → In Progress
assignee: nobody → Julien Lavergne (gilir)
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package lxterminal - 0.1.11-4ubuntu3

---------------
lxterminal (0.1.11-4ubuntu3) raring; urgency=low

  * debian/patches:
   - 90_fix_ctrl_c_break.patch: From upstream, don't generate a break when
     using Shift+Ctrl+C (LP: #971918).
 -- Julien Lavergne <email address hidden> Tue, 06 Nov 2012 23:06:21 +0100

Changed in lxterminal (Ubuntu):
status: In Progress → Fix Released
Launchpad Janitor (janitor) wrote :

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

Changed in lxterminal (Ubuntu Quantal):
status: New → Confirmed
Julien Lavergne (gilir) on 2012-12-10
description: updated
Changed in lxterminal (Ubuntu Quantal):
status: Confirmed → New
Changed in lxterminal (Ubuntu Quantal):
status: New → Confirmed

Hello Phill, or anyone else affected,

Accepted lxterminal into quantal-proposed. The package will build now and be available at http://launchpad.net/ubuntu/+source/lxterminal/0.1.11-4ubuntu2.1 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 lxterminal (Ubuntu Quantal):
status: Confirmed → Fix Committed
tags: added: verification-needed
Phill Whiteside (phillw) wrote :

Shift-Ctrl-C and Shift-Ctrl-V no longer give 'escape' characters (also know as... It works)
Thanks

Changed in lxterminal (Ubuntu Quantal):
status: Fix Committed → Fix Released
Phill Whiteside (phillw) on 2013-01-11
Changed in lxterminal (Ubuntu Quantal):
status: Fix Released → Fix Committed
Phill Whiteside (phillw) on 2013-01-11
tags: added: verification-done
removed: verification-needed

The verification of this Stable Release Update 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 regresssions.

Launchpad Janitor (janitor) wrote :

This bug was fixed in the package lxterminal - 0.1.11-4ubuntu2.1

---------------
lxterminal (0.1.11-4ubuntu2.1) quantal-proposed; urgency=low

  * debian/patches:
   - 90_fix_ctrl_c_break.patch: From upstream, don't generate a break when
     using Shift+Ctrl+C (LP: #971918).
 -- Julien Lavergne <email address hidden> Mon, 10 Dec 2012 19:33:16 +0100

Changed in lxterminal (Ubuntu Quantal):
status: Fix Committed → Fix Released
Grant Bowman (grantbow) wrote :

what about precise-proposed?

To post a comment you must log in.
This report contains Public information  Edit
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.