NASA Insignia
Site Title

OS X and X11 copy and paste

Lots of people get confused by how to copy-and-paste text back and forth between XQuartz and any other Aqua (OS X native) application. Hopefully, the table below will clarify:

PASTE COPY
From Aqua From X11
To Aqua native:
⌘-C; paste with ⌘-V
highlight (left mouse button drag), release mouse button,
and then ⌘-C;
paste with ⌘-V
To X11 ⌘-C; paste with option-click (= middle-click) native:
highlight (left mouse button drag), release mouse button;
paste with option -click (= middle-click)

In other words, you use the pure native paradigm for copying and pasting in each case except when copying from X11 and pasting into Aqua, which is a hybrid.

Note you may need to change the configuration of XQuartz (see XQuartz menu:Preferences:Input tab) to "emulate three button mouse". This sets a single button mouse or laptop trackpad to behave as follows:

X11 left mouse button click
X11 middle mouse button Option-click
X11 right mouse button Command-click
(Command=clover=apple key)

If you have a third-party mouse, the left-middle-right buttons of the mouse should "just work" in X11 with no extra drivers or settings needed. (A clickable scroll wheel is oftentimes the middle button.) You can also use the option- or command-key mappings.

Caution: If you have installed software for a third-party mouse that remaps the buttons, this may break the middle and right buttons for X11. This is especially a problem for third-paty drivers that do global (all application) mappings (e.g., Logitech). Kensington or more generic drivers such as the shareware USB Overdrive can be configured for application-by-application settings or exceptions.


David Friedlander
November 2005 (original), 14 April 2020