I didn't think my solution through properly. This can be solved in a far superior manner with a FIFO (pipe).
Here's how to do it with just one xterm and one Terminal.app window/tab dedicated for the purpose.
mkfifo ~/tmp/paste
- In Terminal.app:
cat ~/tmp/paste
- leave this running - In the xterm:
cat > ~/tmp/paste
- leave this running - Paste whatever you want into the xterm that's redirecting its output to ~/tmp/paste.
- This text automagically appears in the Terminal.app window/tab. Copy it from there and into the application you wanted to provide it to in the first place.
4 comments:
Have you tried the pbcopy utility? It takes whatever is piped into it and place it in the clipboard. The other side of that is pbpaste which will print out whatever is in the clipboard.
Heh, I didn't even know that utility existed, nor did other MacOS X users I talked to.
I tried it now, and it doesn't seem to make things available to command+v in Firefox, Safari or Terminal, at least.
I tried all pasteboard options as well, but no go:
-pboard ruler
-pboard find
-pboard font
Strange. It works for me normally and worked when I tried in inside X11, but I never use X11 so there may be something else with it that can cause problems.
Well, this is related to a particular bug with the pasteboard in relation to X11 in Snow Leopard. The problem is exclusive to Snow Leopard + X11.
The utility works flawlessly outside X11.
Post a Comment