Submit Hint Search The Forums LinksStatsPollsHeadlinesRSS
14,000 hints and counting!

A workaround for X11/Aqua copy and paste problems UNIX
I have never had much luck using various techniques for getting clipboard contents back and forth between Apple's X11 and the normal Aqua OS X environment. I have tried various key commands, various X11 utilities like autocutsel, etc. and it just never seems to want to play nicely. Shouldn't be that hard - not sure what the problem is - but I suspect it has to do with the fact that I use a different window manager (Blackbox) inside X11, and I believe that Apple does not support copy/paste between Aqua and a 3rd party window manager running in X11. Either way, I find it to be a completely frustrating situation - having to do various kludges and workarounds just to copy/paste between the two environments.

Anyway, the following is not much better than other klduges and workarounds that I have found, except that it is at least reliable. What I do is use a recent tip for quickly creating notes via the terminal. I create an alias like this in my shell aliases file (mine is probably different than yours, so you will have to figure that out as it relates to your setup):

  # simple note taking
  alias note "echo `date +'%Y%m%d %H:%M - '` ${1} >> ~/Documents/notes.txt"
This allows me to quickly enter notes in the terminal like this:
  note "enter note text here"
So now the text is sitting in a text file in my documents directory. What I then do in Apple X11 is open a new Xterm window and enter this:
  tail -f ~/Documents/notes.txt"
I just leave that window open all the time. As I add stuff via notes/Aqua, the listing is updated dynamically in X11. So to copy and paste, I copy in Aqua, switch to terminal, paste as note, switch to X11, select the new text that has appeared in the Xterm window and center-click (your mouse may be different) to place the newly copied text into an Apple X11 window.

It shouldn't have to be this hard....

    •    
  • Currently 2.67 / 5
  You rated: 5 / 5 (3 votes cast)
 
[12,949 views]  

A workaround for X11/Aqua copy and paste problems | 6 comments | Create New Account
Click here to return to the 'A workaround for X11/Aqua copy and paste problems' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
PB CLI tools
Authored by: englabenny on May 16, '03 11:06:12AM
(To hint submitter, and others): Do you know about the apple-supplied terminal commands pbcopy and pbpaste? They would sure help you here. These commands allow you in the Terminal as well as in xterm to pipe to and from the mac os pasteboard. Select text in Camino, cmd-C, type pbpaste >> notes.txt into xterm and the text-content of the pasteboard is sent wherever you want...

[ Reply to This | # ]
PB CLI tools
Authored by: bluehz on May 16, '03 11:33:16AM

Yeah - I thought about using pb - but its still has to go somewhere to get somewhere. This way I also have a written record. Sort of like the tape on a adding machine. Now if we could figure out how to get pbcopy/pbpaste to work seamlessly where you just copy in Aqua then switch and paste into X11 - now that would be a treat!



[ Reply to This | # ]
Use quarzt-wm --only-proxy
Authored by: KOHb on May 16, '03 11:32:24AM
You can also run "quartz-wm" in proxy mode by adding quartz-wm --only-proxy & to your .xinitrc file.

Here's the excerpt from man quartz-wm:

--only-proxy
This option indicates that the program should not attempt to manage any of the display's screens. However the selection proxying features will still be enabled, meaning that a different window man- ager may be used, but cut and paste will work as if quartz-wm were running.
Then you copy by just selecting text in an X11 app and paste by Option-Clicking (middle mouse button). I'm using Apple's X11.

[ Reply to This | # ]
Use quarzt-wm --only-proxy
Authored by: bluehz on May 16, '03 11:40:43AM

SOLD!!! WE HAVE A WINNER!!!

You just made my day!!! I had no idea about the proxy stuff - just tried it and it works.

Thank you thank you thank you.

I recommend you post that as a hint in itself, if nothing else get in touch with Sao in the forums and let him drop it into the X11 FAQ.



[ Reply to This | # ]
quartz-wm --only-proxy
Authored by: sao on May 17, '03 02:54:00PM

Bluehz,

Check the "Public Beta FAQ" for Apple's X11 v0.3 here:

http://developer.apple.com/qa/qa2001/qa1232.html

----------------------------------------

Q: How do I make copy and paste work with other window managers?

A: Running quartz-wm --only-proxy will activate the selection proxying features, but none of the window management code.

----------------------------------------


Also at the forums, if you make a search, you will find two threads about the subject:

1- copying between aqua and x11

http://forums.macosxhints.com/showthread.php?s=&threadid=10824&highlight=quartzwm+onlyproxy

2- quartz-wm --help

http://forums.macosxhints.com/showthread.php?s=&threadid=9329&highlight=quartzwm+onlyproxy


Cheers...

Sao



[ Reply to This | # ]
quartz-wm --only-proxy
Authored by: galexand on Jan 04, '06 12:57:34PM

A websearch for this issue reveals the same faulty answer over and over "just use quartz-wm --only-proxy". Excuse me, this addresses half of the problem, has no one tested this over at Apple, or is documentation just a fad that hasn't caught on yet there?

Anyways, here is how you use quartz-wm for cut and paste without --only-proxy:
X11 to Aqua: highlight the text normally, then select Copy from the X11 menu, then paste it as normal.
Aqua to X11: "copy" the text normally, then paste the text normally

Here is how you use quartz-wm for cut and paste with --only-proxy:
X11 to Aqua: hah hah! fooled you! you thought --only-proxy solved the problem, didn't you? Nope!! No help here!
Aqua to X11: "copy" the text normally, then paste the text normally.

I've seen people point this out in detail only to be replied to with that same awful Apple FAQ answer over and over again on dozens of forums throughout the intarweb. The Apple FAQ is a cancer.

Anyways, pbcopy and pbpaste are great commandline tools that you can use to get around this problem. You just pipe data to/from these and it "does the right thing" to the Aqua "pasteboard."



[ Reply to This | # ]