dwm: pasting to X

There are two ways to paste to X without a mouse that I know of: xclip and sselp (from ports)

When I bind either of these to a shortcut in dwm (Alt+v), or invoke them through dmenu, I do not see the output printed to the current X context (xterm etc), but instead printed to the console (i.e. I can Ctl-Alt-F1 and see sample text I inserted into the clipboard via xclip -i)

I have DISPLAY set to "127.0.0.1:0.0". I have tried setting -d in xclip also.

Any ideas?
Thanks in advance
brad
 
I think you use it in wrong way

Code:
$ xclip -o < some_file
If you want to get this text typed in console, you need to pipe xclip -o output to some kind of app that can emulate typing keyboard (don't remember name, but there is something in ports)

Well at least that's what I think (I might be right, I might be wrong)


Also if you want to past selected text to terminal, you can simply press middle mouse button in terminal :) (or any other app, for that matter)
 
Well thanks for the reply but doing the copy/paste without the mouse was the point :)

In any case I have figured it out:

To copy:
Code:
echo "text to copy" | xclip -selection clipboard

To paste, just use whatever application designates as paste...i.e. Ctrl+V in firefox.
 
Back
Top