Slashdot Mirror


Dealing with the Unix Copy and Paste Paradigm?

MolecularBear asks: "I grew up on Windows machines, using the ol' ctrl-c to copy and ctrl-v to paste. For the past few years I've been a hardcore Linux user, running it almost exclusively at home and at work. As I am sure you are all aware, highlighting text in Linux automatically performs a copy while the middle mouse button performs a paste. The Ctrl-c, Ctrl-v standard works in many applications, but not all. Lately I have begun to find the automatic highlight-copy to be annoying. As in, I'll highlight text to copy it, then realize I want to highlight a block of text for the purpose of deleting it. Of course, the second highlighting overwrites the first highlighting. I am curious about how other people accomplish their copy/paste needs. Any special setups, applications, or words of wisdom?"

17 of 1,125 comments (clear)

  1. Common problem.. by SeanTobin · · Score: 5, Insightful

    ..but I don't have a solution either :)

    What annoys me the most is when copying/pasteing URL's. I'll highlight&copy a url somewhere then I go and paste it into firefox. Out of habbit I'll go and highlight the current URL and control+v what I assume I'm pasteing... and end up with the same URL that I started with.

    Whats more interesting is that sometimes what control+v pastes is different from what the middle-click pastes. I'm sure there is a reason, and I'm also sure its my fault for not knowing it... but its still annoying..

    What I've come to do is to copy a link via control+c or highlighting then opening a new tab in firefox. I have firefox to open new tabs to blank URL's and then I just middle click or control+v the URL.

    Its a partial and flawed solution to a small part of your problem. Of course, this is Slashdot ;)

    --
    Karma: SELECT `karma` FROM `users` WHERE `userid`=138474;
    1. Re:Common problem.. by Coneasfast · · Score: 4, Insightful

      i think the problem is many toolkits/programs combine the primary/secondary 'clipboard' buffer.

      IIRC, what should happen is the primary selection (ctrl-c/ctrl-v) should be seperate from secondary selection (select text, then middle click)

      --
      Marge, get me your address book, 4 beers, and my conversation hat.
    2. Re:Common problem.. by ArmpitMan · · Score: 5, Insightful
      Does anyone else find the phrase "I'm sure there is a reason, and I'm also sure it's my fault for not knowing it" with respect to basic, everyday user interface tasks troubling?

      Because you really should.

  2. Your proiblem... by nother_nix_hacker · · Score: 4, Insightful

    ...is the lack of a standard toolkit. Keep an eye on X.org. I only really work in terminal appart from web browsing. When I copy a url from a term I have to remember to have left the URL bar in firefox bare. Otherwise I end up selecting it to delete the text in there.... you see whats happening anyway :)

  3. What middle button? by Wesley+Felter · · Score: 4, Insightful

    Lately I have begun to find the automatic highlight-copy to be annoying. As in, I'll highlight text to copy it, then realize I want to highlight a block of text for the purpose of deleting it. Of course, the second highlighting overwrites the first highlighting. I am curious about how other people accomplish their copy/paste needs.

    I used to run into the same problem, but you already know the solution: use ctrl-c and ctrl-v. If an application doesn't support them, scrap it. Just ignore your middle mouse button -- pretend it isn't there -- and you won't have this problem.

  4. I prefer the X way, kind of... by whoisjoe · · Score: 4, Insightful

    Having used UN*X systems almost exclusively for 6 years, I have come to find Ctrl-c, Ctrl-v (or Cmd-c, Cmd-v on Macs) annoying.

    But I do know what you're talking about. I mostly run into this issue when entering text into the address bar of Mozilla. Fortunately, Mozilla uses emacs-style keybindings, so if I want to replace what's in the address bar with what's on the clipboard, I just:

    1. Focus on the address bar.
    2. Hit Ctrl-a to go to the beginning of the line.
    3. Hit Ctrl-k to kill the contents of the address bar.
    4. Click on the address bar with the middle mouse button to paste the new contents.

    I, personally, would like the best of both worlds, but that would essentially require that the system read my mind. Obviously, we're not there yet.

  5. Re:I wish! by riffraff · · Score: 4, Insightful
    Exactly. That's why I stopped using galeon for my browser, and went back to mozilla. I like the 'standard' emacs keyboard bindings, but the programmers of galeon decided that the windows key bindings were much better (or less confusing to new linux users, whatever) than the previous behavior. The problem is that the new users have no problem using, but now the rest of us have to remember two different bindings, depending on which application we use.


    Linux is not Windows. Stop trying to make it as such.

  6. Re:"Correct?"-- A bit off topic, a bit flame-y by deebaine · · Score: 5, Insightful

    No offense, but this arrogance is exactly why Linux has insignificant desktop market share. Until the Linux community can get off its high horse ("This is the correct behavior??" Who says?), it will fail to attract users.

    Specifically, it will fail the "my mother" test: Why would my mother want to use this? As a disclaimer, let me point out that my mother has postgraduate education, has started a successful business, is a successful archaeologist, etc. We're not talking about a country bumpkin here. But she doesn't much like, or understand, computers. It took her long enough to figure out Ctrl-c Ctrl-v; she doesn't want to learn another behavior.

    The fact is that if Linux wants people to "adapt", then it needs to offer *evident* benefits beyond what Windows offers (again, subject to the my mother test; she doesn't care to recompile anything at all, ever). I might see enough benefit to tolerate some annoyance (I've never really noticed this as a big one, though I'll now be sure to count the times that I errantly cut/paste things), but she doesn't.

    -db

  7. Re:The writer needs a clue. It is orthogonal. by CarrionBird · · Score: 4, Insightful
    It doesn't work that way in the programs the writer is using. That's why he is having the problem.

    Telling someone that they are clueless beacuse they use a differnt setup than you is not very helpful.

    --
    Free Mac Mini Yeah, it's
  8. Re:This is the correct behavior by Self+Programmed · · Score: 4, Insightful

    I am sorry but you cannot speak for me about what I prefer. I have changed my jed editor to do ctrl-c and ctrl-v properly. I have done contract work using mouse highlighting on an HP UNIX system. It is a torture to be constantly changing models and control behaviors. X should adopt 2 standards, one which is ctrl-c ctrl-v and the other the mouse highlight. The user should be able to select which one they want to use, and it should affect all tools used under X. This is not about who gets to claim the interface is right, this is about the user having an interface that THEY can use.

  9. Missing the real story by rabtech · · Score: 4, Insightful

    The real story is why doesn't Linux have a clipboard standard with well-defined interop standards ala OLE/COM?

    I can copy text from VS and paste it into Word, in which case it pastes as RTF with colors and formatting. If I paste it into notepad, I get plain text. This is because the clipboard understands high-level text (RTF) and casting that down into standard text. It also allows apps to provide multiple data formats; copying an image can put a JPG, Bitmap, and PNG on the clipboard and the consuming app can select the format it likes best.

    Even better would be to support Office-style multiboard functionality where there are 10-12 "slots" on the clipboard and you can cut and paste from each slot at will.

    (Ex: in VS, CTRL+SHIFT+V will cycle through each of the last X copied items for pasting, meaning you can go to one spot of code and copy, then another and copy, then open a different source file and copy a block, then paste all three together somewhere else very easily.)

    --
    Natural != (nontoxic || beneficial)
  10. Re:This is a usability problem... by FauxPasIII · · Score: 4, Insightful

    Before the influx of Windowsisms caused by the attempts of Gnome/KDE to attract converts from Windows and Mac, there was a single standard that worked everywhere; highlight, middle click. The only app that I remember ever having trouble with it was Netscape 4, but that program had a whole host of problems besides UI issues. =)

    The confusion arises when Mac/Windows people arrive and want to bring their habits with them. This is completely natural. However, there has been and will continue to be strong resistance (I'll lead it myself if needs be ;) to abandoning those of us who think that highlight, middle click is vastly superior.

    I think a more reasonable solution might have been to just stick with highlight, middle click as a single, consistant standard and just teach it to newcomers. At least you'd dodge the apparent confusion that comes from partial, but not universal support of their familiar method. Better, but more labor-intensive (the true capital of the open source world) would be to have selectable behavior by a global X-server level (or perhaps window manager level) toggle.

    All that said, the idea of having to use both keyboard and mouse for such a fundamental operation is just so horrifyingly backwards and wrong, and it amazes me that anyone who's experienced X11 could possibly go back to such an arcane and user-hostile configuration. ;-)</troll>

    --
    25% Funny, 25% Insightful, 25% Informative, 25% Troll
  11. Re:This is a usability problem... by pavon · · Score: 4, Insightful

    Some historical information about why copy and paste is the way it is.

    And yes I wrote this in a terminal and selected/pasted it with the button.. because Control-C doesn't work in the terminal!

    For the terminal at least, there is a good reason for this. You are basically running a console program inside a window, and this console application has it's own meaning for control keys. For example ^C sends SIG-INT to the current program. In pico ^C is shows the current line number. Emacs would be unusable without ^c and ^x. So the terminal emulator interpreted ^c and ^v as copy and paste, instead of passing them onto program running in the terminal, then all of these commands for all of these programs would stop working. Some people have suggested intercepting ctrl-c and ctrl-v for copy and paste and then having buttons you can click to actually send the command. I have tried this and found it to be much worse than the original problem.

    Because the terminal was the first application to run in X, the designers wanted a way to copy and paste that didn't conflict with these existing keyboard shortcuts. However, any existing keyboard shortcut could concievably already be used by an existing console program. Since the mouse was the only new input for X they came up with the mouse-only copy and paste that we have now.

    There really isn't any way to make the ctrl-C, ctrl-V method of copy and paste compatible with terminal applications. It just isn't possible. However there are other ways of doing copy and paste that are compatable with the terminal, by adding additional keys to the keyboard. For example, OS X uses the cmd key for all shortcuts, which doesn't interfere with ctrl shortcuts in the terminal. Some UNIXes have had dedicated copy and paste buttons on the keyboard.

    However, seeing as how there would be great revolting if gnome or kde tried to get rid of ctrl-c, ctrl-v and replace them with alt-c,alt-v that it will never happen. The terminal emulator will just have to remain an oddity in these desktops.

  12. It's not a feature, it's a bug by GrouchoMarx · · Score: 5, Insightful

    As the parent and others have posted, X11 has TWO (well, three but no one uses the third) clipboards. One is highlight/middle-click, and one is Copy/Paste. The proper, documented (see parent and others) behavior is for both to be implemented and for both to operate completely and entirely independently of each other.

    In a properly implemented program, you should be able to use it as if there is no Primary Selection feature (highlight/middle-click) and not notice the difference from your usual Windows/Mac Ctrl+C/Ctrl+V habits. If you come across a program that does not do that, and mixes them together, that is not a feature that is a bug. Report it as a bug. If the developer dismisses it, report it as a bug again, email the developer telling him that you're going elsewhere, and switch to any of the plethora of other programs around (Free Software is great like that) that do things properly. Eventually someone will get the message.

    That's one reason why I stick to KDE applications whenever possible. All KDE applications (ie, ones provided by the KDE.org team) are well-behaved and non-buggy in this respect. Programs that misbehave should simply not be used. Period.

    --

    --GrouchoMarx
    Card-carrying member of the EFF, FSF, and ACLU. Are you?

  13. Re:Pasting urls by GMC-jimmy · · Score: 5, Insightful
    Which is simply a broken system. It's one of the things that definitely needs to be fixed before you can tryly say that Linux is ready for prime time.

    That depends on who you ask. I personally like and use both ways. Each can do things the other can not. For example X Windows method of copy/paste can work across different terminal sessions whereas KDE/GNOME's can not. On the other hand, KDE/GNOME's clipboard keeps a history whereas X or even bash does not. So depending on the environment you are in and the work you're doing. Both can be very useful at different times and for different needs. To think of both methods as one system is incorrect, they are most definitely two seperate systems. Being aware of that and making a decision on which to use will save you the frustration usually accompanied by confusing the two as a single system.
    --
    __________________________________
    Free your mind - Flush your toilet
  14. Re:This is a usability problem... by zsau · · Score: 5, Insightful

    Yeah... I hate when I go to Windows and try to paste something only to discover it hasn't been copied. It's just what you're used to!

    --
    Look out!
  15. Re:If only Linux would get copy-paste right.. by Anonymous Coward · · Score: 4, Insightful
    I find the highlighting of text used in Linux (or X-windows) rather hard... it tends to include too much text or not enough

    What are we comparing this to? Windows? Windows copy/paste is not exactly superior. Try, this for example: click once and then drag to select text. The first click will cause you to be selecting in units of single characters. Now try again, but click twice instead. Presto! You are selecting one word at a time.

    OK, what happens if you triple-click? In Internet Explorer, this selects the current block of text, kind of like a Select All. In Notepad, it does NOTHING. In Mozilla, it selects a whole line at a time, but if you drag to the previous line, it goes back to selecting in units of characters and not lines! Gaaaaaaaah!

    Is this the consistent, clean interface that X11 is supposed to want to copy? In this example at least, Windows has three different behaviors for three different apps. In X11, all the apps I can recall using operate exactly consistently. One click selects letter-at-a-time, two does word-at-a-time, and three does whole-line-at-a-time. And by the way, once you start selecting line-at-a-time, when you drag the mouse up or down, the additional selection is also done line-at-a-time.

    Furthermore, I challenge the assumption that the Macintosh style of doing things (i.e. the one Windows copied) is more intuitive. It only seems intuitive to you because you've already learned it, so it's second nature. In contrast, I started using X11 fifteen years ago, and I got used to being able to just select text and move on. Now I am using Windows and Mac on the desktop mostly, and I cannot count the number of times that I've selected some text to copy, then rearranged all my windows and iconified the one that had the text, then gone to paste it into another app. But of course, all the effort is wasted because I forget the extra step of hitting Control-C (or Apple-C). Why? Because my intuition and habit tells me that I just select the text then immediately start navigating to the place where I want to paste it. I've been using Mac and Windows on the desktop for a year now, and I still sometimes forget and have to go back to start over, remembering to hit Control-C. The point is, just the fact that transition trips you up does not mean that the one you're familiar with is better. In fact, the transition in the other direction is just as exasperating.