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

xclipboard resolves Aqua-X11 copy/paste barrier UNIX
At my job, I use X11 nonstop to access various application servers. Naturally, I often need to interoperate between these servers and my 10.3.5 native applications. I am using Apple's X11 1.0 Xfree86 4.3.0. I have had a major problem doing a copy from Aqua and paste into X11. Copy from X11 and paste into Aqua works fine, but not the other way. The Aqua clipboard would seemingly never paste into anything except xterm -- and that required the stupid option-click nonsense.

Recently I discovered the little X11 utility xclipboard (included with Apple's X11). This has made a big difference (and seems to have exposed a bug). It presents the current contents of the X clipboard, and will also keep a list of clippings that have been made. If I copy in Aqua, then click in xclipboard, then click in my target X11 app, I can paste there. This is pretty low impact for getting things done.

I have also noticed that very often xclipboard displays my Aqua clipping automatically, but then if I click one of my target X11 apps, the previous X11 clip contents get pasted in, superseding what I just copied from Aqua. But then I can get it back by hitting the [Prev] button in xclipboard, and use the same data anyway.

Maybe I have my X11 set up wrong, but even if I do, I can fix it with xclipboard.
    •    
  • Currently 1.00 / 5
  • 1
  • 2
  • 3
  • 4
  • 5
  (2 votes cast)
 
[23,961 views]  

xclipboard resolves Aqua-X11 copy/paste barrier | 25 comments | Create New Account
Click here to return to the 'xclipboard resolves Aqua-X11 copy/paste barrier' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
No barrier for me...
Authored by: rhowell on Oct 04, '04 11:57:40AM
To copy from an Aqua application and paste to an X11 application:

Select the text in the Aqua application, then Command-C.

Place the cursor in the X11 application, then Option-click (or click the middle mouse button on a multi-button mouse, but I've got mine set for Expose instead).

To copy from an X11 application and paste to an Aqua application:

Select the text in the X11 application, the Command-C (not Ctrl-C. You want X11 --an Aqua app-- to copy the contents, not the specific app running within X11).

Place the cursor in the Aqua application, then Command-V.

Make sure you've got "Emulate three button mouse" selected in the X11 Preferences (it is by default).

[ Reply to This | # ]
Sorry...
Authored by: rhowell on Oct 04, '04 12:08:28PM

I see you wrote "stupid option-click nonsense" in the original hint. My bad.



[ Reply to This | # ]
Modified double-click in xterm
Authored by: durham1 on Jul 11, '05 06:57:18PM

Works for me in both directions too (10.4.1, X11 v1.0, XFree86 v4.3.0)

I have made one change to my X11 setup the makes copying/pasting easier, and makes the experience more "linux like":

If you add the following to /usr/X11R6/lib/X11/app-defaults/Xterm

*charClass: 33:48,37:48,45-47:48,64:48

the next time you start an Xterm, double-clicking in the window will select a whole file name (including the extension) or directory path in the same manner as linux Xterms (btw, it would be wise to back up the '....../app-defaults/Xterm' file first).



[ Reply to This | # ]
Modified double-click in xterm
Authored by: ua on Dec 16, '05 06:13:04PM
It's much safer to put this command into your perfect .Xdefaults file. This command will implement the above preferences in a [safer] manner:

echo '*charClass: 33:48,37:48,45-47:48,64:48' >> ~/.Xdefaults

You'll have to open a new XTerm window for the changes to become active.

[ Reply to This | # ]

xclipboard resolves Aqua-X11 copy/paste barrier
Authored by: wgscott on Oct 04, '04 12:28:16PM

I would recommend that anyone who spends more than 5 minutes a day with X-windows programs obtain a 3 button mouse (scroll wheel = middle mouse button) or you will really go nuts.

Lots of programs use key combinations, or press middle button and hold, and so on. These are next to impossible to emulate.

You can also set terminal to copy selection into buffer, and you can set iTerm to do this and to use middle-button-paste.

One word of caution: Don't install custom mouse drivers. Use OS X defaults, as all the custom drivers I have used ruin the middle button default functionality.



[ Reply to This | # ]
xclipboard resolves Aqua-X11 copy/paste barrier
Authored by: m5comp on Oct 04, '04 01:36:01PM

Some mouse drivers (Microsoft) allow you to disable their special features in certain applications; I have mine set to be disabled in X11.app, and middle-clicking works fine there (I do wish I could program button 4 or 5 to be the middle-click button instead--sometimes it's not easy to push down on a scroll wheel without it turning.)



[ Reply to This | # ]
xclipboard resolves Aqua-X11 copy/paste barrier
Authored by: kps on Oct 04, '04 02:33:39PM
xmodmap(1) is your friend: for instance,
xmodmap -e "pointer = 1 4 3 2 5"
will interchange the functions of the second and fourth buttons.

[ Reply to This | # ]
xclipboard resolves Aqua-X11 copy/paste barrier
Authored by: m5comp on Oct 05, '04 01:26:37PM
The
xmodmap -e "pointer = 1 4 3 2 5"
command didn't work; after I executed that command in xterm, no button produced a middle-click. :-(

[ Reply to This | # ]
xclipboard resolves Aqua-X11 copy/paste barrier
Authored by: m5comp on Oct 05, '04 01:39:05PM

After I restarted X11 and began playing around with the mouse buttons, I discovered that button 4 and button 5 send a middle-click by default, without using xmodmap. I wish I'd known that sooner. :-\



[ Reply to This | # ]
xclipboard resolves Aqua-X11 copy/paste barrier
Authored by: kps on Oct 05, '04 10:27:06PM

Strange. I've just tried it again with a Microsoft mouse and it did work as I said; however, I have never installed any third-party mouse software, MS or otherwise. BTW, although I would still prefer a proper middle button, I've found that some mice I've tried (Logitech and Belkin, specifically) have wheels that are stiffer and less prone to unintentional rotation than the MS mice.



[ Reply to This | # ]
xclipboard resolves Aqua-X11 copy/paste barrier
Authored by: gdelfino on Oct 04, '04 04:59:40PM
The Kensington MouseWorks software lets you set any of your mouse buttons to "left-click", "right-click", "middle-click", "button4-click" or "button5-click". So it works great with X11!

On the other hand, if you buy a Logitech mouse, don't install the software as it is very limited.

[ Reply to This | # ]

xclipboard resolves Aqua-X11 copy/paste barrier
Authored by: n8gray on Oct 05, '04 02:35:24AM

Thanks for this tip! I have an MS mouse but I uninstalled the software when I found out I couldn't assign the middle-click button to, *gasp*, middle-click. I'm a heavy X11 user and I thought this was the kiss of death, but now I'll take another look.



[ Reply to This | # ]
autocutsel
Authored by: ssevenup on Oct 04, '04 04:36:54PM

Anybody looked at a Fink package called autocutsel? I use XDarwin and not the Apple X with quartz-wm. autocutsel background syncs the two clipboards for you and they act more or less as one. It's pretty cool.

--MM

---
Mark Moorcroft
ELORET Corp. - NASA/Ames RC
Sys. Admin.



[ Reply to This | # ]
xclipboard resolves Aqua-X11 copy/paste barrier NOT
Authored by: cyberRodent on Oct 04, '04 06:42:18PM

This hint does not work (for me at least) - os 10.3.5 with X11 1.0 Xfree 4.3.0 (from apple)

I can copy from X to X or from Aqua to Aqua -- Rarely, when the gods are happy, I can copy from x to aqua using the Command-C Copy from the Apple Menu at the top and I have NEVER been able to copy from Aqua to X -- using xclipboard does not seem to have any effect wrt copy and paste - I get by by makinglittle text files with what I want to copy and paste....(ug)

If someone CAN in fact pull this off in either direction please post what you did to make this so - prefereably without the need of an external mouse (yes, i'm using a powerbook)

maybe the windowmanager has a role to play here? - I'm using Enlightenment FWIW.

kisses, Jeff



[ Reply to This | # ]
xclipboard resolves Aqua-X11 copy/paste barrier NOT
Authored by: n8gray on Oct 05, '04 03:05:32AM
Yes, it's your window manager. Well, sort of. Apple's QuarzWM has a built-in clipboard sync feature. If you run a different WM you should add a line to your .xinitrc:
  /usr/X11R6/bin/quartz-wm --only-proxy &
  (start your WM here)
This will tell it to just do the clipboard syncing and leave the window management up to somebody else. You might also try autocutsel that Mark Moorcroft mentioned above, which should serve the same purpose.

[ Reply to This | # ]
xclipboard resolves Aqua-X11 copy/paste barrier
Authored by: n8gray on Oct 05, '04 02:15:50AM

I spend all day using Apple X11 and QuartzWM in rootless mode and I've never had too many problems with copy/paste between the two domains. I do have one persistent problem, though. I can't copy in Aqua and paste in Konsole. It just never works. I have to first paste into NEdit, which always works, then select in NEdit and middle-click in konsole.

Interestingly, I just tried this with xclipboard open and now I *can* paste into konsole! The x clipboard is updated when X11 gets focus and I can paste by right-clicking and selecting Paste. Middle-clicking to paste still doesn't work, however. It's a mystery to me, but it works...



[ Reply to This | # ]
CLIPBOARD vs SELECTION
Authored by: oilcan on Oct 05, '04 04:43:43PM

This is because in X there are two independent methods of copy/paste, which can be referred to as using either the CLIPBOARD or the SELECTION. Using quartz-wm --only-proxy synchronizes the OS X clipboard with the X CLIPBOARD. The data located there may be pasted by an X application using the paste command (typically ctrl-v). Using the copy command in an X application (typically ctrl-c) also copies the desired data into the CLIPBOARD. When data is selected in X it is preserved in the SELECTION (any may also be copied into the CLIPBOARD using ctrl-c). Whatever is in the SELECTION may be pasted using the middle-mouse button. The middle-mouse button only pastes what is in SELECTION and not what is in the CLIPBOARD. This is why when you copy something into the OS X clipboard you cannot ordinarily paste it into an X application using the middle mouse button. Most desktop environments in X (eg KDE or Gnome) and some window managers (but not quartz-wm) will allow you to also synchronize the SELECTION and CLIPBOARD, allowing you to use the middle mouse button to paste what is in the CLIPBOARD (or use ctrl-v to paste the SELECTION).

oilcan



[ Reply to This | # ]
CLIPBOARD vs SELECTION
Authored by: n8gray on Oct 05, '04 05:33:23PM

I can understand that, but originally I also couldn't Paste into Konsole using the Paste item of the right-click context menu, which should have used CLIPBOARD. Xclipboard fixes that, but I don't know why it didn't work originally.

In any case, thanks for the info.



[ Reply to This | # ]
xclipboard resolves Aqua-X11 copy/paste barrier
Authored by: ms_t_rie on Oct 05, '04 11:27:31AM

Is there a solution for Xquartz cut/paste? I find that I can't copy and paste between Xquartz and anything else, in either direction.

Or should I be using something else instead of Xquartz that will allow it, right now I have a simple one line command that connects to the standard Solaris display, and Xquartz always seemed to work the best.



[ Reply to This | # ]
xclipboard resolves Aqua-X11 copy/paste barrier
Authored by: n8gray on Oct 05, '04 02:59:52PM

See my post above in reply to cyberRodent. You can run the clipboard sync aspect of quartz-wm as a separate program. Really, though, you should probably use X11.app as an application rather than going directly to Xquartz unless you have a reason not to.



[ Reply to This | # ]
xclipboard resolves Aqua-X11 copy/paste barrier
Authored by: ms_t_rie on Oct 06, '04 12:05:58PM

Well, I don't know HOW to use the X11.app directly, if I did, that might be a work around :)

Right now, all I have to do is type <b>/usr/X11R6/bin/Xquartz -once -query <i>servername</i> -xinerama</b> and I'm presented with the Solaris login screen, and have full X Windows functionality. There are some things that have to be installed using the GUI interface and Telnet isn't sufficient for those. (BEA Weblogic Servers and such)

I could try using X11 if I knew what to type for it :) I'm far from being a newbie to computers, but I'm more familiar with mainframes and PCs, the Mac is new to me.



[ Reply to This | # ]
xclipboard resolves Aqua-X11 copy/paste barrier
Authored by: phobos24 on Oct 28, '04 08:42:16AM

If you want to use X11 it must be installed.
If you are using MaxOs 10.3 it is already installed.
If you are using 10.2 it might be the easiest to install Fink and with it X11.
If you are using 10.1 you should upgrade.

Anyway: If X11 it is installed, it should be in your Application folder and its called
X11. Open that and a terminal similar to the real terminal program can
be seen, but it is X11.



[ Reply to This | # ]
xclipboard resolves Aqua-X11 copy/paste barrier
Authored by: ms_t_rie on Oct 28, '04 11:31:24AM

Yeah, I had X11 already installed, but the only difference seems to be this message when trying to launch xclipboard:
AUDIT: Thu Oct 28 10:27:18 2004: 496 X: client 16 rejected from local host

I'm using the same command to connect that I used in Terminal, I've tried X and Xquartz, both give the same error message when trying to run xclipboard.



[ Reply to This | # ]
xclipboard resolves Aqua-X11 copy/paste barrier
Authored by: Han Solo on Nov 29, '05 01:16:53PM

This hint works great with Matlab v7.x running on a remote server. In fact, in my experience I need only have xclipboard open -- I do not have to click on it to process copying from an OS X application (Command-C) and pasting in Matlab (Control-V). FWIW, I'm running 10.4.2 locally. Thanks!



[ Reply to This | # ]
xclipboard resolves Aqua-X11 copy/paste barrier
Authored by: Lliwynd on Mar 12, '07 03:17:22PM

I was also having paste issues to a remote xterm. I had X11.app running locally and used ssh-X to get into the remote machine. Then paste would only work in the original xterm. If I opened a new xterm on the remote machine, I wouldn't be able to paste.

The solution was to use 'trusted X11 forwarding' in ssh (as opposed to normal X11 forwarding): ssh -Y. Apparently there is a security hole if you do this in that root on the remote machine can keylog, etc. But it allows paste to work.



[ Reply to This | # ]