2

I use LXTerminal 0.20. with XFCE 4.12.2 on Linux Mint 18.2 (upgraded from 18.1).

When I copy text in some desktop app and paste it into an LXTerminal session, I get 0~ and 1~ prepended and appended, respectively, to the text. So,

Hello world

becomes

0~Hello World1~

This doesn't happen with XFCE4's "native" terminal app (xfce4-terminal), so not the same issue as in this question - and not resolved by the answer there. It also doesn't happen if I copy the text to apps with GUI (i.e. the text itself, in the clipboard, is fine).

Why is this happening and what can I do to avoid it?

einpoklum
  • 9,515
  • Something's enabled bracketed paste, but the shell (or whatever you're pasting into) doesn't understand it. – Thomas Dickey Jul 09 '17 at 20:36
  • @ThomasDickey: So, how can I disable it, or perhaps - how can I make my shell understand it? (I'm guessing only the first option is actually relevant). – einpoklum Jul 09 '17 at 20:53
  • @JeffSchaller: Not a dupe, since I don't see that problem with xfce4-terminal. Please read more carefully before marking as a dupe... – einpoklum Jul 09 '17 at 21:14
  • What software (shell?) is running in the terminal when the pasting happens? – thrig Jul 09 '17 at 21:19
  • Thought the other answer showed how to turn off bracketed paste. – Jeff Schaller Jul 09 '17 at 21:25
  • @JeffSchaller: I've tried that, now that you mention it... and it didn't help. But something else has... – einpoklum Jul 09 '17 at 21:47
  • @StephenRauch: Really, this is not the same issue as the supposed dupe, please reconsider your close vote. – einpoklum Jul 10 '17 at 12:36
  • This is the same issue as the one you linked (which is 2+ years old). Both xfce4-terminal and lxterminal use the VTE widget for terminal emulation, although not necessarily the same version of that. There used to be a relevant bug in VTE which was fixed 3+ years ago. xfce4-terminal has caught up with the fix quicker than lxterminal did. Newest versions of lxterminal (0.3.x, as opposed to your 0.2.0) are also able to use the newest, fixed VTE. You should ask your distribution to update their packages. – egmont Nov 25 '17 at 00:01
  • Let's mention that while newest lxterminal versions are able to use the newest (fixed), GTK+-3 based VTE versions, they are also able to use the ancient, unmaintained, broken, 6 year old GTK+-2 based one. You'll only get the fixed behavior if your packager switches to GTK+-3. Not sure how lxde's GTK+-3 port is going, whether that's already considered stable or not yet. Another choice you have is to switch to some other terminal emulator, like xfce4-terminal. – egmont Nov 25 '17 at 00:08

3 Answers3

0

This helped, not sure why:

  1. In XFCE4, open Preferences | Input Method | Language.
  2. Change your region to something else.
  3. Press "Apply to entire system".
  4. Change it back.
  5. Press "Apply to entire system".
  6. Close LXTerminal and re-start it.

That made the problem go away for me. I'm sure there's a better answer, but if it works, it works.

einpoklum
  • 9,515
  • 1
    I'm almost certain that 1-5 don't play any role here. Any newly opened terminal works correctly at the beginning, but due to a bug in older VTE versions, terminals "break" relatively easily during normal operation. – egmont Nov 25 '17 at 00:03
0

I've just had this issue, I'm using zsh as shell and for me it was something I had to fix in my .zshrc by adding:

unset zle_bracketed_paste

This made new terminal windows not enter bracketed paste mode by default.

0

Use "reset" command to reinitialize your terminal.