Inconsistent copy/paste from XTerm to Abrowser

8 risposte [Ultimo contenuto]
Staircase
Offline
Iscritto: 02/24/2022

When I highlight text in XTerm and try to paste that text into Abrowser, sometimes, no text is pasted; some other times, I will need to copy/paste that text 4 or 5 times before I can manage to paste it in Abrowser; sometimes copy/paste will function from one XTerm window to Abrowser, but won't work from another XTerm window (to the same Abrowser window); sometimes, copying (from XTerm) and pasting to Abrowser will work as expected, but not from all the XTerm windows I have running.

XTerm's man page stipulates:
selectToClipboard (class SelectToClipboard)
Tells xterm whether to use the PRIMARY or CLIPBOARD for SELECT tokens in the selection mechanism. The set-select action can change this at runtime, allowing the user to work with programs that handle only one of these mechanisms. The default is “false”, which tells it to use PRIMARY.

I struggle to understand what 'set-select' and runtime mean, but I understand that by default, XTerm copies to the PRIMARY buffer, and that if I want XTerm to copy to the CLIPBOARD buffer I should add 'XTerm*selectToClipboard: true' to the file ~/.Xressources, which I did.

In my .Xressources file, I have:

! highlight to CLIPBOARD to copy/paste from Xterm to another application
XTerm*selectToClipboard: true

! not sure whether is useful
XTerm*loginShell: true

! font and size
xterm*faceName: Monospace
xterm*faceSize: 11

! terminal colors
xterm*foreground: rgb:a8/a8/a8
xterm*background: rgb:00/00/00
xterm*cursorColor: hotpink
xterm*color0: rgb:00/00/00
xterm*color1: rgb:a8/00/00
xterm*color2: rgb:00/a8/00
xterm*color3: rgb:a8/54/00
xterm*color4: rgb:00/00/a8
xterm*color5: rgb:a8/00/a8
xterm*color6: rgb:00/a8/a8
xterm*color7: rgb:a8/a8/a8
xterm*color8: rgb:54/54/54
xterm*color9: rgb:fc/54/54
xterm*color10: rgb:54/fc/54
xterm*color11: rgb:fc/fc/54
xterm*color12: rgb:54/54/fc
xterm*color13: rgb:fc/54/fc
xterm*color14: rgb:54/fc/fc
xterm*color15: rgb:fc/fc/fc

!! Xpdf
xpdf*initialZoom: page

I am wondering why isn't copying/pasting from XTerm to Abrowser consistent. I might be missing something but I don't know what that is.

Any hint would be welcome.

PS I use Awesome Window Manager, and:

$ uname -a
Linux x220 5.15.0-130-generic #140+11.0trisquel30 SMP Fri Dec 20 10:01:59 UTC 2024 x86_64 x86_64 x86_64 GNU/Linux
$ xterm -v
XTerm(372)

Avron

I am a translator!

Offline
Iscritto: 08/18/2020

> When I highlight text in XTerm and try to paste that text into Abrowser

Are you selecting by highlighting and then pasting by clicking middle button (I believe, this is using the PRIMARY selection)? Or, after you select, are you using some keyboard shortcut (in mate-terminal, it is Ctrl+Shift+C) to get the selection into the CLIPBOARD and then pasting with Ctrl+V or Ctrl+Shift+V?

Staircase
Offline
Iscritto: 02/24/2022

> Are you selecting by highlighting and then pasting by clicking middle button (I believe, this is using the PRIMARY selection)? Or, after you select, are you using some keyboard shortcut (in mate-terminal, it is Ctrl+Shift+C) to get the selection into the CLIPBOARD and then pasting with Ctrl+V or Ctrl+Shift+V?

I select text by highlighting, and then paste it in the navigation bar of Abrowser by pressing Shift+Insert.

I've tried pasting by clicking the middle button of the mouse, in the past, and it has worked, but I usually don't use a mouse so I can't tell whether pasting by clicking middle button is inconsistent as well.

I've just tried Ctrl+V and Ctrl+Shift+V and I have the same issue. Nothing is pasted.

Thanks for the questions.

Ark74

I am a member!

I am a translator!

Offline
Iscritto: 07/15/2009

From XTerm to: Abrowser a file, Abrowser a form, Abrowser a website, Abroswer Online Matrix client?

Maybe something related to this:

Regards

Staircase
Offline
Iscritto: 02/24/2022

> From XTerm to: Abrowser a file, Abrowser a form, Abrowser a website, Abroswer Online Matrix client?

Thanks for asking for clarifications.

I copy text from XTerm to paste it in the navigation bar of Abrowser, most of the time.

I just tried pasting in an Issue in a repository on Codeberg.org, in vain. Same problem.

> https://trisquel.info/en/forum/element-web-matrix-paste-issue
> https://trisquel.info/en/wiki/never-simply-copy-and-paste-commands

I have dom.event.clipboardevents.enabled set as false.

I've tried setting dom.event.clipboardevents.enabled to true, but nothing is pasted still. Or: as it is often the case, I can copy/paste from the *first* XTerm window (the one that starts with AwesomeWM) to the nav of Abrowser, but I can't copy (and paste to Abroswer) from XTerm windows I open subsequently. That's also why I tried adding 'XTerm*loginShell: true' to the file ~/.Xresources.

Staircase
Offline
Iscritto: 02/24/2022

> I've tried pasting by clicking the middle button of the mouse, in the past, and it has worked,

My mistake. Clicking the middle button does not paste anything either - like when I try to paste by pressing Shift+Insert and that nothing is pasted.

prospero
Offline
Iscritto: 05/20/2022

> I am wondering why isn't copying/pasting from XTerm to Abrowser consistent.

Are you observing the same behavior from XTerm to your text editor?

Staircase
Offline
Iscritto: 02/24/2022

> Are you observing the same behavior from XTerm to your text editor?

I just downloaded Pluma to test, and I observe the same inconsistent behaviour as when I try to copy/paste text from XTerm to the navigation bar of Abrowser.

i.e. Right now, I can copy/paste text from the XTerm window that was first open when awesomeVM started, to Pluma, but when I try to copy/paste text from XTerm windows I open subsequently, still to Pluma, nothing is pasted.

(Otherwise, I use Vim and I have no issue copy/pasting text from XTerm to Vim; I highlight text in XTerm and paste with Shift+Insert.)

Avron

I am a translator!

Offline
Iscritto: 08/18/2020

My usual keyboard does not have any Insert key, I just found that on my laptop that has a numeric pad (that I never use), there is "Ins" on the zero key, so I tried.

My observations:
- pressing middle mouse button is pasting what I highlighted
- Shift+Insert is pasting what was highlighted when I last pressed Ctrl+Shift+C, if what was highlighed is in a MATE terminal, or when I last pressed Ctrl+C in abrowser, if what was highlighted was in abrowser (and then, pressing the middle button is pasting the same)
- in Pluma, Shift+Insert just changes between insert and overwrite mode