Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Let's say you have firefox open on centos linux desktop. Or simply some basic text editor.

You select a text. Soon as the mouse button is up. In other words selecting is done.

I want it to copy it to clipboard. Any ideas on how this can be accomplished?

share|improve this question
    
I have to admit I'm a little puzzled at the downvotes to this question. This isn't a great question, but it isn't terrible either. There's a clear goal stated, and it specifies the environment pretty well. Recognizing select-then-middleclick to copy text doesn't necessarily come easy to someone coming e.g. from Windows, because Windows has nothing like that. –  Michael Kjörling Aug 30 '13 at 12:21
    
Maybe because what is asked already exists natively and is well explaned all over the internet ? –  Kwaio Aug 30 '13 at 12:44
    
@MichaelKjörling Newbie questions are annoying to seasoned users because the new user is refusing to solve a problem by research before asking. I have read instructions on how to copy and paste in "Linux" with a mouse involuntarily on at least 3 occasions after learning about the concept. I find it strange that someone would need to ask about this. At best, they are lazy - which is seldom appreciated. Another reason, is I don't want this site to be a solution center for children because I want to learn from these questions. –  Ярослав Рахматуллин Aug 30 '13 at 12:48
add comment

1 Answer

up vote 4 down vote accepted

Try selecting some text and then middle-click a text area of some kind. That should work in common graphical Linux environments.

It uses a buffer that is usually called "primary selection", which exists along side the "clipboard selection"; in practice they can be used to the same effect. Some cross-platform applications act a bit strangely with regards to these dual concepts, but mostly it interacts well.

share|improve this answer
    
I do not want to middle-click, i want to simply select the text and let go, on that letting go, i want to execute a command such as xdotool key ctrl+c –  user249775 Aug 29 '13 at 21:48
3  
If you select text, you will automatically copy it to the "primary selection" buffer, which is separate from the "clipboard selection". I repeat: the text is automatically copied to this buffer when you select text. You paste it by middle-clicking somewhere. If this is not sufficient for your use case, edit your question to say why. –  Daniel Andersson Aug 29 '13 at 21:53
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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