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 :-).
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!
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!!!!
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.
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!
Linux is not Windows. Stop trying to make it as such.
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
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
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.
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...
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
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
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/
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.
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.
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!!!!
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.
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!
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?
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 )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.
Nope, I preffer those too. Probably just inertia. I have noticed that some new apps don't support them though.
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.