Catch up on stories from the past week (and beyond) at the Slashdot story archive

 



Forgot your password?
typodupeerror
×
GUI Software X

Dealing with the Unix Copy and Paste Paradigm? 1125

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:
  • 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!)
  • 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.
  • 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?
  • 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.

  • by Pieroxy ( 222434 ) on Wednesday June 02, 2004 @04:25PM (#9318644) Homepage
    The fact that copy/paste is buggy or sluggish under X-Windows has a simple reason: There are tons of SDKs for X-Windows, almost all of them using a separate clipboard implementation/mechanism.

    Saying that you deal with a technical problem by getting used to it, is saying that technology will fail to address the problem. As you say, "Linux is different" (almost true, since it has almost nothing to do with Linux, but rather with X-Windows). I would rather say:

    X-Windows clipboard management sucks. If you want to use Linux on the desktop, you'll have to get used to it.

    The lack of a decent standard allow everyone to do everything. And they do. And we are left with a huge app base for X, with very high UI fragmentation. Hence, what you learn to do with one app is different with another one.

    Annoying, but that's the way X is.
  • by expro ( 597113 ) on Wednesday June 02, 2004 @04:27PM (#9318680)

    The middle button does a "paste current selection", which is not exactly equivalent to any of the other cut / copy / paste functions you find on Windows or Linux. I noticed that OSX has this function available in some apps as shift-command-V.

    You can completely ignore it if you do not like it awnd stick to control x / c / v, or you can choose to use it.

    Either way, it should not interfere with the normal cut / copy / paste operations that are available.

    If you cannot keep that strait in your mind, then ignore the functionality and do it the way Windows does it.

    I have found as much consistency on Linux for cut / copy / paste between applications as I ever found on Windows, when I used it -- both are far from perfect.

  • ^U and ^K (Score:2, Interesting)

    by ShadowFlair ( 690961 ) on Wednesday June 02, 2004 @04:30PM (#9318719) Homepage Journal

    I am starting to pick up on clicking the end of the URL, ^U and then middle click. Or, click the middle of the URL, and ^K to kill the rest of the line.

    At home (on Windows) I use the True X-Mouse Gizmo [chalmers.se] which makes Windows mouse more X-like(select = copy, middle = paste, raise/lower window). One thing nice about it is if you explicitly hit ^C (as opposed to select copy) it knows to not copy the next time you select some text. You can also middle-click while dragging to turn on/off copy.

    This is kind of confusing at the beginning, but it sure beats all the accidental copying I've done.
  • by big daddy kane ( 731748 ) on Wednesday June 02, 2004 @04:31PM (#9318728)
    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
  • Re:Oh boy (Score:2, Interesting)

    by happyfrogcow ( 708359 ) on Wednesday June 02, 2004 @04:42PM (#9318895)
    Meh.

    Highlighting having the side-effect of copying is just unintuitive and often the wrong behavior. It's speculating that you will want to copy the highlighted text, but often times you want to delete the highlighted text without clobering your copy buffer. or maybe you might just want to highlight the text to mark your spot.

    For your example of deleting after you paste, that is a matter of bad usability. so i've got this really long URL in the location bar. i middle click and paste before the first letter of the old URL. then what, i hold down delete until all the old stuff is gone? i highlight it (and by side effect copy it) then delete it? or does a keyboard initiated highligh not copy to a buffer, probably not. But still instead of the 2 actions of "highlight and paste" i have "paste highlight delete" and might end with a clobbered copy buffer.

    c'mon... i'm lazy. why do 3 things when i can do 2?

  • by Too Much Noise ( 755847 ) on Wednesday June 02, 2004 @04:43PM (#9318911) Journal
    Ho-hum ... your 'mother test' is actually the 'Windows user test'. X copy/paste predates Windows copy/paste. And it's more flexible (this being currently the problem). This is the correct behavior for X, not for Windows.

    If the 'typical mother' had started with a DEC instead of Win3.x/Win9x, middle click paste would have been the 'correct and expected behavior'.
  • by dR_gOnz0 ( 785050 ) on Wednesday June 02, 2004 @04:49PM (#9318990)

    Other than simply getting used to the way unix handles it's clipboard, I've found that using programs compiled from similar libraries does away with this issue.

    I use Gnome 2.6 currently, and using Ctrl-C Ctrl-V for copy and paste works in all of the applications I use. Although I do revert back to the double click, and a middle click a lot.

    I can only assume that using KDE is similar as long as you stick with KDE or QT apps.

    The problem is probably more prominent when using different applications that rely on different library sets. If you're using Gnome as your desktop, and Konq as your browser, ya, you might have an issue. If you use Gnome, and epiphany; you probably won't see this problem.

    That's my two cents.

  • Re:-1 Redundant (Score:1, Interesting)

    by Anonymous Coward on Wednesday June 02, 2004 @04:49PM (#9318991)
    I don't like C-c and C-v. They're needless keypresses. The select-and-click is an easy-to-use and simple paradigm. Please don't force me into complicated extra steps just because windows people like them. C-c/C-v is not a standard at all; Windows came along many years after the X clipboard functioned the way it did, and does today. If anything the X way is the standard and the windows people should change.
  • 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.
  • by Too Much Noise ( 755847 ) on Wednesday June 02, 2004 @04:52PM (#9319038) Journal
    Tell me about it! especially in Firefox, with everything looking just like in Linux. select, middle-click ... wtf??? oh, right ... keyboard :-(

    No matter how much windows users complain about it, middle click selections are sooooo useful if you understand them.
  • 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 :)
  • Fuck all this (Score:1, Interesting)

    by Anonymous Coward on Wednesday June 02, 2004 @05:17PM (#9319338)
    We should get mouse manufacturers to add 4 small buttons to the mouse directly underneath the normal buttons so you can just curve your fingers a little and have Cut, Copy, Paste, and Delete. Wouldn't that make the most sense and fuck all this other shit?
  • Re:Pasting urls (Score:5, Interesting)

    by pantherace ( 165052 ) on Wednesday June 02, 2004 @05:18PM (#9319357)
    Yes, there is a similar thing in KDE called klipper (been there since kde-2.0) which handles text much better. It's a tray applet which uses a stack to handle text selections.

    Honestly, I never use a clipboard to copy anything other than text. If I must use a mouse to copy something, I will drag & drop it, not select, copy, select insert point, paste. Honestly, I don't get the whole copy/paste using the Windows style. X's highlight/copy & middle click paste is so much more useful, when used with klipper (or presumably gcm), which eliminates the one weakness of it, and actually makes it better (multiple item storage).

    People should try to adapt. Middle click in any browser with a url (at least among konqueror, mozilla & derivatives, opera & everything I can recall using except links.) & it opens it, no need to go to a location bar. Or drag the url & drop it on a browser window.

    So many ways to do it, but people will whine that 'the one way' doesn't work. It makes me wonder if there is an intuitive interface for a computer AT ALL. (And, NO, Mac Zealots, the Mac doesn't qualify!) Current GUIs aren't, CLIs don't seem to be, & voice commands are unlikely to be in my opinion.

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

    by Martin Blank ( 154261 ) on Wednesday June 02, 2004 @05:39PM (#9319596) Homepage Journal
    I went looking for something to back up your statement, but I couldn't find it. Perhaps you could point me to something about this?

    And isn't the normal response to any installation with extensions installed to advise removing the extensions first and seeing if the problem lies with the extension code, thereby moving the onus of fixing the problem to the extension developer?
  • Opera (Score:1, Interesting)

    by Anonymous Coward on Wednesday June 02, 2004 @05:46PM (#9319676)
    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

    Opera [opera.com] does all of these things natively.
  • by jmorris42 ( 1458 ) * <{jmorris} {at} {beau.org}> on Wednesday June 02, 2004 @05:49PM (#9319703)
    Really, the sun doesn't rise and set over Redmond Wash. UNIX/X has been using the middle button to paste for a decade or so. If you want to use UNIX you shouldn't expect it to be just like Windows. What is it with this low self esteem problem! People don't migrate to the Mac and expect IT to act like Windows but everybody migrates to Linux/X and sits around bitching because it isn't Windows. KDE and GNOME are terrified of doing anything that doesn't look like Windows because it might hurt adoption. Bull!

    Linux/UNIX/X/GNU/blah is a different culture, just like Mac. Just because YOU dual boot the same machine to play games doesn't change that reality. And if you really decide you don't like UNIX culture just keep running Windows... or go buy a Mac if you would like something that won't contribute to the Outlook worm problem.
  • Rotate cutbuffer (Score:2, Interesting)

    by AngryRodent ( 519420 ) on Wednesday June 02, 2004 @05:52PM (#9319741)
    Back in college (about '93 or so) I got frustrated enough by this to write a little X app to build multiple cut-buffers and rotate through them. Something like 10-20 lines of C. Bound it to a twm menu, and ta-da. Highlight, click, highlight, delete, click, paste. I'm sure someone has written something far more usefull in the same genre by now..
  • by Oriumpor ( 446718 ) on Wednesday June 02, 2004 @05:58PM (#9319804) Homepage Journal
    Unless you have an alternative mouse on mouse laptops there is no middle click, hence no decent way to copy + paste in linux applications. I'm not about to setup something involving ctrl/alt etc to emulate a middle click when something like CTRL+V is so much more convenient, and reliable.

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

    by Anonymous Coward on Wednesday June 02, 2004 @06:02PM (#9319854)
    You are probably right about what he said, but it is still massive bloatware and buggy. I need about 10% of what it does, I wish he modularize it or something along those lines to make it's footprint smaller and destabilization less.
  • by dozer ( 30790 ) on Wednesday June 02, 2004 @06:18PM (#9319997)
    There are three things that drive me nuts about X's clipboard:
    • Select some text, go to middle-click-paste but discover that the destination already has text in it (this Ask Slashdot issue).
    • The clipboard disappears when you quit the application. Try it: copy some text, quit the app that you copied it from, and then try to paste.
    • You can only copy and paste plain text. Sure, it's theoretically possible to push alternate mime types up there too but that gets heavy really quick. I have yet to see a non-plain-text clipboard move correctly between two different Linux apps.
    Gnome Clipboard Daemon [chello.nl] tries to fix the second problem. I have no idea how to fix the third. And here's a proposed solution for the first problem:

    Almost every text-entry box ever made has some sort of label or widget on its left identifying it (the URL bar has little "Go" or world icons, dialog boxes have "Labels: ", etc). Just adopt the convention that a middle-click on the text box's label replaces all the text in the box with the primary X selection. For example, middle clicking on the little world icon next to the left of the URL box would replace the URL with the current selection (but would not automatically go there, allowing you to edit it before hitting return). A middle click inside the textbox itself inserts text as it always has.

    It's intuitive, consistent, finger-compatible and easy to implement, especially if the toolkits support it natively.

  • by bozojoe ( 102606 ) on Wednesday June 02, 2004 @06:23PM (#9320031) Journal
    Am I the only one using the old school cut, copy, paste keyboard sequences?
  • Re:Oh boy (Score:3, Interesting)

    by grishnav ( 522003 ) <grishnavNO@SPAMegosurf.net> on Wednesday June 02, 2004 @07:04PM (#9320342) Homepage
    How are you ever going to do just 2 things?

    By "things," he really means "context switches."

    Check it:

    1. Highlight URL (from IRC window/whatever)
    2. Hit ctrl+c
    3. Click in address bar of browser, which automatically highlights URL.
    4. Ctrl+v (which pastes over highlighted URL)

    Compare to:

    1. Click in address bar of browser, auto-highlight.
    2. Del
    3. Go back to other window, IRC or whatever.
    4. Highlight URL to copy it.
    5. Go back to browser, click on empty URL bar
    6. Middle-click to paste.

    So, the "X way" doesn't seem like a whole lot more work than the "windows way"?

    Scenario: I've got xterm open, chatting with friends. Somebody sends the room a URL.

    Windows way: I highlight and hit CTRL+C to copy, so fluid as to practically be one action. I pop open Moz, wipe out the URL of my home page, and paste it in.

    X way: I have to first open Mozilla and delete the URL of my homepage, whenever it comes up. Then, I have to return to my chat window, perhaps scroll (depending on how quickly the room moves - I've been in some fast ones), and find the URL. Now, I copy it, and return again to Mozilla. Because I have limited memory, this causes a delay, as Mozilla has to be swapped back in (not so much of an issue anymore, but it was at a time). Finally, I am able to paste the URL into the browser.

    With Windows, I've only had one context change (IRC Client -> Browser) rather than three (IRC Client -> Browser -> IRC Client -> Browser).

    So, basically, the "Windows Way" involves less repetitive "back and forth" actions, whereas the "X way" is pretty terrible if you hate doing things twice (a moral faux pas, according to ESR).

    Of course, this is only one particular scenario, but I hope you can see how the "X Way" isn't always the "best way."

    The "X Way" certainly has advantages in some situations. However I've found in my daily routines and my line of work that I tend to prefer the "Windows Way." You may have different habits, which would of course make it unsuitable to you. This is why I'd much love a way to configure my copy+pasting to be more Windows like, without necessarily taking away the option... (though I do prefer middle-mouse to ctrl+v).

    Of course, it would be better still of the computer simply knew what we wanted and could figure out the appropriate action to take on its own. AI majors out there listening up? Practical application! :)
  • Re:Common problem.. (Score:1, Interesting)

    by Anonymous Coward on Wednesday June 02, 2004 @07:59PM (#9320780)
    I don't agree, at least for current state of the art. Too often, the more "user friendly" an interface becomes, the less useful it is. The thing about a learning curve is, as I use the thing, I get better at it. Some programs have a long learning curve, which means I can get really good at using the program. At that point, the interface melts away, and I am interacting with my ideas.

    Emacs and vi have long learning curves. Notepad has all options visible and simple to understand. For those who use editors for hours on end, the simplified interface becomes a liability, where the "hard" interface becomes almost thought control.

    As an engineer, I've been watching nice, thorough, programmable Unix-like interfaces being replaced by "user friendly" Windows interfaces. I'm becoming less efficient accordingly.

    Now, someone could probably design an interface that would be easy to use while being backed up by a powerful, configurable UI engine. If they could then make the steps to go to the next level easy and obvious, then we would have a really cool engine. Everyone starts out the same, with an easy standard interface. Everyone ends up with an interface that exactly meets their needs (by their choice, not the computer's). Then I would agree with you.
  • by Big Boss ( 7354 ) on Wednesday June 02, 2004 @07:59PM (#9320783)
    Nope, I preffer those too. Probably just inertia. I have noticed that some new apps don't support them though.
  • by RzUpAnmsCwrds ( 262647 ) on Wednesday June 02, 2004 @10:13PM (#9321745)
    Sidenote: in Internet Explorer, CTRL+L brings up the "Open Page" dialog and gives focus to the URL field. You can paste in a URL and press enter.

    So this trick is cross browser.

    Also, AlT+D in IE does the same thing as CTRL+L in Mozilla.
  • 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".

  • by PhilHibbs ( 4537 ) <snarks@gmail.com> on Thursday June 03, 2004 @06:07AM (#9323773) Journal
    ...if I switched to *nix.

    I write a lot of short perl scripts that read the clipboard, transform it, and then write it back. De-duplicating lines, converting each line to an entry in a comma-separated list, tr/-_/_-/, translate characters to HTML entities (< to &lt; for instance - there, I just used that one!), wrap the text in <blockquote><i> </i></blockquote> (there - I just used them both!)

    In addition, I have them bound to bucky combinations - Ctrl-Shift-Q for blcokquote, Ctrtl-shift-[-] for the -_ swap, thing, etc.

    I don't know if this is possible on a *nix desktop, but I can't see a unified *nix clipboard module for perl.

He has not acquired a fortune; the fortune has acquired him. -- Bion

Working...