clipboard - Odd behavior of xclip - Ask Ubuntu


the xclip manual says there 3 storage locations named primary (xa_primary), secondary (xa_secondary) , clipboard (xa_clipboard). copied (ctrl+c) text browser , examined contents of 3 locations mentioned above in terminal:

xclip -s primary -o xclip -s secondary -o xclip -s clipboard -o 

all 3 contain same text.

if type

date | xclip -selection xa_primary 

only xa_primary should contain date text. in fact other 2 i.e. xa_secondary, , xa_clipboard contain same text (date information). 3 1 , same? , if point?

what baffled me more, ctrl+shift+v (still in terminal mode) pastes orgiginal text copied browser! suggests shell's own clipboard in operation well.

does have example demonstarates 3 locations can hold different values @ same time , how relate regular clipboard?

unfortunately xclip silently ignores invalid command line options:

there no -s option both -selection , -silent start -s. have use @ least -se.

as xclip ignores -s option commands

xclip -s primary -o xclip -s secondary -o xclip -s clipboard -o xclip -s asdfghj -o 

all use default selection (primary).

for selection name first character used, , if s or c default used.

date | xclip -selection xa_primary date | xclip -selection xa_secondary date | xclip -selection xa_clipboard 

all use primary selection.

use like

date | xclip -se p    # write primary selection xclip -se c -o        # read clipboard 

Comments

Popular posts from this blog

download - Firefox cannot save files (most of the time), how to solve? - Super User

windows - "-2146893807 NTE_NOT_FOUND" when repair certificate store - Super User