Ask Ubuntu is a question and answer site for Ubuntu users and developers. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Every operation performed by operating system have a source code. So for coping operation there should be source code. So I need a file's name having source code for copy operation.So I can add some code to it so that Multiple copy operation may be performed. In multiple copy I can copy 2 or more text strings or files one after other from different location and paste after every thing is copied.(I want to avoid paste operation after every single copy operation.) Can anyone help me to find file containing Copy and Paste code? Thank you.

share|improve this question

closed as unclear what you're asking by dobey, Seth, Braiam, falconer, BuZZ-dEE Jan 13 '14 at 15:12

Please clarify your specific problem or add additional details to highlight exactly what you need. As it's currently written, it’s hard to tell exactly what you're asking. See the How to Ask page for help clarifying this question.If this question can be reworded to fit the rules in the help center, please edit the question.

There is no single method of doing copy and paste. You need to be more specific, but generally asking how to do copy and paste in a forum appropriate for the toolkit you're using will yield you better answers. – dobey Jan 13 '14 at 3:38
There isn't a single source file that implements copy-paste. It's dependent on the application, the programming framework, the environment, the type of object that gets copied. You should frame your question around what you want to accomplish. – Gilles Jan 13 '14 at 18:34
I have mentioned what i want to do. help me. – NitinKabra Jan 17 '14 at 4:32

There's a single method of doing copy and paste in an X window system environment (GNOME, KDE .etc), namely Ctrl+C and Ctrl+V.

How this 'copy and paste' works?

The whole scenario involves two parties: client applications and clipboard manager.
their behavior is specified in the freedesktop standard:
see for a general introduction.

For the clients, the required code is implemented in toolkits such as GTK and Qt. the clipboard manager typically is a daemon program. In GNOME, the clipboard manager is a component of gnome-settings-daemon.

At the core of the clipboard implementation is a notion called "Selections" which is a X11-specific concept.

If you want to understand how clipboard works in a Linux environment, you need to learn how to program with low-level toolkit X11 first and get yourself familiar with concepts like Window, Property, Selection, Atom .etc.

You can get started with xclip source code.

share|improve this answer

Not the answer you're looking for? Browse other questions tagged or ask your own question.