Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.debian.user > #242699 > unrolled thread

Debian 11.1, xfce4-terminal, select entire line, middle-click, newline not pasted

Started byDavid Christensen <dpchrist@holgerdanske.com>
First post2021-12-05 21:00 +0100
Last post2021-12-07 02:40 +0100
Articles 10 — 5 participants

Back to article view | Back to linux.debian.user


Contents

  Debian 11.1, xfce4-terminal, select entire line, middle-click,  newline not pasted David Christensen <dpchrist@holgerdanske.com> - 2021-12-05 21:00 +0100
    Re: Debian 11.1, xfce4-terminal, select entire line, middle-click,  newline not pasted David Wright <deblis@lionunicorn.co.uk> - 2021-12-06 02:30 +0100
    Re: Debian 11.1, xfce4-terminal, select entire line, middle-click,  newline not pasted Keith Bainbridge <keithrbaugroups@gmail.com> - 2021-12-06 03:20 +0100
    Re: Debian 11.1, xfce4-terminal, select entire line, middle-click,  newline not pasted Keith Bainbridge <keithrbaugroups@gmail.com> - 2021-12-06 03:20 +0100
      Re: Debian 11.1, xfce4-terminal, select entire line, middle-click,  newline not pasted David Christensen <dpchrist@holgerdanske.com> - 2021-12-06 03:50 +0100
    Re: Debian 11.1, xfce4-terminal, select entire line, middle-click, newline not pasted Mike Kupfer <mkupfer@alum.berkeley.edu> - 2021-12-06 05:40 +0100
      Re: Debian 11.1, xfce4-terminal, select entire line, middle-click, newline not pasted "Thomas Schmitt" <scdbackup@gmx.net> - 2021-12-06 09:30 +0100
        Re: Debian 11.1, xfce4-terminal, select entire line, middle-click,  newline not pasted David Wright <deblis@lionunicorn.co.uk> - 2021-12-17 18:00 +0100
      Re: Debian 11.1, xfce4-terminal, select entire line, middle-click,  newline not pasted David Wright <deblis@lionunicorn.co.uk> - 2021-12-06 22:30 +0100
      Re: Debian 11.1, xfce4-terminal, select entire line, middle-click,  newline not pasted David Christensen <dpchrist@holgerdanske.com> - 2021-12-07 02:40 +0100

#242699 — Debian 11.1, xfce4-terminal, select entire line, middle-click, newline not pasted

FromDavid Christensen <dpchrist@holgerdanske.com>
Date2021-12-05 21:00 +0100
SubjectDebian 11.1, xfce4-terminal, select entire line, middle-click, newline not pasted
Message-ID<Dr5PY-12i-1@gated-at.bofh.it>
debian-user:

I installed debian-live-11.1.0-amd64-xfce+nonfree.iso on a Dell Latitude 
E6520 yesterday:

2021-12-05 11:46:51 root@laalaa ~
# cat /etc/debian_version ; uname -a ; dpkg-query -W xfce4-terminal
11.1
Linux laalaa 5.10.0-9-amd64 #1 SMP Debian 5.10.70-1 (2021-09-30) x86_64 
GNU/Linux
xfce4-terminal	0.8.10-1


On Debian 9 (and 10, and earlier?) with Xfce Terminal, when I select an 
entire line of text in one terminal and then middle click paste in 
another terminal window, the entire line is pasted; including the 
newline.  This is useful for running the same command in many terminal 
windows (e.g. 'ssh-agent bash -l', 'ssh-add', etc.).


On Debian 11,  when I select an entire line of text in one terminal and 
then middle click paste in another terminal window, the line is pasted 
without the newline; requiring me to select the target window and press 
<Return>.


How do I get Debian 11 Xfce Terminal to include the newline when I 
select an entire line in one terminal windows and middle-click paste it 
into another terminal window?


David

[toc] | [next] | [standalone]


#242706

FromDavid Wright <deblis@lionunicorn.co.uk>
Date2021-12-06 02:30 +0100
Message-ID<DraZj-4eU-1@gated-at.bofh.it>
In reply to#242699
On Sun 05 Dec 2021 at 11:56:23 (-0800), David Christensen wrote:
> I installed debian-live-11.1.0-amd64-xfce+nonfree.iso on a Dell
> Latitude E6520 yesterday:
> 
> 2021-12-05 11:46:51 root@laalaa ~
> # cat /etc/debian_version ; uname -a ; dpkg-query -W xfce4-terminal
> 11.1
> Linux laalaa 5.10.0-9-amd64 #1 SMP Debian 5.10.70-1 (2021-09-30)
> x86_64 GNU/Linux
> xfce4-terminal	0.8.10-1
> 
> On Debian 9 (and 10, and earlier?) with Xfce Terminal, when I select
> an entire line of text in one terminal and then middle click paste in
> another terminal window, the entire line is pasted; including the
> newline.  This is useful for running the same command in many terminal
> windows (e.g. 'ssh-agent bash -l', 'ssh-add', etc.).
> 
> On Debian 11,  when I select an entire line of text in one terminal
> and then middle click paste in another terminal window, the line is
> pasted without the newline; requiring me to select the target window
> and press <Return>.
> 
> How do I get Debian 11 Xfce Terminal to include the newline when I
> select an entire line in one terminal windows and middle-click paste
> it into another terminal window?

For *xterm, I have ~/.Xresources with the line:

  XTerm*cutNewline: false

because I prefer the lack of a newline: otherwise you get
no chance to tweak the line before it's executed.

Because I paste at point, on account of:

  ; Insert at cursor position (point) rather than the (unsteady) mouse position.
  (setq mouse-yank-at-point t)

inserting a newline just means pressing Return (no
selecting required as you're already in the window).

Anyway, if Xfce Terminal provides such a resource,
perhaps the default changed, and you can reverse it.

Cheers,
David.

[toc] | [prev] | [next] | [standalone]


#242707

FromKeith Bainbridge <keithrbaugroups@gmail.com>
Date2021-12-06 03:20 +0100
Message-ID<DrbLH-4Jm-1@gated-at.bofh.it>
In reply to#242699
On 6/12/21 13:15, Keith Bainbridge wrote:
> 
> On 6/12/21 06:56, David Christensen wrote:
>>
>> On Debian 9 (and 10, and earlier?) with Xfce Terminal, when I select 
>> an entire line of text in one terminal and then middle click paste in 
>> another terminal window, the entire line is pasted; including the 
>> newline.
> 
> David
> 
> You need to activate the copy text on highlight option in preferences. 
> As I recall, right click in xterm to get preferences.
> 


Sorry   Should have read further.
-- 
All the best

Keith Bainbridge

keithrbaugroups@gmail.com

[toc] | [prev] | [next] | [standalone]


#242708

FromKeith Bainbridge <keithrbaugroups@gmail.com>
Date2021-12-06 03:20 +0100
Message-ID<DrbLH-4Jm-3@gated-at.bofh.it>
In reply to#242699
On 6/12/21 06:56, David Christensen wrote:
> 
> On Debian 9 (and 10, and earlier?) with Xfce Terminal, when I select an 
> entire line of text in one terminal and then middle click paste in 
> another terminal window, the entire line is pasted; including the newline.

David

You need to activate the copy text on highlight option in preferences. 
As I recall, right click in xterm to get preferences.

-- 
All the best

Keith Bainbridge

keithrbaugroups@gmail.com

[toc] | [prev] | [next] | [standalone]


#242709

FromDavid Christensen <dpchrist@holgerdanske.com>
Date2021-12-06 03:50 +0100
Message-ID<DrceJ-4S1-1@gated-at.bofh.it>
In reply to#242708
On 12/5/21 6:15 PM, Keith Bainbridge wrote:
> 
> On 6/12/21 06:56, David Christensen wrote:
>>
>> On Debian 9 (and 10, and earlier?) with Xfce Terminal, when I select 
>> an entire line of text in one terminal and then middle click paste in 
>> another terminal window, the entire line is pasted; including the 
>> newline.
> 
> David
> 
> You need to activate the copy text on highlight option in preferences. 
> As I recall, right click in xterm to get preferences.


Right-click -> "Preferences" ->  "General" -> "Clipboard" -> 
"Automatically copy selection to clipboard" is a checkbox.  Whether 
checked or unchecked, the behavior is the same when I paste an entire 
line into a terminal.


I have previously seen this behavior with Debian 9 and 10 terminals that 
have SSH connections to FreeBSD 12.2.


David

[toc] | [prev] | [next] | [standalone]


#242710 — Re: Debian 11.1, xfce4-terminal, select entire line, middle-click, newline not pasted

FromMike Kupfer <mkupfer@alum.berkeley.edu>
Date2021-12-06 05:40 +0100
SubjectRe: Debian 11.1, xfce4-terminal, select entire line, middle-click, newline not pasted
Message-ID<DrdXb-60J-3@gated-at.bofh.it>
In reply to#242699
David Christensen wrote:

> On Debian 9 (and 10, and earlier?) with Xfce Terminal, when I select
> an entire line of text in one terminal and then middle click paste in
> another terminal window, the entire line is pasted; including the
> newline.
[...]
> On Debian 11,  when I select an entire line of text in one terminal
> and then middle click paste in another terminal window, the line is
> pasted without the newline; requiring me to select the target window
> and press <Return>.

If you use bash,
https://utcc.utoronto.ca/~cks/space/blog/unix/BashBracketedPasteChange
probably explains what you're seeing.

regards,
mike

[toc] | [prev] | [next] | [standalone]


#242712 — Re: Debian 11.1, xfce4-terminal, select entire line, middle-click, newline not pasted

From"Thomas Schmitt" <scdbackup@gmx.net>
Date2021-12-06 09:30 +0100
SubjectRe: Debian 11.1, xfce4-terminal, select entire line, middle-click, newline not pasted
Message-ID<DrhxL-8gf-1@gated-at.bofh.it>
In reply to#242710
Hi,

Mike Kupfer wrote:
> If you use bash,
> https://utcc.utoronto.ca/~cks/space/blog/unix/BashBracketedPasteChange
> probably explains what you're seeing.

This is one of the mornings when i look into my mailbox and want to
repeatedly scream a popular german 7-to-8 letter word.
No wonder that many people are reluctant to upgrade their operating
system after they got it to work as desired.

Maybe it's about time to create bashvuan ?


Have a nice day :)

Thomas

[toc] | [prev] | [next] | [standalone]


#243221

FromDavid Wright <deblis@lionunicorn.co.uk>
Date2021-12-17 18:00 +0100
Message-ID<DvoKm-4Ae-5@gated-at.bofh.it>
In reply to#242712
On Mon 06 Dec 2021 at 09:28:33 (+0100), Thomas Schmitt wrote:
> Mike Kupfer wrote:
> > If you use bash,
> > https://utcc.utoronto.ca/~cks/space/blog/unix/BashBracketedPasteChange
> > probably explains what you're seeing.
> 
> This is one of the mornings when i look into my mailbox and want to
> repeatedly scream a popular german 7-to-8 letter word.
> No wonder that many people are reluctant to upgrade their operating
> system after they got it to work as desired.
> 
> Maybe it's about time to create bashvuan ?

Having just started using bullseye, I must admit I'm already missing
the inverse-video aspect of bracketed paste when I go back to buster
(where I manually configured bracketed paste after seeing this thread).

However, I was already setting   XTerm*cutNewline: false, and I do
paste at point(emacs)/cursor position, and not where I pasteClick¹.
Whether you use these two options might influence how desirable
bracketed paste is in the first place. It's a matter of taste.

¹ Paste at point is obviously more beneficial when you paste as
  frequently by keyboard (Shift-Insert) as by mouse ("middle"
  button), the position of the mouse being indeterminate or even
  invisible with the keyboard paste.

Cheers,
David.

[toc] | [prev] | [next] | [standalone]


#242731

FromDavid Wright <deblis@lionunicorn.co.uk>
Date2021-12-06 22:30 +0100
Message-ID<DrtIC-73O-3@gated-at.bofh.it>
In reply to#242710
On Sun 05 Dec 2021 at 19:46:57 (-0800), Mike Kupfer wrote:
> David Christensen wrote:
> 
> > On Debian 9 (and 10, and earlier?) with Xfce Terminal, when I select
> > an entire line of text in one terminal and then middle click paste in
> > another terminal window, the entire line is pasted; including the
> > newline.
> [...]
> > On Debian 11,  when I select an entire line of text in one terminal
> > and then middle click paste in another terminal window, the line is
> > pasted without the newline; requiring me to select the target window
> > and press <Return>.
> 
> If you use bash,
> https://utcc.utoronto.ca/~cks/space/blog/unix/BashBracketedPasteChange
> probably explains what you're seeing.

Interesting, so I thought I'd try it out. Running buster at present,
bash is 5.0.3(1)-release, and I take it that the default is unchanged.

So I added   set enable-bracketed-paste on   to ~/.inputrc
and removed   XTerm*cutNewline: false   from ~/.Xresources
and restarted X.

The effect is as it says: if I triple-click on a line and then
paste it at a bash prompt, the line is pasted complete with the
newline. So the cursor is now at the start of the next (blank)
line, and can be scrolled back, with Left, into the text of the
unexecuted commandline.

With   set enable-bracketed-paste off   and   XTerm*cutNewline: true
the cursor would still be located at the end of the commandline.

(I've never seen any effects of highlighting being carried from
the copied text into the pasted text, as discussed in the link.
Perhaps that only comes with bash 5.1.)

There are two things that make me prefer the method I'm used to:

1) If you paste a triple-clicked line into the middle of a
commandline, you've now got to rubout the spurious newline
that was just added as part of the paste.

2) A pasted commandline sitting there with the cursor at the
beginning of the next line is visually indistinguishable from
a command that's busy working (or stuck in a loop) without
having produced any output. The only way you can tell them
apart is by pressing Left, and seeing whether the cursor
moves back to the previous line, or else vomits ^[[D.

Are there any benefits? The only one I've thought of is that
if you accidentally paste a chunk of plain text into a bash
prompt, you get a chance to remove it all before bash tries
to execute it. Without bracketed paste, bash would immediately
try to execute each and every line of the pasted text—oops.

So I have reverted to my   XTerm*cutNewline: false
but will stick with bracketed paste for a while just to see
whether I notice any other benefits.

Cheers,
David.

[toc] | [prev] | [next] | [standalone]


#242734

FromDavid Christensen <dpchrist@holgerdanske.com>
Date2021-12-07 02:40 +0100
Message-ID<DrxCx-RK-5@gated-at.bofh.it>
In reply to#242710
On 12/5/21 7:46 PM, Mike Kupfer wrote:
> David Christensen wrote:
> 
>> On Debian 9 (and 10, and earlier?) with Xfce Terminal, when I select
>> an entire line of text in one terminal and then middle click paste in
>> another terminal window, the entire line is pasted; including the
>> newline.
> [...]
>> On Debian 11,  when I select an entire line of text in one terminal
>> and then middle click paste in another terminal window, the line is
>> pasted without the newline; requiring me to select the target window
>> and press <Return>.
> 
> If you use bash,
> https://utcc.utoronto.ca/~cks/space/blog/unix/BashBracketedPasteChange
> probably explains what you're seeing.
> 
> regards,
> mike


That solves it.  Thank you.  :-)


David

[toc] | [prev] | [standalone]


Back to top | Article view | linux.debian.user


csiph-web