Tag Info

New answers tagged


X11 uses two buffers: PRIMARY and CLIPBOARD. To copy/paste to the CLIPBOARD buffer you can often use CTRL-C and CTRL-V. You can insert to the PRIMARY buffer by selecting a text and paste from it by pressing the middle mouse button. If you want to use the CLIPBOARD buffer, put this in your ~/.Xresources file and use Ctrl+Shift+C and Ctrl+Shift+V to ...


Turns out, I didn't account for the fact that X11 has two buffers: primary and clipboard. My text from xterm was copied into primary buffer, while I needed it in clipboard buffer. I was able to fix the problem by installing parcellite package, launching it and configuring it to synchronize two buffers.


Open xterm and highlight the text you want to copy. Go to the application in which you wish to paste and hover the mouse cursor over the field you want to paste in. Click the scroll button on your mouse. (on laptops this can be done by pressing left and right click at the same time) When you highlight text, it copies the text to your primary buffer. Keep ...


You need to update $READLINE_LINE and $READLINE_POINT in the function. Insert xsel -o output at $READLINE_POINT of $READLINE_LINE. copy_line_from_x_clipboard() { local n=$READLINE_POINT local l=$READLINE_LINE local s=$(xsel -o) READLINE_LINE=${l:0:$n}$s${l:$n:$((${#l}-n))} READLINE_POINT=$((n+${#s})) } bind -x ...


X programs use DISPLAYs to work out what X11 instance to apply the program to. If you are the sole user of your host then most likely your display will be localhost:0 or often abbreviated to :0. you can find your DISPLAY variable by using: echo ${DISPLAY} To tell xclip to use that display, issue the -display command line option, or set the the DISPLAY ...


This should do it: xclip -selection c -o | xclip -selection c


I had been wanting to integrate Zsh's cut buffer with the X clipboard. I tried the aforementioned http://stchaz.free.fr/mouse.zsh but I found I disliked having all my Zsh operations populate the clipboard. For instance, sometimes I would copy something in a browser, and then go to a shell and edit the command line and then paste. But often editing the ...

Top 50 recent answers are included