Windows Clipboard Support

X does not follow the same paradigm as Windows when it comes to clipboards.

In Windows, when you "cut" or "copy" something, it is placed on a clipboard for other programs to retrieve. When you "paste" in another program, it grabs the contents of the clipboard and inserts it into your document.

X, on the other hand, works through "selections". When you highlight some text, it becomes the primary selection. The client program sends a message to the X server stating that it would like to be considered the "owner" of the primary selection. When another program wants a copy of the primary selection, it asks the server which client (and in fact which window within that client) "owns" the primary selection. Once it knows which client owns the selection, it requests it directly from that client.

This is all well and good until you want to transfer text from an X client to the Windows clipboard or vice-versa. MI/X provides two different methods for getting around this problem. The first method allows MI/X to pretend to be an X client itself. Using the popup menu on the MI/X icon in the system tray, you can force MI/X transfer the primary selection to and from the Windows clipboard.

 

Windows to X

To copy text from the Windows clipboard to an X client, right-click on the MI/X icon in your System Tray (next to the clock) and select the option Make Windows Clipboard the Primary Selection Now, when you try to paste into an X client, MI/X will claim that it owns the primary selection and if asked for it, will get it off the Windows clipboard.

 

X to Windows

To text from an X client to the Windows clipboard, select the text then right-click the MI/X icon in your System Tray and select the option Copy X Selection to Windows Clipboard. MI/X will request the primary selection from which ever client currently owns it and copy it to the Windows clipboard.

An Easier Way

There has to be an easier way, you say? Why yes, there is, but it requires special coding of the X Client. The TNTgis products implement Cut, Copy and Paste in a way that avoids all this and just makes it work the way you'd expect it to. If you're an X programmer and would like to know how to do this, click here.