Forgot your password?
typodupeerror
GUI Software X

Dealing with the Unix Copy and Paste Paradigm? 1125

Posted by Cliff
from the it-works-well-enough-once-you-learn-how-to-use-it dept.
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?"
This discussion has been archived. No new comments can be posted.

Dealing with the Unix Copy and Paste Paradigm?

Comments Filter:
  • Common problem.. (Score:5, Insightful)

    by SeanTobin (138474) * <byrdhuntr@hotm a i l .com> on Wednesday June 02, 2004 @04:15PM (#9318505)
    ..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 ;)

    • Pasting urls (Score:5, Informative)

      by grahamsz (150076) on Wednesday June 02, 2004 @04:17PM (#9318524) Homepage Journal
      I usually find you can just pick up the url by selecting it, then middle button drop it into the browser. That seems to work on konq, netscape, mozilla and firefox on both linux and solaris.

      But i do feel your pain :)

      Firefox and Konqueror should have a button for "Open the clipboard in a new tab".
      • Re:Pasting urls (Score:3, Informative)

        by divirg (695027)
        There's a plugin for Firefox that puts a button next to the URL field to clear it when you're about to paste. Don't remember what it's called - check the Firefox plugins page on mozilla.org.

        Doesn't help the general problem though...
      • Re:Pasting urls (Score:5, Informative)

        by Martin Blank (154261) on Wednesday June 02, 2004 @04:33PM (#9318754) Journal
        Firefox and Konqueror should have a button for "Open the clipboard in a new tab".

        Agreed. While not a perfect solution, Clipboard Observer [sakura.ne.jp] may be a possible way of dealing with this. It can get really intrusive, though, because it can end up opening tabs when you're copying a link to paste somewhere else, like in e-mail or IM. Worth a try, though.

        On an unrelated note, the same author also has Tabbrowser Extensions [sakura.ne.jp], basically some really, really, REALLY useful alterations to how Mozilla and Firefox handle tabs. With it, you can do things that should (IMHO) be in the codebase, like re-ordering tabs, moving tabs in groups, moving tabs between windows, opening duplicate tabs (complete with the tab's page history), and (my favorite) undoing the closing of a tab. I've been saved on a number of occasions by this last feature. Very handy. The author should be getting more recognition.
      • by AppyPappy (64817) on Wednesday June 02, 2004 @04:41PM (#9318878)
        Using a mouse in unix? That's heresy.
      • Re:Pasting urls (Score:5, Informative)

        by connsmythe96 (576445) <slashdot&adamkemp,com> on Wednesday June 02, 2004 @04:42PM (#9318887) Homepage
        Firefox and Konqueror should have a button for "Open the clipboard in a new tab".

        Try middle-clicking in the main view area of mozilla/firefox with a URL in the clipboard... ;)

        • Re:Pasting urls (Score:4, Interesting)

          by Bitsy Boffin (110334) on Thursday June 03, 2004 @01:42AM (#9322779) Homepage
          I *HATE* that so-called feature. For the simple reason that when I am doing data entry into a web form, as I often do by copying data from some other application/legacy wehsite, I want to be using left-select-middle-click-paste for the extra speed.

          But, especially if I'm entering lots of data, I'll occasionally miss the input field when I middle click, then, even though what I have pasted looks *nothing* like a URL, firefox will in it's infinite wisdom try to load something, anything, it's not even sensible about it, I get odd pages I havn't been to in months, strange things completely out of the blue. And if I don't hit escape quick enough it'll load the 'supposed' page I wanted and then when I hit back, all the data I entered into my form is gone (because it came from an expired form post and had to be reposted to the server to generate the form again).

          ARGH! I *HATE* THAT "FEATURE".

      • Re:Pasting urls (Score:5, Informative)

        by taniwha (70410) on Wednesday June 02, 2004 @04:44PM (#9318927) Homepage Journal
        Konq at least attempts to solve this by having a delete button next to the URL - clicking that black thing with an X on it while 'holding' text from a hilite clears the URL so you can drop a new one in there
      • Re:Pasting urls (Score:4, Interesting)

        by orasio (188021) on Wednesday June 02, 2004 @04:52PM (#9319037) Homepage
        Firefox and Konqueror should have a button for "Open the clipboard in a new tab".

        Ctrl-T (new tab)
        Middle click on the location bar (paste url)
        Enter

        Also, Ctrl-U clears the location bar.
      • Re:Pasting urls (Score:4, Informative)

        by ronlusk (314634) on Wednesday June 02, 2004 @05:07PM (#9319201) Homepage
        I've created a script for working with KDE's klipper clipboard tool.
        # point at the browser
        $FIREFOX=/opt/mozilla/firefox/firefox
        ($FIREFOX -remote "ping()" && \
        $FIREFOX -remote "openUrl($1,new-tab)") || \
        $FIREFOX $1 &
        I'm not sure I have everything the best it can be. But when I select a URL somewhere, klipper pops up a menu offering to open it in Konqueror, Mozilla, or Firefox (among other things). I have configured klipper so pressing "F" is a shortcut for opening in Firefox, where it opens it in a new tab.
      • by Peter McC (24534) on Wednesday June 02, 2004 @05:41PM (#9319620) Homepage
        In Mozilla and Firebird at least there is the very useful, but little-known shortcut Ctrl-L. This highlights the url bar but does *not* copy it to the clipboard. So when I'm in that situation I do Ctrl-L, delete, middle click.

        Of course, the middle-click on the page body works too, as long as you don't have to edit the URL. Ctrl-L is still super-handy if you want to type in an URL by hand or something.

    • Re:Common problem.. (Score:5, Informative)

      by GigsVT (208848) on Wednesday June 02, 2004 @04:20PM (#9318561) Journal
      Whats more interesting is that sometimes what control+v pastes is different from what the middle-click pastes.

      Yeah, there's basically two clipboards. The one when you just highlight something, and the one where you click "copy" in the menu.

      The confusion comes when bugs in some programs confuse the two (or only implement one of them .. cough xchat cough). It's extremely hard to convince egotistical programmers that their clipboard behaviour is actually wrong and confusing to users.
      • Re:Common problem.. (Score:5, Informative)

        by irix (22687) on Wednesday June 02, 2004 @04:57PM (#9319090) Journal

        Yeah, there's basically two clipboards.

        Yup. The best explanation I know of how this works [jwz.org] from someone who would know :)

        • by GrouchoMarx (153170) on Wednesday June 02, 2004 @05:55PM (#9319766) Homepage
          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.
    • by Coneasfast (690509) on Wednesday June 02, 2004 @04:21PM (#9318573)
      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)
      • Re:Common problem.. (Score:4, Informative)

        by forevermore (582201) on Wednesday June 02, 2004 @04:41PM (#9318885) Homepage
        Don't forget that shift-insert is almost always used to paste the X clipboard (as opposed to the ctrl-c/ctrl-v one managed by the desktop environment). But then some programs (gecko browsers being the most annoying for me) go and alias this to the functionality of ctrl-v, so I have no keyboard equivalent for middle-click paste.
    • Re:Common problem.. (Score:4, Informative)

      by nachoman (87476) on Wednesday June 02, 2004 @04:21PM (#9318584)
      The difference between the select/middle-click paste and the Control-C/Control-V paste is because they each use different Clipboards. For instance if you are using KDE, The Control-C will copy to the KDE clipboard and the select with mouse will copy to the X-Windows clipboard.

      I think the reason for the two different Clipboards is because the KDE (Or gnome? Not sure if it works the same way) clipboard handles copying content other than plain text and the X-Windows one not.
      • Re:Common problem.. (Score:5, Informative)

        by RossyB (28685) <ross@bur[ ]ini.com ['ton' in gap]> on Wednesday June 02, 2004 @04:43PM (#9318907) Homepage
        Urr, all wrong.

        Control-C/V will copy/paste the CLIPBOARD selection. Highlight/middle click will copy/paste the PRIMARY selection. No real applications use the SECONDAY selection, but it still exists.

        There is no difference between any of these clipboards, GNOME and KDE don't have their own clipboards (though KDE does have a daemon to collect copied data so that it persists after the application closes), and all X clipboards can handle any content type: it's the applications which don't support it.

        http://freedesktop.org/Standards/ClipboardsWiki is an excellent summary of the X clipboard.
    • if you think thats bad try going from getting used to that back to windows, i still middle select and expect to have it paste :p
    • X copy/paste (Score:5, Informative)

      by Too Much Noise (755847) on Wednesday June 02, 2004 @04:32PM (#9318734) Journal
      Actually, there are 3 selections in X. How's that for confusing?

      The current consensus on freedesktop.org is something along the lines of:

      1. The primary selection is to be used for middle-click pasting.
      2. The secondary selection is unused now
      3. the clipboard selection is to be used for Windows-style copy/paste.


      The problem is that some apps use only the primary selection for all copy/paste operations, so it can get confusing.

      For more info, look here [freedesktop.org]
      • Re:X copy/paste (Score:3, Insightful)

        by mivok (621790)
        I disagree with their recommendation that Secondary shouldn't be used. The submitters problem, selecting something for the purpose of copying, then wanting to use another selection is an ideal situation for the secondary selection - when you realise that you require the second selection, press a hotkey to swap primary and secondary selections, do the selection work, swap back and middle click to paste the original selection in.
        This probably doesn't need to be implemented at a client level though, perhaps a
    • Re:Common problem.. (Score:3, Informative)

      by Apro+im (241275)
      In GNOME, at least, i think there's a separate clipboard that's for Ctrl+C and Ctrl+V, so if you use those two, you can use normal windows-styl C&P
    • by ArmpitMan (741950) on Wednesday June 02, 2004 @04:34PM (#9318762) Homepage
      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.

    • Re:Common problem.. (Score:3, Informative)

      by psoriac (81188)
      This annoyed the hell out of me too, until I realized that ctrl-L will highlight the current url *without* overwriting your other highlighted text. Then hit delete or backspace to clear the url bar, and middle-click to paste in the new url.

      At least, Mozilla on FreeBSD in X with WindowMaker does this. I can't claim it works on any other combo, which in itself is a discussion for another day.

  • Your proiblem... (Score:4, Insightful)

    by nother_nix_hacker (596961) on Wednesday June 02, 2004 @04:18PM (#9318529)
    ...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 :)
    • Re:Your proiblem... (Score:4, Informative)

      by Psiren (6145) on Wednesday June 02, 2004 @04:22PM (#9318590)
      You can just click the middle button anywhere on the page. It'll do a paste of the buffer and load the url in it. You don't have to paste it into the url bar. Once you've done it a few times it makes life a lot easier. It's a far larger target to paste into. Just be careful not to click when you're hovering over a link.
  • by jmdjmd (727273) on Wednesday June 02, 2004 @04:18PM (#9318530)
    Just a small shortcut - Ctrl-K will (should!) erase the rest of the line, no need for highlighting it. Works wonders for clearing the URL bar :-).
  • I wish! (Score:3, Insightful)

    by NerveGas (168686) on Wednesday June 02, 2004 @04:18PM (#9318537)
    highlighting text in Linux automatically performs a copy while the middle mouse button performs a paste

    I wish. That's the behavior that I prefer. In the past half-year, I've tried about four different distributions, and none of them have had that as the default behavior. It seems like they're intentionally trying to become like Windows.

    steve
    • Re:I wish! (Score:4, Insightful)

      by riffraff (894) on Wednesday June 02, 2004 @04:28PM (#9318689) Homepage
      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.

  • by Anonymous Coward on Wednesday June 02, 2004 @04:19PM (#9318549)
    Whew, glad to see I'm not the only one .. the whole "click middle button to
    paste" thing drives me NUTS.

    I started computer life as a Mac user. I think one button is the simplest and
    most elegant way to design a mouse. I think mod-C and mod-V is the easiest way
    to cut & paste (one hand on keyboard, one on mouse). I also have big hands and
    fumbling fingers. I very often paste garbage into Mutt or other programs (for
    instance, extremely critical SSH sessions to production machines) in my
    Konsole windows. Hold breath, wait 2 seconds for the beeping to stop, paste
    text into another window and try to figure out if I just emailed porn to the
    client or sent /boot/kernel-2.4.25 to the printer.

    I even whipped out the soldering iron and replaced the Omron tactile switches
    in my trackball with the stiffest they had a digikey. It did help a little.

    And I also have dealt with the slight confusion that results after I highlight
    something, whip over to another window, and realize that I have to select
    everything to delete it first, which trashes the selection. Thankfully,
    Control-C/V works in the programs that I usually do this with.

    I bet most people don't even realize that X11 actually has more than one
    "clipboard". Did you? There is nothing in the interface that suggests I should
    have a mental model of multiple selection areas. Only after learning about
    Vim's keystrokes for accessing the various buffers did I realize what was
    going on.

    I just wish I could permanently and completely switch off this "feature" of
    X11, in all programs. I'm not stupid, I've been using X11 nearly daily since
    1990, and I've been screwing it up since then. Apparently just bringing this
    up in public is enough to condemn a person to flames, but there it is.

    Dear X11: please join the rest of the world and shed at least one of those
    buttons. Get rid of multiple clipboards or whatever you call them. I don't
    need it. My grandmother doesn't need it. Maybe some geeks have trained
    themselves to need it, let them figure out how to turn it back on.

    And while we're on the subject can we please standardize Control-C vs. ALT-C,
    etc.???

    (And yes I wrote this in a terminal and selected/pasted it with the button.. because Control-C doesn't work in the terminal!)
    • And while we're on the subject can we please standardize Control-C vs. ALT-C, etc.???

      That is my biggest issue with the linux/open source world. Not that in particular, but the lack of standardization. The lack of standardization of shortcut keys, graphical interface design and general look-and-feel of the interface.

      For me, usability is much more important then functionality. I wouldn't run a server on anything else but a little more maturity is needed to get me to use linux as a home system.
    • by Suidae (162977) on Wednesday June 02, 2004 @04:57PM (#9319089)
      I think mod-C and mod-V is the easiest way
      to cut & paste


      You obviously don't use a dvorak keyboard.

      ctrl+j and ctrl+k :)
    • by FauxPasIII (75900) on Wednesday June 02, 2004 @05:31PM (#9319515)
      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>
    • by pavon (30274) on Wednesday June 02, 2004 @05:44PM (#9319654)
      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.
  • by Wesley Felter (138342) <wesley@felter.org> on Wednesday June 02, 2004 @04:19PM (#9318550) Homepage
    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.
  • by 1000101 (584896) on Wednesday June 02, 2004 @04:20PM (#9318553)
    "... performs a copy while the middle mouse button performs a paste."

    I use a Mac you insensitive clod!
  • Oh boy (Score:4, Informative)

    by John Starks (763249) on Wednesday June 02, 2004 @04:21PM (#9318564)
    Soon Slashdot will be filled with the waring camps of "X is perfection" and "X is old, so it is bad."

    In this case, I find that it's merely a matter of getting used to the way the X clipboard functions. For example, delete the old text AFTER you paste the new text. It's a different way of managing your clipboard, but it's not necessary any better; for most jobs, I find it to be MORE convenient, and I start to forget to Ctrl-C when I'm in Windows.

    For more information on how X handles the clipboard/selection, see Jamie Zawinski's informative web page. [jwz.org]
  • Complain! (Score:5, Interesting)

    by ChipMonk (711367) on Wednesday June 02, 2004 @04:21PM (#9318571) Journal
    The best thing you can do is to complain to the developers at X.org, GNOME, and KDE (and whatever other desktop systems you know of). They need to hear this stuff, from many quarters, before they'll actually do anything about it. I think that X.org is probably the best place to start, given that development-oriented nature of the fork.

    As a slight correction, the copy-paste problem you describe isn't a Linux issue; it's an X Window System issue.
  • -1 Redundant (Score:5, Informative)

    by stratjakt (596332) on Wednesday June 02, 2004 @04:21PM (#9318574) Journal
    It's always been broken.

    And any mention of a possible solution brings down the wrath of nerds who want to keep unix as unintuitive and awkward as possible.

    Besides the nuisance of what mouse click or keystroke you use to move text, it's not a clipboard like Windows uses, merely a text buffer.

    Ie; it's only good for text. You cant copy/paste (and by extension drag and drop) files, bitmaps, etc uniformly between apps.

    It's just another item in a laundry list of issues that are major to end users, but a low priority for hackers. Another speedbump on the road to Linux (unix) as a truly competitive desktop platform.

    • Re:-1 Redundant (Score:3, Insightful)

      by buttahead (266220)
      It's always been broken.

      that's a matter of opinion. if you hadn't gotten used to the way ms windows does it, you wouldnt be complaining. i've been using linux only for a bit under 3 years, and don't have a problem with the cut/paste situation.

      it's only good for text.

      across all desktops and all apps, this is true, although within certian environments, you can drag 'n drop, and cut/paste images and text. I can cut/paste html from mozilla browser into mozilla mail. in openoffice I can cut/paste imag
  • KDE klipper... (Score:5, Informative)

    by rsidd (6328) on Wednesday June 02, 2004 @04:21PM (#9318582)
    has a menu of recently selected highlighted items. There should be a dock in the "system tray" panel item, looks like a clipboard with the "k" letter. Clicking on it has a history of recently copied (ie highlighted-with-mouse) items, you can select what you like to bring it to the top, then middle-button will paste that next time.

    Or else, first paste what you want to insert, then delete what you want to remove...

  • by jrl87 (669651) on Wednesday June 02, 2004 @04:22PM (#9318591)
    I have a similar problem ... but it doesn't involve deleting ... or linux (*gasp*) ....

    When I'm on Windows I use Trillian which does this and i have a habit of highlighting as i read ... and sense i frequently copy links to send ... I am always pasting into Trillian ... unfortunately this has caused some problems with my gf when i highlight something that she doesn't need to see ....

  • by whoisjoe (465549) on Wednesday June 02, 2004 @04:22PM (#9318594) Homepage
    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.
  • by Ender Ryan (79406) <[ ] ['' in gap]> on Wednesday June 02, 2004 @04:22PM (#9318598) Journal
    I don't get it, what is the problem? X has two copy/paste buffers. One is used with highlight/middle mouse button, the other is like Windows, except the keybindings are specific to the app/toolkit. Generally, all new apps use control+c and control+v, just like Windows. Sans vim, I haven't used an app that uses anything other than control+c/v in years.

    So what is the problem? Are the apps you use broken?

  • by JaredOfEuropa (526365) on Wednesday June 02, 2004 @04:23PM (#9318614) Journal
    I find the highlighting of text used in Linux (or X-windows) rather hard... it tends to include too much text or not enough, and when I then click elsewhere and move the mouse just a tiny bit as I click, I highlight another letter and I lose the text I intended to copy. From a usability standpoint, the X-Windows method is horrible. My poor mom never got to grips with it (and she's gotten used to some pretty weird OS'es in the past).

    Another thing that Linux needs is a proper clipboard like Windows has. Copy anything you like: pictures, files, texts, documents. Then paste it into any application that will accept the data type. I do my day-to-day work in MS Windows, and this is one feature that I use very often, without having to think about it. Is there anything similar for Linux in the making?
    • by Anonymous Coward on Wednesday June 02, 2004 @07:24PM (#9320509)
      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.

  • by veranikon (202025) <westbywestNO@SPAMgmail.com> on Wednesday June 02, 2004 @04:24PM (#9318642)
    I agree with the frustration of the poster of this article. It's frequently even worse with Unix-under-Windows environments like Cygwin, Hummingbird, where you have to deal with both cut & paste schemes and the data transport between 2 clipboards. I don't favor one scheme over the other; it's just that dealing with both simulatenously is very awkward.

    A simple, high-level, question: why can't the Window Manager (Gnome, KDE, etc.) be made to handle both schemes, and allow the user to switch between them, but not let both scheme be active at once? This would of couse require support in the applications running under the WM's, but I would figure such a change in inevitable if the Linux desktop is to become more mainstream.

  • Clipboard Program (Score:3, Informative)

    by Greyfox (87712) on Wednesday June 02, 2004 @04:25PM (#9318650) Homepage Journal
    xclipboard helps a little bit. It'll buffer copies and pastes and let you select between them. I use it when the copy/paste behavior really starts to piss me off. It's helpful with emacs too.

    The problem is X leaves copy/paste (and pretty much everything else) up to the application, and every application does it differently. Ideally one day we will all settle on a widget toolkit that enforces a standard copy/paste behavior. I'm not holding my breath though.

  • X Selection (Score:3, Insightful)

    by amightywind (691887) on Wednesday June 02, 2004 @04:25PM (#9318654) Journal

    Linux automatically performs a copy while the middle mouse button performs a paste.

    This has nothing to do with your machine running GNU/Linux it is the X selection mechanism and its use for copying text. You'd have the same issues on any machine running diverse free software X based applications. There is no good answer for you. It is one of the weaknesses of a federated system.

  • by smitty_one_each (243267) * on Wednesday June 02, 2004 @04:29PM (#9318708) Homepage Journal
    The [emacswiki.org] more you use it, the more you use it.
    Out of the box, it might not do much of anything you want, but few problems you can envision haven't been solved.
    Only thing I haven't seen yet is a PalmOS version, so I can run it on my Kyocera7135. Got one of those external keyboards; but, hey, that's motivation to figure out how to configure a GCC cross-compiler and add something to the emacs canon.
    Other than PalmOS, emacs is OS and window-manager (if any) agnostic, and comes with a ridiculous menu of existing tools.
    Go, emacs.
  • by tesmako (602075) on Wednesday June 02, 2004 @04:32PM (#9318747) Homepage
    For some reason people seem to constantly miss how the X clipboard and selection mechanism works. So here we go again:

    The X clipboard work exactly like the Windows and Mac ones. When you chose 'copy' on an edit menu or similar (ctrl+c in a lot of toolkits) the application will claim ownership of the clipboard and copy the text to some internal buffer. When an application gets a paste in some way (edit->paste or ctrl+v perhaps) it will request the text from the clipboard owner.

    There is ALSO the selection mechanism. Whenever you select text in an application it will claim ownership of the primary selection, whenever an application receives a middle mouse click it will request the primary selection from the registered application.

    These two mechanisms are orhogonal and should in no way interfere with each other in a correctly written application. Hope this clears things up. See JWZ's small guide [jwz.org] to the topic for more information.

  • by sab39 (10510) on Wednesday June 02, 2004 @04:33PM (#9318752) Homepage
    In every program I use in Linux (specifically, Mozilla, rdesktop, and various GNOME stuff) Ctrl-C/Ctrl-V work perfectly, and so does the select/middleclick system, and neither interferes with each other.

    I haven't used KDE in a long time but I understand that they introduced the same behavior with Qt3/KDE3.

    Unless you're using really ancient software, pretty much everything will work in *either* mode, or you can do what I do and use a combination of both (choosing whether to bother pressing Ctrl-C to copy depending on whether you're going to need to highlight something at the destination).

    I'm really curious to understand how so many people manage to still have a problem with this. Are you perhaps expecting that since "everybody knows that select copies on Linux", Ctrl-V will paste the thing that you last selected, instead of the last thing you Ctrl-C'd, and not testing it to verify this? Or just assuming that selecting something will overwrite your Ctrl-C buffer? I'd like to believe that people would actually test these things before posting Ask Slashdots about it, but you have to wonder...
  • The solution (Score:3, Insightful)

    by gr8_phk (621180) on Wednesday June 02, 2004 @04:35PM (#9318784)
    The solution would be this: The implicit copy that is performed by selecting text doesn't happen until that text loses focus. For example:

    1) I highlight a URL in some text.
    2) I highlight the URL selector in Mozilla - this causes the previous highlighted text to lose focus and causes it to go to clipboard.
    3) I middle-click the URL in Mozilla (which never lost focus) and the clipboard text goes in.

    Not sure how "focus" actually works in this case, but you should be able to understand what needs to change to make it work. And for goodness sake have the FSF patent this so only Free Software will be able to use it. As the "inventor" can't I still patent for a short time after this public posting?

  • by dpbsmith (263124) on Wednesday June 02, 2004 @04:38PM (#9318835) Homepage
    Copy should be control-alt-caps-lock-tilde. Paste should be escape-escape-shift-F6 and click the first and fourth mouse buttons. This pastes in two copies, which is what I usually want. If, for some reason, I only want one copy, then after I pasteI just press PgDn on the numeric keypad with NumLock on, then hit SysRq twice in rapid succession (usually, within half a second). This conveniently deletes the second copy.

    If your mouse has less than four buttons, it's broken. Get one with four buttons.

    Simple. Clean. Logical. Convenient.

    I like it this way so this is the right way.. I know what I like, and that makes me a UI expert.

    If anyone wants it any other way, well, let them set it as a non-default user preference. And if the preference isn't honored by every application, well, tough.
  • by BrookHarty (9119) on Wednesday June 02, 2004 @04:42PM (#9318893) Homepage Journal
    I didnt see anyone mention the whole Ctrl Insert, Shift Insert option.

    Works on some linux apps and desktops, still works in windows.

    I have my putty setup as an X window, middle mouse click, right mouse extends, middle pastes.

    What pisses me off is command shell for windows, I just start up sshd under cygwin and use putty to ssh into my own windows box. Much better...
  • by XO (250276) <blade.eric@[ ]il.com ['gma' in gap]> on Wednesday June 02, 2004 @04:47PM (#9318961) Homepage Journal
    Is supposed to be the original Windows copy/cut/paste buttons:

    Copy: Ctrl-Insert
    Paste: Shift-Insert
    (I can't remember what Cut is, I never use it.. probably ctrl-delete)

    Then, sometime in the Win95 or Win98 era, Microsoft changed it to the less-intuitive and less-standard Ctrl-C, Ctrl-V.

    And Microsoft was a member of the body of people/organizations that made Ctrl-Insert and Shift-Insert the standard.. then went and trashed it...

    This is the CUA92 user interface universal standard, by the way.. and i'm a bit busy right now to do a google search for it, but I'm sure anyone interested could find it..

    • by LenE (29922) on Wednesday June 02, 2004 @05:39PM (#9319603) Homepage
      Unfortunately, Ctrl-Insert and Sift-Insert were never the standard method in Windows, because Microsoft never really standardized anything. These were WordPerfect methods.

      The first standardization, well before 1992, was the Macintosh Human Interface Guidelines published in Inside Macintosh around 1983-84. This is the origin of the Ctrl-C and Ctrl-V.

      Apple did lots of usability studies for the Mac, and the fruits of this labor were the one-button mouse and the Command-z,x,c & v, as well as other standardized "Command Key Shortcuts."

      This cluster of keys were selected because of their proximity to the Command key, and the ease of pressing them with the left thumb and index finger. Z, X, C, and V corresponded to Undo, Cut, Copy, and Paste, the most common operations that were required in a GUI-based work system. Others combinations were standardized for closing windows (Cmd-w), Saving (Cmd-s), Printing (Cmd-p), and Quitting programs (Cmd-q). All Mac programs had to include these functions and use these standardized shortcuts if applicable.

      Sun used these same Command Key Shortcuts in OpenLook, and eventually Microsoft embraced and corrupted these combinations by replacing the Command key with the Control Key, which required using the left pinky finger instead of the thumb to press. The Alt key which is positioned in the same place as the Command key was already claimed in Windows for their pseudo-standard of activating menus based on the underlined letter. The Command Key Shortcuts outside of this cluster were partially implemented for printing and saving, but quitting programs or closing windows is still the archaic and unintuitive Alt-F4 on Windows.

      -- Len
  • by toomim (492480) on Wednesday June 02, 2004 @05:02PM (#9319134)
    You should read this article: http://www.jwz.org/doc/x-cut-and-paste.html [jwz.org].

    In a nutshell, there are TWO completely different clipboards implemented in X:

    1. The "select->middle click" clipboard
    2. And the "copy->paste" clipboard

    These two clipboards do not affect or interact with each other.

    Other OS's (like Windows) only have the second kind. Modern Unix applications (like anything based on GTK, QT, or Mozilla) support both clipboards simultaneously and independently.

    Old X Windows applications like XTerm only support the first kind. This is why you can't copy from or paste into an XTerm using C-c and C-v.

    So if you are using modern applications, you should always be able to use C-c and C-v. If you have to copy or paste something into an XTerm, you will have to select it and middle-click. The solution is to use a moderm terminal, like gnome-terminal, instead of XTerm.

    If you read the article, you'll learn that there are actually three different clipboards in X (one of which is never used), and that Emacs and XEmacs then implement yet another fourth clipboard!

    Also see the freedesktop.org reference [freedesktop.org].

  • by rabtech (223758) on Wednesday June 02, 2004 @05:02PM (#9319143) Homepage
    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.)
  • But wait... (Score:5, Funny)

    by gillbates (106458) on Wednesday June 02, 2004 @05:12PM (#9319250) Homepage Journal

    Wasn't this the very thing that open source was supposed to avoid?

    You don't like the copy and paste works? Fine - you've got the source code, so just change the key codes and recompile.... right?

    After a few frustrating hours of digging through source code, you finally find the keybindings. You change them, do a make.... and make crashes. So then you debug the make script and realize that you _ALSO_ need the source code to an obscure set of libraries. So you Google it, download the source, and it ALSO won't compile, because you've got the wrong compiler version.

    So you figure, what the heck, it's time to upgrade gcc anyway. You download the sources, compile it, only to find that you also need to download the sources for the shared libraries as well. Tomorrow, you'll resume.

    Well the weekend is coming up, and you've finally got the compiler and all its dependent sources together, and you start the compile. It actually compiles and installs just fine... And then you try to compile those obscure libraries and the compiler crashes. Turns out there's a kernel bug which means the new version of the compiler won't work with older kernels. You think, well heck, I'll just upgrade my kernel, and you ftp the sources.

    So you configure your kernel and then type 'make clean; make dep; make install' and kick off the process; it dies - once again, your compiler segfaults. So now you've got an older kernel with no way to compile the new one...

    So next weekend you decide that you're just going back to the old compiler. You rpm -i the compiler, and start the kernel compile process again... but the new kernel won't compile with the older compiler, and the newer compiler won't run on an older kernel....

    You take a walk. It's nice to see the sunshine, and feel the breeze for a change.

    It's tuesday and you've figured out that you can apply a few patches to your current compiler source, compile that, and then you'll be able to compile the most recent version of the compiler. So you do that. After you've built your intermediate version, you install it, build your kernel, and then recompile the newest compiler sources. After a reboot, you're able to successfully compile those obscure shared libraries, and rebuild your application.

    Then you fire up your modified ctrl-c, ctrl-v enhanced software....

    It segfaults. For no apparent reason.

    So you Google the newsgroups, and lo and behold, someone else is having the same problem! But they don't know what the problem is.

    Next week, your newsgroup buddy has found the problem. It turns out that a change in the way gcc handles memory allocation causes your obscure libraries to crash when compiled with the newer versions. They recommend using an older version of the compiler to build the software.

    So you go back to the intermediate version, recompile, and finally, everything works great. For a few days, you've been enjoying the benefits of ctrl-c ctrl-v copy and paste. Life is good.

    And then, you notice that KDE starts crashing at random for some unknown reason...

"Consequences, Schmonsequences, as long as I'm rich." -- "Ali Baba Bunny" [1957, Chuck Jones]

Working...