Dealing with the Unix Copy and Paste Paradigm?
MolecularBear asks: "I grew up on Windows machines, using the ol' ctrl-c to copy and ctrl-v to paste. For the past few years I've been a hardcore Linux user, running it almost exclusively at home and at work. As I am sure you are all aware, highlighting text in Linux automatically performs a copy while the middle mouse button performs a paste. The Ctrl-c, Ctrl-v standard works in many applications, but not all. Lately I have begun to find the automatic highlight-copy to be annoying. As in, I'll highlight text to copy it, then realize I want to highlight a block of text for the purpose of deleting it. Of course, the second highlighting overwrites the first highlighting. I am curious about how other people accomplish their copy/paste needs. Any special setups, applications, or words of wisdom?"
..but I don't have a solution either :)
;)
What annoys me the most is when copying/pasteing URL's. I'll highlight© a url somewhere then I go and paste it into firefox. Out of habbit I'll go and highlight the current URL and control+v what I assume I'm pasteing... and end up with the same URL that I started with.
Whats more interesting is that sometimes what control+v pastes is different from what the middle-click pastes. I'm sure there is a reason, and I'm also sure its my fault for not knowing it... but its still annoying..
What I've come to do is to copy a link via control+c or highlighting then opening a new tab in firefox. I have firefox to open new tabs to blank URL's and then I just middle click or control+v the URL.
Its a partial and flawed solution to a small part of your problem. Of course, this is Slashdot
Karma: SELECT `karma` FROM `users` WHERE `userid`=138474;
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".
...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 :)
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 :-).
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
Oh, you're not stuck, you're just unable to let go of the onion rings.
Whew, glad to see I'm not the only one .. the whole "click middle button to
/boot/kernel-2.4.25 to the printer.
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
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!)
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.
"... performs a copy while the middle mouse button performs a paste."
I use a Mac you insensitive clod!
I keep hitting control-B to get previous commands, control-H to get to the beginning of the line, control-A to insert, control-E to get to the end of the line.
You think YOU have problems?!?! Think about poor poor pitiful me and my basement full of VAXen next time.
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.
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.
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.
I don't need no instructions to know how to rock!!!!
Actually, come to think of it...I have no idea what paradigm means.
Or else, first paste what you want to insert, then delete what you want to remove...
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 ....
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.
So what is the problem? Are the apps you use broken?
Sticking feathers up your butt does not make you a chicken - Tyler Durden
What most linux aficionados don't realize is that vi and emacs are the best anti-linux vaccines. The moment you tell a non-technical person that he or she would have to use from now on the usability nightmares that vi and emacs are, you can't be sure that they not only will they run away from linux, but they'd also tell everybody to do the same.
KDE does ctrl-c/ctrl-v in most of its apps, if jedit is too heavy for you, try kate for a change.
Open source project very rarely have the money to do real usability apps, so I think it'd be a good idea to adopt UI elements from existing commercial designs
The Raven
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?
If construction was anything like programming, an incorrectly fitted lock would bring down the entire building...
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.
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.
Write boring code, not shiny code!
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.
I'm trying to teach myself to set people on fire with my mind... Is it hot in here?
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.
an ill wind that blows no good
The 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.
Get thee glass eyes, and, like a scurvy politician, seem to see things thou dost not.--King Lear
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 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.To iterate is human; to recurse, divine!
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
In this case, one action is completely identical to another (highlight to copy is indistinguishable from highlight to select) and you end up with a potentially destructive situation. When something like this is considered normal usage, it may not be "wrong" but it sure ain't "good."
Your favorite sig sucks
The current consensus on freedesktop.org is something along the lines of:
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
The XFCE window manager has a nice clipboard management utility that sits in the Dock. Clicking on it displays the last 8 or so things that you copied/cut. Selecting one "arms" it so that you can paste that item.
If the people who built X designed a car, you'd have to start the engine by turning a crank, and accelerate by dangling more food to the hamster running in the flywheel attached to the driveshaft.
Adapting to stupid, broken, and braindead things -- such as the X cut and paste lossage -- is itself stupid. Here's a nickel, kid. Go buy yourself a real window manager and toolkit.
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 to the topic for more information.
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...
setenv TERM ansi
then I always use the ansi terminal settings (i.e. backspace not Ctrl-H)tset
Speak for yourself.
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?
No offense, but this arrogance is exactly why Linux has insignificant desktop market share. Until the Linux community can get off its high horse ("This is the correct behavior??" Who says?), it will fail to attract users.
Specifically, it will fail the "my mother" test: Why would my mother want to use this? As a disclaimer, let me point out that my mother has postgraduate education, has started a successful business, is a successful archaeologist, etc. We're not talking about a country bumpkin here. But she doesn't much like, or understand, computers. It took her long enough to figure out Ctrl-c Ctrl-v; she doesn't want to learn another behavior.
The fact is that if Linux wants people to "adapt", then it needs to offer *evident* benefits beyond what Windows offers (again, subject to the my mother test; she doesn't care to recompile anything at all, ever). I might see enough benefit to tolerate some annoyance (I've never really noticed this as a big one, though I'll now be sure to count the times that I errantly cut/paste things), but she doesn't.
-db
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.
Sticking feathers up your butt does not make you a chicken - Tyler Durden
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.
"How to Do Nothing," kids activities, back in print!
Telling someone that they are clueless beacuse they use a differnt setup than you is not very helpful.
Free Mac Mini Yeah, it's
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...
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'.
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..
"Champagne for my real friends - and real pain for my sham friends!" http://ericblade.postalboard.com/
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.
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
no comment
Call this a troll if you must, but there is much to be appreciated from the monolithic leviathon.
OS behavior that is uniform throughout its (correctly written) applications is essential for end user ease of use and training. Period.
And why do some folks here try to deflect blame from the Linux operating system. (Its X's fault, Linux is as innocent and pure as the driven snow). Fine, then Linux peddlers need to create a true "Linux GUI" that functions uniformly accros applications.
These dumb mentalities of: "thats just the way it is" or "if you dont like it, you fix it" or "we can't change longtime stupid unix behaviors, the users must learn to workaround it" is exactly what keeps Linux from growing into a legitimate desktop OS.
I am sorry but you cannot speak for me about what I prefer. I have changed my jed editor to do ctrl-c and ctrl-v properly. I have done contract work using mouse highlighting on an HP UNIX system. It is a torture to be constantly changing models and control behaviors. X should adopt 2 standards, one which is ctrl-c ctrl-v and the other the mouse highlight. The user should be able to select which one they want to use, and it should affect all tools used under X. This is not about who gets to claim the interface is right, this is about the user having an interface that THEY can use.
So, basically, the clipboard would work OK for your mother. It's power users who try and combine both mechanisms at once then get confused who it doesn't work for, but there's no way around that.
The real problems with the X clipboard have more to do with handling large quantities of data, and standardised data formats than middle click vs ctrl-c/v.
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.
l - sp ec/clipboards.txt
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.htm
http://pdx.freedesktop.org/Standards/clipboards
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.
In a nutshell, there are TWO completely different clipboards implemented in X:
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.
Here's an idea, publically disclosed so no evil little fuck can patent it:
Whenever PRIMARY changes, make the secondary selection the previous primary, and add a "Swap" menu item + shortcut to make Cut/Copy/Paste/Swap.
Use Case:
Highlight some text "hello", lets say the highlight is bright blue background.
Go to somewhere else, highlight some more text "goodbye". "goodbye" becomes bright blue background indicating it is now PRIMARY. "hello" has become faded blue, indicating it is now SECONDARY.
Now "Swap". "hello"+"goodbye" exchange places! I think "hello" in its new position should have the PRIMARY selection, and "goodbye" in its new position the SECONDARY, as that's where the user will "be" after swapping, and a second "Swap" will restore the text to its original state.
Most cut/paste operations I do are reorganisations of that nature. Other people might differ - but it's certainly one of those features that would keep legal people loyal to a word processor, say.
I think it would be dead handy, and no-one I know is doing it.
Choice of masters is not freedom.
The real story is why doesn't Linux have a clipboard standard with well-defined interop standards ala OLE/COM?
I can copy text from VS and paste it into Word, in which case it pastes as RTF with colors and formatting. If I paste it into notepad, I get plain text. This is because the clipboard understands high-level text (RTF) and casting that down into standard text. It also allows apps to provide multiple data formats; copying an image can put a JPG, Bitmap, and PNG on the clipboard and the consuming app can select the format it likes best.
Even better would be to support Office-style multiboard functionality where there are 10-12 "slots" on the clipboard and you can cut and paste from each slot at will.
(Ex: in VS, CTRL+SHIFT+V will cycle through each of the last X copied items for pasting, meaning you can go to one spot of code and copy, then another and copy, then open a different source file and copy a block, then paste all three together somewhere else very easily.)
Natural != (nontoxic || beneficial)
Not just the X clipboard, the whole ball of wax.
I understand X's seperate buffers. I understand in one app it may be Ctrl-C to get the clipboard buffer, in another it may be Alt (oh excuse me, Meta) Q. Who knows.
I also know that most apps have their own redundant application-level cut/copy/paste. In pico/pine/nano its Ctrl-K for cut, and Ctrl-U for un-cut. I know if I want to cut and paste within a single text file I can use C-k and C-u to move lines. If I want to move text from xterm A to OOo document B it's something different entirely.
I know the unix labs at my school had cheatsheets the size of movie posters on every machine to remind casual users how to copy a block of text, and other trivial tasks. I also know they were perpetually empty, and the Windows and Mac labs perpetually full.
I also know it's annoying and makes even the most airbrushed linux gui behave like an unprofessional piece of crap.
You may enjoy memerizing key bindings for umpteen million different apps, but I don't and neither does the majority of the unix desktop's potential market.
I don't need no instructions to know how to rock!!!!
X should provide a selection mechanism for user interface customization, and then pass that on to every application. If there was a common cut and paste mechanism then this would be even better. Apps could still reserve a buffer for themselves. There is more than one answer to most interface decisions and this will continue, there is no use in insisting that the current behavior is "right" and everyone better learn it. What is needed is that the user be able to select an interface model at the top level and that it be honored by all apps running under that level. The reason I adopted Linux is to able to fix interface problems and not be stuck with the choices that someone else made.
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 ?
I agree with you. Nearly every time someone posts an honest criticism of Linux usability or compares an open source app to a commercial app, someone responds similarly. Comments like yours are generally modded down as overrated, troll, or flamebait.
In this case, it's ludicrous to argue that the middle-click is better because "it's always been done that way." If users find it easier to CTRL-C/V, then it should be done that way instead.
If Linux makes an improvement upon some usability issue, people will gravitate toward it. If it's harder to use, they will stay away (unless something else attracts them).
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...
The society for a thought-free internet welcomes you.
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.
While true, I found a rather interesting "workaround" when I explained to my mother how to use her new Linux desktop (disclaimer: she asked me to move her to Linux, and after several weeks of me asking her "why do you want to learn something new?" and setting an expectation for what she'd find on Linux, I finally moved her to Red Hat Linux. Also, I have run Linux 100% as my desktop since 1998.)
The "workaround" was to explain that Linux has two different kinds of clipboards, and it would work differently for her under Linux than the clipboard worked under Windows. I explained it like this:
Yes, I know this is not technically the correct explanation. But when trying to explain how the copy/paste thing works to a non-Linux user, I found this simplification made it easy for her to understand. And it set the right expectation - she never asks about why copy/paste acts the way it does. My mother (not a technical user) had the expectation set for her that Linux was not Windows, so copy/paste wouldn't work just like Windows. The concept of "local" vs "global" clipboards was different, but then again she was on a different operating system. It didn't take her any time to get used to this - she understood right from the start when to use middle-click and when to use copy/paste.
Interestingly, I was in the next room when I heard her explain this to one of her (also non-technical) friends. She said something like "...and that's why you can do copy/paste from the file manager, but you can't just middle-click the file there." I smiled, since it was technically not copy/paste in Nautilus, but I thought it was neat that the simplified concept of "local" vs "global" clipboards seemed to work so well for her.
I suppose I'll go to hell for telling a white lie about how it really works. :-)
This is a common mistake. In reality:
/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.
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 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,
I want my Cowboyneal
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.
THIS THING CAN TURN ON A DIME, MACROSSZERO STYLE ALSO FUCK BETA, ~NYORON
I'm not sure why people think of highlight-and-middle-click as pasting. It's more like a drag-and-drop operation except that you don't have to keep the left mouse button down during the drag and you can rearrange windows before you drop. Apart from that, all the behavior is exactly identical to drag-and-drop.
Control-C and Control-V are copy and paste (and use the CLIPBOARD). They work just like Windows (or like the Mac clipboard). If an app doesn't work right with these, it's just broken. File a bug on the app.
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.
You know what I hate? Wait, what do you like? I hate that!
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.
Democrat delenda est
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..
As the parent and others have posted, X11 has TWO (well, three but no one uses the third) clipboards. One is highlight/middle-click, and one is Copy/Paste. The proper, documented (see parent and others) behavior is for both to be implemented and for both to operate completely and entirely independently of each other.
In a properly implemented program, you should be able to use it as if there is no Primary Selection feature (highlight/middle-click) and not notice the difference from your usual Windows/Mac Ctrl+C/Ctrl+V habits. If you come across a program that does not do that, and mixes them together, that is not a feature that is a bug. Report it as a bug. If the developer dismisses it, report it as a bug again, email the developer telling him that you're going elsewhere, and switch to any of the plethora of other programs around (Free Software is great like that) that do things properly. Eventually someone will get the message.
That's one reason why I stick to KDE applications whenever possible. All KDE applications (ie, ones provided by the KDE.org team) are well-behaved and non-buggy in this respect. Programs that misbehave should simply not be used. Period.
--GrouchoMarx
Card-carrying member of the EFF, FSF, and ACLU. Are you?
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.
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.
I've read through the comments, and everyone seems to think the auto-copy is a bad thing. I'm sure after you've been stung by it that it is.
:) So, I'm often found highlighting something (especially on web pages) and closing the window only to discover that I never actually hit CTRL-C.
I'm in the windows world, and I have the opposite problem. TeraTerm (my emulator of choice) has copied this 'auto-copy' concept. So, if I want to copy something from in the terminal window, I just highlight it and quickly go on my way.
However, nothing else does.
I kept thinking that I'd like every program to do that for me...but I think what I really need to for TeraTerm to stop...so I get out of the habit.
--Welcome to the Realm of the Hawke--
Well, I am bit tired of these "my mother" tests. There was also an aunt Tillie test, which was about the same. Both are actually completely irrelevant.
Why everybody encountering something that behaves differently than he/she expects starts complaining and claims that "it is the reason why Linux has an insignificant market share" ? Personally, I use Linux, Windows and sometimes Mac. Each is good for something else and they are (surprise!) tools, not a religion.
I am working with Linux most of the time but when I have to use Windows or Mac, I have problems because the things do not work as I am used to. Does it mean, that Windows or Mac will never have significant market share ? Actually, market share has nothing to do with usability but all with marketing, folks. You rarely get something sold or adopted just based on usability.
Back to the "mother test" - what is most important for adoption of Linux (or whichever OS or application) is not that, whether it behaves exactly the same as the thing you used before - if it did, why did you switch in the first place? Because it is "cool" ? I doubt it, that's only what the proverbial 13 year olds care about.
It all comes down to the motivation - is this new app or OS delivering something so new, that I can swallow the inconvenience of learning something different or putting up with something not working the way I was used to or am I just looking for an excuse why not switch ? If the answer is "yes, there is something that I need", then the app will get adoption regardless whether something silly as clipboard works the same as on Windows, Mac or whatever. If such problem deters you from using the application, you probably do not need its functionality enough and you did not need to switch to it in the first place.
An example for people complaining about Linux/Unix users being arrogant here. Disclaimer - the example holds in opposite direction as well, I didn't want to pick on some anti-americanism or some similar bull here.
In the U.S., most cars have A/C and automatic gearbox. Here in Europe, they mostly lack both. If an American comes to Europe and rents a car, discovering this fact, do you think that the clutch pedal will automagically disappear and the gearbox change to automatic just because he was used to have it that way at home ? No, it wont, the driver has to adapt and learn how to drive manually or rent another car. Does it mean, that such cars would not sell, because the manufacturers are arrogant and expecting the users to adapt ? Somehow doesn't compute neither. In the case of the car, it came down to the decision - "Do I need to drive so badly that I can put up with it or am I rather going to walk ?"
To conclude this my little rant, I agree, that the cut/copy-paste behavior on Linux is inconsistent sometimes and that there are applications which are broken and need to be fixed. However, this not Linux specific issue at all and hardly something preventing its adoption :-(
- 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 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.
Am I the only one using the old school cut, copy, paste keyboard sequences?
lick the cancle button (at least thats what our Chinese QA says)
I see a lot of people here badmouthing select and middle-click. Let me RUN to its defense.
The ^C ^V paradigm irritates the crap out of me. I LOVE middle-click paste.
I only have a problem with it when things (like TORA, for instance) don't use it properly.
^C ^V is one of the reasons (along with the crappy foreground window model) that I feel horribly encumbered and inefficient in Windows.
While I understand the urge to select and replace, but if you really want it, add a modifier key like control to your select action, and arrange for that NOT to replace the primary selection.
The fault isn't with middle-button paste, here. It's with forcing a Macintosh-ism onto a nice, clean X paradigm.
Well, no, not really. Here's how it really works.
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.
This is just another instance of a far more generic class of problem with Linux (and no, i don't mean an inability to coordinate developers ).
There is no one authority who can speak out and require that all the myriad little isolated or small development shops adhere to anything resembling a Human Interface Guideline, like Apples (or anyones).
If Linus or someone really came down firmly and consistently on the need to have some common standards (and not just for tcp / http / smtp or whatever), this situation might change. As things stand, though, I'm not going to hold my breath.
And before the flames begin - I love the IDEA of linux. Please! Really! Save me from Windows! I HATE Windows !!!
But I feel like someone on a surgery table about to die while a group of insane surgeons argue about which method to use to cut into me, while some start with a variety of implements without consulting the others, and no consensus being reached.
The problem is that the cure looks far scarier than the disease right now, and you can take that however you want.
And telling me to go out and become a developer isn't an answer, its a fricking cop-out. This isn't something you fix with a widget, its something you fix by acting like you care, and have a professional attitude.
There are linux conferences, linux journals, linux companies, linux-oriented scholars/scientists.
So, why not take all that and add the last ingredient needed to make linux development a profession? (i.e. professional conduct and attitude regarding the product ).
Hell, no one has to even starting thinking in human interface terms. No need to learn presentation skills or interface design!
APPLE ALREADY DID IT !
Is there anything preventing the linux community from just ADOPTING THE APPLE HIG as the defacto standard??
Besides petty NIH syndrome ? (Not Invented Here )Windows applications support drag-and-drop and copy-and-paste simultaneously. Does that confuse you, too? Does it bother you that you can't drag-and-drop something while also deleting the destination?
Well, X11's selection mechanisms doesn't, as you put it, perform an "automatic copy", it is actually separate from the copy-and-paste system, just like drag-and-drop is separate from copy-and-paste on Windows. X11's selection mechanism is a drag-and-drop operation, only that you can let go of the mouse button between selecting what you are going to drag and dropping it in the destination. It's actually significantly more convenient than drag-and-drop and significantly easier to handle. To make drag-and-drop work as well as X11's selection mechanism, you need to add weird hacks like "spring loaded containers".
Well-behaved X11 applications should implement both X11's selection mechanism and copy-and-paste. To convert between selections and clipboards, you can use any working X11 applications that can hold the datatype you are interested in converting, like an X11 text editor or the xclipboard application.
If you use mozilla/firefox, another nice tip is to use the plug-in diggler, 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.
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.
First 2 shell scripts:
.bbkeysrc:
$ 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
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.
"It is better to die on one's feet than to live on one's knees." - Albert Camus
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
Have you tried turning it off and on again?
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.
I have my F5 key defined to this:
xclip -o | xargs -iMYCLIP firefox \
-remote "openURL(MYCLIP,new-window)"
Pops up a new window with the selected URL. If you select a whole bunch of URLs, it opens them all in different windows.
If there is one thing I have to explain to every person who attempts to use one of my linux machines, it is how to copy and paste. Unfortunately, this is something that has never really worked in a uniform manner for as long as I've been using linux. Some applications won't let you highlight. Some applications will allow you to highlight, but contain no context menu that allows you to copy. Some applications will permit CTRL-C, but not a context menu. Yet other applications, if you are really clever and continue to HOLD your highlighted text with your left mouse button still depressed, you can do a quick CTRL-C with the other hand. But be careful about closing that application you just had open when you highlighted and copied that text. You might have just lost your "clipboard" contents if you did close it... Then there is pasting. The whole gamut of problems which plague copying also apply to pasting. Some applications simply don't know how to accept pasted information. Others will allow you to paste, but you have to figure out their preferred method -- CTRL-V OR right-click, or perhaps they only let you do it from the "edit" menu.
:-) Anyone have any real solutions to this problem? Solutions that ALL applications can agree on? Probably not, else we would have one by now...
In all the time I've been using linux applications, this problem has existed. It has gotten better with time, as more standard toolkits are used to develop applications, but the underlying problem is still there and is an absolute CERTAIN stumbling block for new users. They ALWAYS have trouble with the clipboard and quite frankly, don't have the patience many times to try and work around it.
And just to stoke the flames a bit, the clipboard ALWAYS works in Windows and it ALWAYS works exactly the same way and it isn't dependent on any single application being open to store the clipboard data. Such simple things that Windows users do all day every day, such as copying the contents of a word document into notepad to kill all formatting, then copying it back into say a web editor is a task that is typically awkward to attempt in linux applications. And the damn clipboard has worked perfectly in Windows since Windows '95.
WHY can't the clipboard problem be fixed? Why hasn't the clipboard problem been fixed by now? Good grief, I know I am not the only person who has this problem on an HOURLY basis when trying to get ACTUAL work done. There needs to be ONE clipboard mechanism that is useable UNIVERSALLY by all applications. It is such an important thing to get right because it affects so much. And the old highlight it and it is copied crap is just that. It needs to die. That is too much to assume about the user's intention in making a highlight.
Ok, that feels better to get that off my chest.
Russian Russian Russian RussianDollSig DollSig DollSig DollSig
This goes in the spirit of not having hard limits, which is generally a good programming philosophy.
Generally, there are only 3 cases: 0 items, meaning a restriction, 1 item, like the normal clipboard, or an infinite (until memory runs out) number of items. This is a good philosophy to work by, unless you have a standard (which you assume won't get broken). People making fixed size buffers are what get people into buffer-overflow attack problems.
-Leo
Cmd-L works in Safari too (as you might expect, since it and Konqueror are practically identical at times).
"This is why men never share their feelings; because women always remember." -Just Shoot Me.
...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 < 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.
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)).
If it's not an URI, Firefox will try to load Google's lucky-hit for that string.