copy and pasting from an xterm between vms

153 views
Skip to first unread message

Jake

unread,
May 4, 2015, 9:27:26 PM5/4/15
to qubes...@googlegroups.com
i do a lot of work with console/text UIs and have problems with the
qubes copy and paste dance when copying from text in an xterm to another vm.

more specifically, copying from a gui application into an xterm works fine

(highlight text) -> (ctrl-c) -> (ctrl-shift-c) -> (select other vm
window) -> (ctrl-shift-v) -> (mouse3/triple touch)

the opposite direction, where i highlight text in an xterm and try to
paste into a gui or another xterm does not work

(highlight text) -> (ctrl-c) -> (ctrl-shift-c) -> (select other vm
window) -> (ctrl-shift-v) -> (mouse3 or ctrl-v)

i have also tried the above sans the ctrl-c since highlighting text in
an xterm typically puts it in the paste buffer, which also does not
work. when pasting into the target, it will paste the last item that was
in the paste buffer when copying from a gui application.

is there a workaround for this? i would like to stick with using a
vanilla xterm if possible. i also recall there being a (very old) bug in
xterm that may be related to xterm having incorrect paste buffer handling.

regards,
jake

Jann Horn

unread,
May 5, 2015, 5:51:21 AM5/5/15
to Jake, qubes...@googlegroups.com
On Mon, May 04, 2015 at 09:27:17PM -0400, Jake wrote:
> i have also tried the above sans the ctrl-c since highlighting text in an
> xterm typically puts it in the paste buffer, which also does not work. when
> pasting into the target, it will paste the last item that was in the paste
> buffer when copying from a gui application.
>
> is there a workaround for this? i would like to stick with using a vanilla
> xterm if possible. i also recall there being a (very old) bug in xterm that
> may be related to xterm having incorrect paste buffer handling.

I think you want the selectToClipboard resource for that, or if you only want
to set it when needed: Hold ctrl, press and hold the middle mouse button
(left+right at the same time if you don't have a middle mouse button), move
the mouse over "select to clipboard" in the "VT options" menu that opens,
release the mouse. (If you get another menu, the left and right button were
pressed with a too big time interval in between.)

Jake

unread,
May 5, 2015, 7:03:59 AM5/5/15
to Jann Horn, qubes...@googlegroups.com
great, thanks jann. i've always used xterm in the context of a single
non-vm OS, so i've never had to force anything into the CLIPBOARD vs
PRIMARY.

i had to test it a bit and the method for turning on selectToClipboard
via ctrl+middle click+select on menu works fine for enabling in each
source vm. however, i did notice that, at least with these fedora
templates, you need to enable the resource in ~/.Xresources and _not_
~/.Xdefaults - it seems to not get picked up from ~/.Xdefaults for
whatever reason.

XTerm*selectToClipboard: true
Reply all
Reply to author
Forward
0 new messages