[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: X-windows copy/paste mess [SOLVED]

On Mon, 21 Mar 2011 17:13:01 +0000 (UTC), I wrote:

> I'm running testing (Wheezy) and am failing to get copy/paste working cleanly
> among my most common windows, namely:
>  several xterms
>  virtualbox running a virtual XP client
>  iceweasel
> ...
> Is there any way to get all of these programs to use the same selection?  I'd
> be happy if xterm could be told to always copy to both PRIMARY and CLIPBOARD,
> but it seems you have to pick one or the other.

There were no follow-ups, so maybe no one was interested in this problem.
But I did eventually find a solution here:


and will post it in case anyone else can benefit.  The solution was to add
this to ~/.Xresources:

  XTerm*VT100.translations: #override <Btn1Up>: select-end(PRIMARY, CLIPBOARD,

I can't say that I fully understand the syntax, but supposedly it does the
  xterm copies a highlighted selection into both CLIPBOARD and PRIMARY (and
    also a cut buffer)
  text is pasted from CLIPBOARD if there is nothing in PRIMARY

Here are the results of copy/paste tests after the change:

  + xterm -> iceweasel URL window
  + iceweasel URL window -> xterm
  + iceweasel main window -> xterm
  + acroread -> xterm

  + xterm -> Explorer URL window
  + Explorer URL window -> xterm
  + Explorer main window -> xterm
  + xterm -> Word
  + Word -> xterm
  + Acrobat -> xterm

  + Explorer URL window -> iceweasel URL window
  - iceweasel URL window -> Explorer URL window
  - iceweasel URL window -> Word

Here Explorer, Word, and Acrobat were in the virtualbox XP client.  `+' means
the paste worked; `-' means it didn't.

Reply to: