Introduction to the Xwindows clipboard (Page 1 of 1)
Written by
Steve Lake
Posted on: Aug 29, 2008 at 12:37pm
Section:
Tutorials
Printer Friendly Version
Legacy URL

One of the things that amazes a lot of new users to Linux is how flexible the clipboard is. It's one of the many features of Linux that I've come to depend upon greatly. Without it, life could go on, but it would be much, much more difficult. So I'm going to give you a brief introduction to it, and then allow you to do a little exploring on your own, because exploring and learning are half the fun of using Linux. 
The first thing to know is that the Xwindows clipboard is what is commonly known as a "two level" or "two layer" clipboard. In comparison, the clipboards used on MacOS and Windows are only single layer. This means that they can only hold one thing at a time. A two layer clipboard can, as you can obviously guess, hold two separate items, one in each layer. The advantages of this are as interesting as the methods by which each part is accessed and used.
The first layer is your typical copy and paste layer, accessed and used via the ctrl-c, ctrl-v, and ctrl-x key combinations. The second layer is different, as it is not keyboard accessible, and slightly limited in comparison to the first layer. This is because it is only capable of copy and paste, whereas level one is able to do copy, paste, and cut. To copy using the second layer of the clipboard, simply highlight a piece of text, and then either go to another window and paste immediately, or click off the text to store it for later. To paste, simply put your cursor where you want the text to be inserted, and then click your mouse wheel to paste.
The second layer is also further limited in that it can only copy and paste text. It is also capable of copying files, such as images, but only if they're part of the page, and text, being copied. It is impossible to copy stand alone files on the second layer, but this is easily achieved on the first layer. Now these really aren't new features to the Xwindows clipboard, as they've been around for quite a while, but as you can see, they're highly useful.
There's also one other situation that is rather interesting that you can potentially use to your advantage. There are times when doing a simple copy or cut will do a "merge" of layers, allowing the contents of both layers to become identical, giving you more options for pasting or handling copied content. This then allows you to paste binary files and other things you otherwise would not be able to copy with the second layer, using your mouse wheel.
There is also a very easy way in which you can expand the capacity and capabilities of your native clipboard even more should you so choose. Some of these are Window Manager specific. For KDE, that program would be Klipper, a beautiful, simple, yet highly powerful clipboard manager with the ability to store thousands of previous clipboard events for you to use anytime you so wish. Glipper, Gnome's clipboard manager, is similar to KDE's Klipper, but not quite as fully featured. Other window managers also have their own native clipboard manager, but not all do. Therefore there are other stand alone, window manager independent clipboard managers you can use.
I hope this was a help to everyone exploring Linux. And as usual, if you have any questions, please feel free to ask them in the forums.
|
Average vistor rating: 4.8 out of 5 (5 total votes) | |
|
Latest Articles

Upcoming Shows and Cons

Announcements
 There are no current announcements.
How often do you change distros?

Latest Releases (courtesy of Distrowatch)

More
|