Become a fan of Slashdot on Facebook

 



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:
  • 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".
  • 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 :-).
  • 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.
  • 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]
  • -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.

  • 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...

  • 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: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.
  • Re:Common problem.. (Score:2, Informative)

    by Klerck ( 213193 ) on Wednesday June 02, 2004 @04:22PM (#9318592) Homepage
    You can press ctrl+l in firefox and it will take you to the address bar while simultaneously highlighting it. Since you didn't manually highlight it, it doesn't copy into the paste buffer, and you're free to paste the other URL you had in the buffer into the address bar.
  • by Ender Ryan ( 79406 ) <TOKYO minus city> 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?

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

    by divirg ( 695027 ) on Wednesday June 02, 2004 @04:22PM (#9318609)
    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...
  • 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.

  • by GigsVT ( 208848 ) on Wednesday June 02, 2004 @04:27PM (#9318674) Journal
    If highlight clobbers something you copied with ctrl-c, then it's a bug in the program.

    There are two clipboards, and highlighting should never clobber something you manually copied.
  • by Xzzy ( 111297 ) <sether@@@tru7h...org> on Wednesday June 02, 2004 @04:28PM (#9318691) Homepage
    control-u blasts all of it. I know I've seen this convention somewhere I just can't place it. ;)

    Many of the bash control sequences do the same thing in web browsers. In most text editing situations, really.
  • by smittyoneeach ( 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 roca ( 43122 ) on Wednesday June 02, 2004 @04:30PM (#9318716) Homepage
    Only if your application sucks. freedesktop.org spells out how this should work; ctrl-c/ctrl-v manage the CLIPBOARD selection, and mouse selection manages the PRIMARY selection. Selecting text with the mouse should NOT interfere with ctrl-c ctrl-v operations in ANY way.

    http://freedesktop.org/Standards/clipboards-spec /c lipboards.txt
  • 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:Common problem.. (Score:3, Informative)

    by Apro+im ( 241275 ) on Wednesday June 02, 2004 @04:32PM (#9318740) Homepage
    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 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...
  • Re:Pasting urls (Score:5, Informative)

    by Martin Blank ( 154261 ) on Wednesday June 02, 2004 @04:33PM (#9318754) Homepage 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 aldousd666 ( 640240 ) on Wednesday June 02, 2004 @04:34PM (#9318758) Journal
    That's easy enough to fix. In your .rc file (or .login file) on the target host, set the terminal type to whatever you're used to. vt100 or ansi seem to work ok, but stick to one and you don't have to keep switching. I use tcsh, so in my .tcshrc file on each host, I have two lines that say

    setenv TERM ansi
    tset

    then I always use the ansi terminal settings (i.e. backspace not Ctrl-H)
  • you are wrong (Score:3, Informative)

    by Ender Ryan ( 79406 ) <TOKYO minus city> on Wednesday June 02, 2004 @04:36PM (#9318811) Journal
    1. There is no such thing as "X Windows"

    There are tons of SDKs for X-Windows, almost all of them using a separate clipboard implementation/mechanism.

    2. The above is completely false. X has a primary and secondary copy/paste buffer. It always works the same way, the only real caveat being that apps can use different key combos to control the primary buffer. I haven't used an app in years that used anything other than control+c/v for the primary buffer.

  • by gorre ( 519164 ) on Wednesday June 02, 2004 @04:40PM (#9318863) Homepage
    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:

    Wow, stop there! That sounds way too complicated. You do know that in Mozilla (as with Mozilla Firefox) you can just middle click anywhere on the current page and the browser will go to what's in the clipboard (or search Google with "I'm feeling lucky" if it's not a URL). Simplicity :).
  • 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: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:Common problem.. (Score:5, Informative)

    by RossyB ( 28685 ) <ross@burtonin[ ]om ['i.c' 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.
  • 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:X copy/paste (Score:3, Informative)

    by Too Much Noise ( 755847 ) on Wednesday June 02, 2004 @04:45PM (#9318939) Journal
    if you follow the link, you'll see they say:
    explicit cut/copy commands (i.e. menu items, toolbar buttons) should always set CLIPBOARD to the currently-selected data (i.e. conceptually copy PRIMARY to CLIPBOARD)
  • by XO ( 250276 ) <blade,eric&gmail,com> 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..

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

    by psoriac ( 81188 ) on Wednesday June 02, 2004 @04:50PM (#9318997)
    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.

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

    by divirg ( 695027 ) on Wednesday June 02, 2004 @04:50PM (#9319006)
    No, I'm thinking of Diggler [mozdev.org].

    "Diggler is a small but powerful add-on for Mozilla, Netscape and Firefox. It adds a button next to the location bar which can clear the location bar..."

    Similar, but without the keystrokes.
  • by zapp ( 201236 ) on Wednesday June 02, 2004 @04:51PM (#9319024)
    Actually that's an Emacs control sequence.

    Bash uses emacs control sequences by default, but can easily be set with either of 2 ways...

    1. set environment variable EDITOR=vi
    2. at prompt, type: set -o vi

    then bash will act just like vi
  • by Anonymous Coward on Wednesday June 02, 2004 @04:52PM (#9319029)
    You do know that CTRL+C is used to interrupt programs.. right?
  • 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 :)

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

    by GMC-jimmy ( 243376 ) on Wednesday June 02, 2004 @04:58PM (#9319101) Homepage
    X Windows, like bash, has it's own way of copy/paste (ie: highlight/middle-click) and KDE/GNOME have their own way of copy/paste (ie: ctrl+c/ctrl+v). What that means is while you're running X with a popular desktop suite like KDE or GNOME, you have more than one clipboard. As you propbably wouldn't use multiple text editors to simultaneously edit the same file, you shouldn't try to use multiple clipboard copy&paste functions for the same task.
  • by smcv ( 529383 ) on Wednesday June 02, 2004 @05:01PM (#9319130) Homepage
    Yes, there is a common clipboard mechanism. Once you understand that there are two separate clipboards (and that this is a feature), everything makes sense.

    Here's how it behaves in modern X environments like KDE 3, GNOME, XFCE, etc.:

    - There is a clipboard (called CLIPBOARD in the specs), which you interact with by explicit copy and paste commands, for which the key bindings are conventionally Ctrl+C, Ctrl+V, Ctrl+X to copy, paste and cut respectively. Use it whenever you would use the Windows or Mac OS clipboard, teach it to new users, and so on.

    - As an extra "easter egg", applications can manipulate the selection (the currently highlighted text) using the same API. The convention is to select text by dragging (or Shift+cursor keys, etc.) and to copy the selection from another program by pressing the middle mouse button. I will reassert: this is an "easter egg" for advanced users. The specs call this the "primary selection", PRIMARY (there is also a SECONDARY, but I am not aware of any program that uses it).

    As documented here:
    http://www.jwz.org/doc/x-cut-and-paste.html
    http://pdx.freedesktop.org/Standards/clipboards- sp ec/clipboards.txt

    OK, now the holes in that logical explanation:

    - KDE 2 used to use Ctrl+C, Ctrl+V to manipulate PRIMARY. This was wrong and had all the flaws the poster cites. Solution: Upgrade to KDE 3, problem solved.

    - Some other broken apps do the same. Solution: either fix them as you suggest, or stop using them. GNU Emacs 20 was apparently broken in the same way as KDE 2, while XEmacs and GNU Emacs 21 apparently work in the same way as KDE 3 (I can't confirm this, I use vim myself).

    - Some (usually older) apps (like xterm) don't have copy or paste commands at all, but do have the selection/middle-click behaviour. Solution: either use something else (e.g. Konsole if you're a KDE fan) or learn the middle-click behaviour too. Since the command line is generally considered to be "hard", it shouldn't be that much of an intellectual leap.

    - Ctrl+C already means something very common and specific (send a SIGINT) in console windows, so the standard Windows-style keybindings cannot be used in console windows. This is a historical clash between the Unix/DOS "Ctrl+C interrupts" and the Windows/OS2 "Ctrl+C copies" (on the Mac the convention is actually Command-C, so Ctrl is still available, and OS X's Terminal uses it as you'd expect) - Windows' MS-DOS-derived command prompt has the same conflict and a similar solution.
  • 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 lfourrier ( 209630 ) on Wednesday June 02, 2004 @05:06PM (#9319185)
    I grew up on Windows machines, using the ol' ctrl-c to copy and ctrl-v to paste.

    Those are not old. Those are a copy of Cmd-C Cmd-V from the Mac.

    The original old shortcuts for Microsoft Windows are Ctrl+Ins and Shift+Ins. And when I'm on a Microsoft Windows station, my fingers are doing them without me thinking. But alas, less and less application support them, nowadays.

    If Microsoft managed to change, in the course of a few years, such a fundamental characteristic of the UI, why X could not ?

  • 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.
  • Re:Common problem.. (Score:3, Informative)

    by DeadInSpace ( 320683 ) on Wednesday June 02, 2004 @05:14PM (#9319276)
    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.
    Wrong. X' selections mechanism (which is a general data sharing mechanism that's also used for copy/paste) supports any kind of data, not just text. It's the widgetsets and/or applications that don't understand anything other than text. Luckily, this is improving as GTK and QT are working on this.

    From the ICCCM [tronche.com], section 2.6.2 (referring to data transferred through selections):
    The atom that a requestor supplies as the target of a ConvertSelection request determines the form of the data supplied. The set of such atoms is extensible, but a generally accepted base set of target atoms is needed. As a starting point for this, the following table contains those that have been suggested so far.
    From a document explaining X selections [jwz.org]:
    One of the really cool, yet rarely used, features of the selection mechanism is that it can negotiate what data formats to use. It's not just about text. When one application asks another for the selection, part of their communication involves the requester asking the owner for the list of types in which they are capable of delivering the selection data; then the requester picks the format they like best, and asks for it that way.
    By the way, "X-Windows" doesn't exist, it's the "X Window System", or "X" for short.
  • by Christianfreak ( 100697 ) on Wednesday June 02, 2004 @05:15PM (#9319310) Homepage Journal
    X can copy content and it has multiple clipboards, the problem is that everyone has done the implementation the wrong way. (See the links folks have posted above)

    Gnome seems to be able to copy an paste files just fine, and I'm sure KDE can too. I use Blackbox and I can drag images off the web from Firefox to GIMP and they open (oddly enough if I drag from Firefox to Nautilis they save only the URL, probably a bug in Nautilus)
  • Re:Pasting urls (Score:3, Informative)

    by AntiOrganic ( 650691 ) on Wednesday June 02, 2004 @05:24PM (#9319424) Homepage
    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.


    Unfortunately, it's so bug-ridden and terrible that Firefox developers won't accept bug reports from people who have it installed.
  • by Rysc ( 136391 ) <sorpigal@gmail.com> on Wednesday June 02, 2004 @05:30PM (#9319492) Homepage Journal
    This is a common mistake. In reality:

    Highlighting text puts it into the X selection buffer.
    Middle clicking pastes the X selection buffer.
    CTRL+C (or whatever copy is set to) puts text onto the X clipboard.
    CTRL+V (or whatever) pastes the X clipboard.

    Notice: THERE ARE TWO BUFFERS. The X selection buffer and the X clipboard buffer. If your app overwrites the clipboard on highlight then it s misbehaving (see fd.o [freedesktop.org] for what is "right").

    Adjust your thinking just a smidge: When you select, it does not copy. It acts just like in Windows... only you can also access the last selection on a way Windows prevents.

    Repeat: If your apps do not behave this way, /they are broken/. Don't blame *nix, or X, blame the author of the app. Some apps are deliberately broken (because it makes More Sense[tm]) but not terribly many.
  • Re:Pasting urls (Score:3, Informative)

    by fishbot ( 301821 ) on Wednesday June 02, 2004 @05:34PM (#9319551) Homepage
    Not quite. There are windowmanagers out there designed to be exclusively used with the keyboard (ratpoison for one, evilwm for another). X itself is input device agnostic. The window managers assume to much.
  • by Ayanami Rei ( 621112 ) * <rayanami AT gmail DOT com> on Wednesday June 02, 2004 @05:36PM (#9319565) Journal
    sites like slashdot, sa and 2/4chan people will purposefully not create clickable links, but type the URL-as-text. Just select, CTRL+N, middle click, no problem.

    The only thing that gets you is slashdot's page-widening-defeating mechanism. But you still have a chance to correct the typos in the URL bar if it 404s on you.
  • by Prowl ( 554277 ) on Wednesday June 02, 2004 @05:36PM (#9319568)
    i could be wrong but i belive those sequence are readline(3), which is used by emacs/bash etc
  • 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 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.

  • Stop blaming Linux! (Score:3, Informative)

    by Dominic_Mazzoni ( 125164 ) * on Wednesday June 02, 2004 @05:57PM (#9319800) Homepage
    I can't believe this is still an issue! I can't think of a single Linux app that I still use regularly that doesn't support Windows-and-Mac-style copy and paste. I just copied some text from OpenOffice to Mozilla to Konsole, no problem. The GNOME and KDE folks agreed on a common clipboard standard years ago, and probably 90% of popular Linux desktop apps conform.

    Complaining because some free Linux apps still don't support the clipboard is like complaining that the Windows clipboard is broken because some freeware text editor doesn't copy and paste between programs.
  • Re:Pasting urls (Score:2, Informative)

    by BinLadenMyHero ( 688544 ) <binladen@9[ ]ls.org ['hel' in gap]> on Wednesday June 02, 2004 @06:03PM (#9319864) Journal
    I prefer Digger [mozdev.org].

    Also note that you can, within Firefox, drag a link or a selected URL text to the tab bar to open it. If you drag to an existing tab it will replace that tab, and on an empty area (or the X button, if the bar is full) of the tab bar it will open a new tab.
  • Re:Pasting urls (Score:5, Informative)

    by lerouxt ( 129730 ) <tom@nospAm.harborcoat.com> on Wednesday June 02, 2004 @06:12PM (#9319946)
    In KDE you can configure Klipper to either "Synchronize contents of the clipboard and the selection" or "Separate clipboard and selection".

    Your choice.
  • by Jamie Zawinski ( 775 ) <jwz@jwz.org> on Wednesday June 02, 2004 @06:41PM (#9320159) Homepage
    highlighting text in Linux automatically performs a copy

    Well, no, not really. Here's how it really works. [jwz.org]

    I totally agree that too few Unix programs support the C-c/C-v idiom, but it's orthogonal to the select/middle-click idiom.

  • by cozziewozzie ( 344246 ) on Wednesday June 02, 2004 @06:41PM (#9320162)
    Yes, there is a solution. It's called KDE and has implemented what you wanted since KDE 3.0. If you don't like the old X way of copy/paste, then don't use it. Use a modern desktop environment, they all provide copy/paste functionality you are used to.
  • Re:X copy/paste (Score:3, Informative)

    by Carewolf ( 581105 ) on Wednesday June 02, 2004 @06:46PM (#9320191) Homepage
    Actually the problem is easierly solved using the clipboard. Just press CTRL+C, then select and delete and press CTRL+V. If implemented correctly the selection has not overriden the clipboard.
  • by neves ( 324086 ) on Wednesday June 02, 2004 @07:06PM (#9320359) Homepage
    If you use kde, it comes with a nice task bar applet called klipper. It remembers the last copied texts. All you have to do is a ctrl-alt-v and it will list your last selections, choose the one you want to past, and midle-click where you want to past it.

    If you use mozilla/firefox, another nice tip is to use the plug-in diggler [mozdev.org], it adds a cancel button beside the browser url location field. You can then just press it to clean the field, instead of selecting and pressing del, this way the selection won't go to the clipboard.

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

    by Watts Martin ( 3616 ) <layotl&gmail,com> on Wednesday June 02, 2004 @07:15PM (#9320432) Homepage

    I admit it's been a while since I used X regularly, but as I recall, you often didn't have a choice of which system to use -- many programs only responded to one or the other. This is what can be irksome. I distinctly remember some combination I had when I was running under XFce where I couldn't move a URL from the terminal window to Mozilla, period. Each of them knew about their own clipboard style, and that was it.

    I admit I'm not sure what you mean when you say that the X windows system can "work across different terminal sessions whereas KDE/GNOME's cannot." If you simply had one unified clipboard, wouldn't this still be the case (if it was done correctly?) That's the way it works in OS X. This sounds like a problem with KDE/GNOME's implementation, unless I'm misunderstanding you.

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

    by Anonymous Coward on Wednesday June 02, 2004 @07:34PM (#9320571)
    Option "AllowMouseOpenFail" "true" in your XF86Config. This is on by default on all linux distributions I've used recently, actually, so I'd be interested to know what distro you were using so it can be corrected.

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

    by Wyzard ( 110714 ) on Wednesday June 02, 2004 @07:41PM (#9320610) Homepage
    You can paste between terminal sessions using GNOME's clipboard mechanism -- you just have to use different hotkeys (in gnome-terminal it's ctrl-shift-C to copy) since the usual ones need to be passed through to the shell (ctrl-C to abort a job, for example).
  • in emacs... (Score:4, Informative)

    by davids-world.com ( 551216 ) on Wednesday June 02, 2004 @07:52PM (#9320693) Homepage
    I have solved the problem in Emacs with a customization package: it defines Apple-C and Apple-V, because I found it too annoying on my Mac. It also doesn't put marked text automatically into the clipboard (or whatever the emacs folks call it: kill-ring). you can get a package here [reitter-it-media.de].
  • Re:Pasting urls (Score:5, Informative)

    by phoenix.bam! ( 642635 ) on Wednesday June 02, 2004 @07:53PM (#9320703)
    You don't need mouse gestures, all you need to do is highlight a URL, and paste it into the MAIN WINDOW of the FireFox browser, NOT THE URL BAR, and it will load that website.
  • by sakti ( 16411 ) on Wednesday June 02, 2004 @08:29PM (#9321051) Homepage
    First 2 shell scripts:

    $ cat xcopy
    #!/bin/sh
    xclip -o -selection primary | xclip -selection clipboard

    $ cat xpaste
    #!/bin/sh
    xclip -o -selection clipboard | xclip -selection primary

    Then using your favorite keymapper set these to something close (M-c/M-v in my case). Here's an excerpt from my .bbkeysrc:

    KeyToGrab(c), WithModifier(Mod1), WithAction(ExecCommand), DoThis(~/bin/xcopy)
    KeyToGrab(v), WithModifier(Mod1), WithAction(ExecCommand), DoThis(~/bin/xpaste)

    Now alt-c copies highlighted text to the clipboard. Then alt-v copies the clipboard to the primary selection (so middle click them pastes it).

    Note that many programs that support C-c/C-v use X's clipboard selection. That means you can hit C-c in say firefox, them hit C-v, then middle click into an xterm and get the text you copied from firefox.

    Hope this helps.
  • Re:Pasting urls (Score:2, Informative)

    by crossconnects ( 140996 ) <.crossconnects. .at. .gmail.com.> on Wednesday June 02, 2004 @08:39PM (#9321122) Homepage Journal
    Easy.

    redirect the output to a file.

    switch to the other terminal

    read back from the file. use grep if necessary.
  • Re:Pasting urls (Score:2, Informative)

    by vikool ( 523319 ) <vikas@pu r d ue.edu> on Wednesday June 02, 2004 @08:54PM (#9321219)
    Most problems are listed here:
    http://white.sakura.ne.jp/~piro/xul/_tabextensions .html.en#problems [sakura.ne.jp]
  • by HtR ( 240250 ) on Wednesday June 02, 2004 @09:10PM (#9321339)
    Generally speaking, these still work. I got used to them and still use them regularly today in virtually all Windows applications.

    By the way, Cut is Shift-Delete
  • Re:Pasting urls (Score:4, Informative)

    by Fancia ( 710007 ) on Wednesday June 02, 2004 @10:59PM (#9322008)
    But it also offers a "Light" mode with only the more commonly-used features turned on, which makes it much faster and less buggy.
  • Re:Pasting urls (Score:3, Informative)

    by jargoone ( 166102 ) on Thursday June 03, 2004 @12:05AM (#9322311)
    I don't know if you're being a smart ass, but I'll assume you're not so I actually help you if that's the case. I wasn't just being pedantic when I said bash itself doesn't have copy and paste. It's a combination of the window manager and the terminal program.

    It just so happens that most Linux distributions that I've seen come with a console-mode copy and paste program called "gpm". Look at the output of "ps" and see if it's running. If not, start it. Once it's running, switch to a virtual console and move your mouse and you should see a cursor floating around.
  • Re:Pasting urls (Score:3, Informative)

    by ader ( 1402 ) on Thursday June 03, 2004 @03:41AM (#9323244) Homepage
    On Mozilla, Multizilla [mozdev.org] provides a similar button next to the URL bar. (Plug: it's a great extension, almost like having a new browser.)

    Ade_
    /
  • by Talthane ( 699885 ) on Thursday June 03, 2004 @04:21AM (#9323367)
    Cmd-L works in Safari too (as you might expect, since it and Konqueror are practically identical at times).
  • Re:Pasting urls (Score:3, Informative)

    by gowen ( 141411 ) <gwowen@gmail.com> on Thursday June 03, 2004 @06:03AM (#9323756) Homepage Journal
    Me too. Fortunately, you can turn it off.

    Go to about:config and set the value of middlemouse.contentLoadURL to false

    I felt a whole lot better afterwards.
  • my notes (Score:3, Informative)

    by pixelbeat ( 31557 ) <P@draigBrady.com> on Thursday June 03, 2004 @06:37AM (#9323856) Homepage
    X' clipboard confused my when I started so I made these notes:

    X has 2 clipboards. There is a selection buffer which is updated
    automatically when you select any text. You can paste from this
    buffer by clicking the middle mouse button.
    Then there is the clipboard (which can be managed using
    the xclipboard utility), which works like the windows equivalent
    (Ctrl+Insert or Ctrl+c for copy, and Shift+Insert or Ctrl+v for paste)
    Note gnome-terminal uses Shift+Ctrl+c and Shift+Ctrl+v instead.
    Note when you copy something in an X application
    and you close it, the content of the clipboard and selection
    buffer is lost (unless you use an external app to manage the
    clipboard (like xclipboard)).
  • by cthulhubob ( 161144 ) on Thursday June 03, 2004 @11:16AM (#9325883) Homepage
    X supports a similar method known as "content negotiation" whereby the programs decide between themselves on a compatible format for the data being moved.

    I just selected some HTML text, including a hyperlink, from Mozilla, middle-clicked in a GAIM window to send it to a friend and it showed up perfectly formatted, with an active hyperlink in it.

    If you want clipboard history / multiple clipboards, you have to use a third-party tool to do it, same as in Windows. It's called XClipboard.

Love may laugh at locksmiths, but he has a profound respect for money bags. -- Sidney Paternoster, "The Folly of the Wise"

Working...