Can't copy and paste more than 4kB into a terminal

Bug #1488842 reported by Richard Bruce Baxter on 2015-08-26
This bug affects 1 person
Affects Status Importance Assigned to Milestone
linux (Ubuntu)
Chintana Prabhu

Bug Description

I am unable to copy and paste more than 4kB of script into a terminal (e.g. gnome-terminal, xterm). I have been encountering this issue for nearly a decade now (across multiple distributions, including Ubuntu 14.04 LTS). I believe it may relate to kernel parameter N_TTY_BUF_SIZE. A similar problem appears to have been reported here;

Use case;
1. The user has a large semi-automated script (e.g. 2000 line deployment instructions.txt; which do not justify full automation*).
2. The user wishes to copy and paste one or more automated sections of the script into a terminal (e.g. gnome-terminal, xterm, etc) while following the self-contained instructions.
3. Those automated sections of the script may contain more than 4kB worth of data (spread across multiple lines)

Actual behaviour;
- the script being pasted into the terminal is corrupted, then executed

Expected Behaviour;
- the script is successfully pasted into the terminal, then executed

I have reported this issue because it is not intuitive that the system should behave like this. While now that I know it may be a fundamental limitation of current (/prior) Linux kernels, I will ensure to work around it in future activity. However, it is feasible that someone else may encounter this issue before it is rectified. Every time this issue occurs there is a possibility of system corruption (depending on the precise script being copied to the terminal).

Perhaps a patch has already been released? Or if this issue should be reported elsewhere, feel free to recommend an alternative forum.

* e.g. because the self-contained instructions only need to be executed ~10 times across the product life cycle, taking into account the fact automation time is a function of a) how busy the user is / spare time they can devote to subsystems, and b) the level of robustness required: automatically editing files which may have been significantly updated between deployments is not necessarily safe.

Cheers -


This bug is missing log files that will aid in diagnosing the problem. From a terminal window please run:

apport-collect 1488842

and then change the status of the bug to 'Confirmed'.

If, due to the nature of the issue you have encountered, you are unable to run this command, please add a comment stating that fact and change the bug status to 'Confirmed'.

This change has been made by an automated script, maintained by the Ubuntu Kernel Team.

Changed in linux (Ubuntu):
status: New → Incomplete
Changed in linux (Ubuntu):
status: Incomplete → Confirmed
Joseph Salisbury (jsalisbury) wrote :

Would it be possible for you to test the latest upstream kernel? Refer to . Please test the latest v4.2 kernel[0].

If this bug is fixed in the mainline kernel, please add the following tag 'kernel-fixed-upstream'.

If the mainline kernel does not fix this bug, please add the tag: 'kernel-bug-exists-upstream'.

Once testing of the upstream kernel is complete, please mark this bug as "Confirmed".

Thanks in advance.


Changed in linux (Ubuntu):
importance: Undecided → Medium
status: Confirmed → Incomplete
Changed in linux (Ubuntu):
assignee: nobody → Chintana Prabhu (chintanarp98)
Chintana Prabhu (chintanarp98) wrote :

Could I please get the dependencies , .c and .h files related to the bug?

Changed in linux (Ubuntu):
status: Incomplete → In Progress
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers