Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Why is copy-paste broken? I never had issues.

I don't have issues anymore with printing and networking. I understand that this stuff is per vendor so I usually do my research before buying (I have thinkpads, and my printers are all pretty friendly). I do see many windows computer fall over when printers connect to new wireless networks, though.

As for mp3, flash, isn't is as simple as enabling a non-free repository and let it do its thing? If you use Ubuntu the option to enable that is right at the installer. I've never had the issue since I switched to Linux full time (11.04)



In X, you have N selections referenced by atom. Two atoms (PRIMARY and CLIPBOARD) are sometimes used interchangeably by various software, leading to all sorts of shenanigans where for example selecting then middle clicking pastes something that was "Ctrl+Ced" elsewhere or vice versa.

Additionally, X selections aren't buffers - they're handles used asynchronously. So, when you paste, if the source application is dead or has mis-handled its state internally, you don't get what you expect.

These behaviors are patched over by clipboard managers which manage PRIMARY and CLIPBOARD interactions and which immediately copy the selection into a buffer to make it long-lived. However, each desktop environment's clipboard manager has gradually expanded to include all kinds of strange environment-specific metadata possibilities (to enable, i.e. "Paste Special" options from a spreadsheet).


This has some nice little side effects, like I can use the highlight -> middle-click action to get around JS in the browser that is triggered on copying text.

Not that I'm a fan of the situation, Keepass2/Mono break my routine everyday.


> Why is copy-paste broken? I never had issues.

Different programs use different conventions. For example, shift+insert does not do the same thing in say, xterm and firefox.


Interesting. I only noticed now that shift-insert in Firefox doesn't use PRIMARY but CLIPBOARD. I'm so used to middle mouse button paste that I never noticed. This is probably due to Firefox not using a native graphical toolkit.


Don't they use Gtk2 & Cairo?


Chromium is slow to deliver the clipboard too (just containing text), so you press ctrl+v and wait for several seconds.

Chromium and some others take the clipboard with them when the app is Quit, suddenly the clipboad is cleared.


Really? I use chromium on the odd occasion and never have to wait.. nor have I ever noticed the clearing of clipboard..


Depends on the programs you use, and whether or not you're running a full DE or a bare WM. Most programs use Ctrl+X/C/V, Shift+Delete/Shift+Insert/Control+Insert, and/or highlight/middle-click in various unpredictable combinations.

I've found this to be less of a problem in modern desktop environments (especially KDE, in my experience), since most DEs nowadays feature their own clipboard/buffer management.


Huh. Interesting. I only ever use C-x C-c C-v, and then C-Shift-c C-shift-v in my terminal emulator so I never notice these issues.


For me even that's annoying enough. On a mac it's consistently command-x command-c command-v everywhere, whereas in Linux I have to think "oh, I'm in a terminal now, use shift", and if you get it wrong things screw up (e.g. C-shift-v opens the inspector in Firefox if memory serves).


Same here - I didn't know that Linux copy-paste still had problems, but that could be just because of how we're using it.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: