Clearing xterm clipboard/selection/cutbuffer

Ras Far rasfar at gmail.com
Tue Mar 13 21:21:03 PDT 2012


Actually I managed to solve this -- honestly I had been working on it
for a long time before writing to the list, funny how that can happen!

I find that the combination of the following works; neither alone is enough:

xsel --clear --primary      (same as xsel -c)
xcb -s 0-7 < /dev/null      (actually xcb -s 0 < /dev/null suffices)

Hope this helps someone somewhere sometime...

Kind Reg'ds,
Ras

On Wed, Mar 14, 2012 at 12:02 AM, Ras Far <rasfar at gmail.com> wrote:
> Hi,
>
> I'm having difficulty clearing the clipboard/selection/cutbuffer.  Any
> combination of xsel -[cd] -[psb] fails to clear a selection made in
> xterm using standard left-drag.
>
> I can SET the selection with xsel -i but it cannot be empty, so the
> best I can do is replace the current selection with a space.  Not
> terrible, been doing that manually for a long while, after each
> selection, since accidental pastes can be disastrous.  But I'd like it
> to be really empty, the way it is when first start X, prior to having
> made any selections.
>
> I've also tried xclip, xcutsel, and changing the xterm
> selectToClipboard resource to true...  Even tried hacking xsel.c
> source but had no luck there either!
>
> My system is Ubuntu 11.04 (GNU/Linux 2.6.38-13-generic i686), twm,
> X.Org X Server 1.10.1.
>
> Can anyone suggest what's going wrong with xsel -c/-d?
>
> Kind Reg'ds,
> Ras



More information about the xorg mailing list