Copying large text within xterm

I use xterm and I really like it, but I can’t understand what settings I need to add to the Xresources file so I could copy large amounts of text on one go.
I have select to clipboard enabled, but if I select the text in the view, I can’t scroll with the mousewheel, and when I jump with a keyboard the selection is messed up. I know the right mouse click too, but it doesn’t really help as I can’t scroll without losing the selection.

This should work-
Start selection with L click and drag to select text.
Scroll up or down to end of selection you want
Right Click.

Paste with middle mouse or Shift+insert

I never presume to speak for the Qubes team.
When I comment in the Forum I speak for myself.

But how?
I can’t scroll with the mouse wheel. And if I scroll with keyboard and then right click it, the selection copied is only from the last view(without the starting point where I left clicked it).

That is strange. Are the mouse buttons properly assigned?

I also use xterm a lot and had no problems scrolling with middle-button or two-finger dragging on the trackpad. Another idea: you can enable a scrollbar to be shown at all times by adding “-sb” to the xterm command line.

Where do I assign them? They work with everything else. I can scroll with other terminals without an issue.
The “-sb” command is the same as xterm*scrollBar option and I tried that and it doesn’t work for me. Even with trackpad.

You know that you have to right-click on xterm’s scrollbar in order to scroll up? (default bindings)

I didn’t know that actually :smile: but it doesn’t work either. I can scroll with keyboard arrows up and down only

I don’t know then :man_shrugging:
Can suggest using screen or tmux which have robust text-copying features, independent (mostly…) of the terminal.

1 Like

Can we take a step back?
Is this the behavior you see in all templates and qubes, or is it only
present in one or two?

Focus on one case:
What template are you using?
Does this affect the template and all qubes based on it?
Have you made any modification in the template or affected qubes?
What Window Manager as you using?
Have you made any significant configuration changes there?

I’m assuming that middle wheel scrolling works fine in other
applications, as do L click and R Click, and that your issues only
affect Xterm
. Can you confirm this is so?

I never presume to speak for the Qubes team.
When I comment in the Forum I speak for myself.

? Well, you can also just scroll with the wheel, and (better) Shift+PgUp
Shift+PgDn

I never presume to speak for the Qubes team.
When I comment in the Forum I speak for myself.

All of them. I just tried on fresh template of debian 13 XFCE and fedora 42 XFCE with same results.

Debian 13 minimal

Yes

Yes I did, but as I said I tried with fresh templates to test it.

I don’t know, how do I check? I think it’s kwin because I use KDE

With the WM? no.

Yes.

I also tried xterm in dom0 and when I’m on the scrollbar I actually can see the arrow up when clicking the L click and arrow down when I click R click, but it doesn’t scroll anywhere. middle wheel doesn’t work at all.

Thanks for the detailed reply.
I’m hitting the edge of what can be done with remote support. At the
moment,m it’s a classic “works for me”

Are you copying the output of commands shown in the xterm? Or What?
Where are you trying to paste? In command window? In vi session? Where?

I never presume to speak for the Qubes team.
When I comment in the Forum I speak for myself.

Different things really, sometimes it’s some errors I try to feed to the AI or some simple coping between files(but partially) etc.

Usually it’s a different qube. So I have the copy to selection property on and then just select the text and shift+ctrl+c.

For most of the time it’s enough for me, but it’s already not covering all of my use cases so later on the demand for such coping will only grow.

Thanks for this.
Can you say what you did to have “select to clipboard enabled”?
I’m trying to duplicate your setup, and I’ll come back to it tomorrow.

I never presume to speak for the Qubes team.
When I comment in the Forum I speak for myself.

1 Like

It’s not much really.
To test this out and make your life as easier as possible I just cloned a fresh debian 13 xfce and all I did is edited the ~/.Xresources for:

Xft.antialias:          1
Xft.hinting:            1
Xft.rgba:               rgb
Xft.hintstyle:          hintslight
Xft.lcdfilter:          lcddefault
xterm*scrollBar: true
xterm*selectToClipboard: true

I added only the last two lines to the defaults really

And, it works just fine for me.

ps aux to generate much text - Select from top - scroll to bottom,
right click, and I can paste it in separate xterm with middle click.

I’d go back to the question why you cant scroll in your xterm, but I’m
not clear where to start with that one.

Can you select small areas of text and paste those?

I never presume to speak for the Qubes team.
When I comment in the Forum I speak for myself.

1 Like

I’m just an idiot… with the ps aux I actually can scroll and use the scrollbar with the mouse clicks, everything works. It’s when I try to nano /usr/share/applications/thunar.desktop for example and then the scrolling is not working with the mouse. And this is what makes it difficult to copy and copy to other qube if needed.
I’ll dig into it.