LinuxQuestions.org
Latest LQ Deal: Linux Power User Bundle
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 11-20-2005, 04:04 PM   #1
jrdioko
Member
 
Registered: Oct 2002
Distribution: Debian 6.0.2 (squeeze)
Posts: 944

Rep: Reputation: 30
Question Copy/Paste implementation


I've been using Linux for quite some time now, and I think I understand the working of "copy and paste" in various settings, but I'm curious what exactly controls this. In other words, I assume the Vi and Emacs versions are self-contained within those editors, but what about selecting and pasting text in other X windows in general? in a terminal outside of X?
 
Old 11-20-2005, 04:23 PM   #2
Tinkster
Moderator
 
Registered: Apr 2002
Location: in a fallen world
Distribution: slackware by choice, others too :} ... android.
Posts: 23,066
Blog Entries: 11

Rep: Reputation: 910Reputation: 910Reputation: 910Reputation: 910Reputation: 910Reputation: 910Reputation: 910Reputation: 910
Copy & paste in X is controlled by a) either X itself or
b) the WM/DE you're using. Most commonly you will be
able to highlight text with mb1-down/highlight/mb1-up and
paste it with mb2-click.

In the console you can use a similar method if gpm is
running and configured.

If these aren't the answers you're after I have completely
misunderstood your question ;}


Cheers,
Tink
 
Old 11-20-2005, 04:26 PM   #3
jrdioko
Member
 
Registered: Oct 2002
Distribution: Debian 6.0.2 (squeeze)
Posts: 944

Original Poster
Rep: Reputation: 30
That's exactly it, thanks! So in Fluxbox, for example, is it X that's actually keeping track of that mouse-down, mouse-up pattern? Do different WM/DEs handle it any differently?
 
Old 11-20-2005, 04:50 PM   #4
Tinkster
Moderator
 
Registered: Apr 2002
Location: in a fallen world
Distribution: slackware by choice, others too :} ... android.
Posts: 23,066
Blog Entries: 11

Rep: Reputation: 910Reputation: 910Reputation: 910Reputation: 910Reputation: 910Reputation: 910Reputation: 910Reputation: 910
Yes, it's X. DEs/WMs COULD override it, however I have no
idea which ones are using which mechanism.


Cheers,
Tink
 
Old 11-20-2005, 06:57 PM   #5
jrdioko
Member
 
Registered: Oct 2002
Distribution: Debian 6.0.2 (squeeze)
Posts: 944

Original Poster
Rep: Reputation: 30
Interesting, thanks again.
 
Old 11-20-2005, 10:55 PM   #6
foo_bar_foo
Senior Member
 
Registered: Jun 2004
Posts: 2,553

Rep: Reputation: 52
x has 3 clipboard type things and their interaction can be kind of strange
first highlight middle click thing is "primary selection"
second is called "clipboard selection" and exists within apps and is not overridden by primary selection
so for instance you highlight something (text1) in a qtextedit widget
as soon as you highlight it is becomes "primary selection"
you can paste it around with the middle click button but the "paste" command in the menu does not paste it unless it is selected in a "copy" (text2) from the menu and things selected and copied from the menu
"clipboard selection" will continus to be pasted with the "paste" menu command even though the
"primary selection" or whats being pasted from the middle click button changes by selecting something else.
The third "Secondary selection" another layer clipboard is also available in X but rarely used
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
What is with copy and paste? General General 16 12-23-2005 07:37 PM
Copy Paste zaicheke Linux - Software 8 04-09-2005 05:45 AM
how to copy and paste acd copy cd paschim Linux - General 2 04-05-2004 10:25 AM
copy-paste bash Linux - Software 1 09-08-2003 03:45 PM
Copy/Paste jcb_dreamvsat Linux - Software 12 06-18-2003 03:23 AM


All times are GMT -5. The time now is 01:19 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration