LWN.net Logo

Use clipboard, not cut buffer

Use clipboard, not cut buffer

Posted Aug 14, 2005 17:58 UTC (Sun) by emk (subscriber, #1128)
In reply to: GTK+ 2.8.0 released by zooko
Parent article: GTK+ 2.8.0 released

Gnome correctly supports the standard X Window clipboard, which you access with Control-C, Control-X, and Control-V. This works exactly like the Windows and Mac clipboards.

You're getting into trouble because you're using the Unix selection buffer instead of the clipboard. The selection buffer is a legacy X Window feature typically used for working with xterms. :-) It's very handy, but you'll be much happier if just use the clipboard for modern GUI applications.

Yes, a small number of applications--mostly Emacs and old versions of Netscape--confuse the clipboard and the selection buffer. Either complain to the authors or upgrade. And if you want Control-U to work in GTK, then you probably need to go ask politely on gtk-devel and explain your reasoning.


(Log in to post comments)

Use clipboard, not cut buffer

Posted Aug 14, 2005 18:04 UTC (Sun) by zooko (subscriber, #2589) [Link]

re: "ask politely on gtk-devel".

I'm pretty sure that that would not work. The Gnome people are engaged in a great project that they are very pleased about -- making free software for people who know only Windows. They are explicitly not interested in compromising this project in order to make their software better for people outside of that target audience, such as myself.

The only problem here is that I can't find a working web browser that doesn't use GTK. Were it not for this unfortunate detail, the Gnome folks and I could happily go our separate ways.

Use clipboard, not cut buffer

Posted Aug 15, 2005 0:20 UTC (Mon) by Zarathustra (guest, #26443) [Link]

The next version of Dillo will not use GTK.

They tried to switch from GTK1 to GTK2 and gave up in despair.

I'd be really happy if someone ported Firefox to use Tk; amazing that I would ever say this, but after working with both GTK and Qt I got so sick of it that I'm back developing with Tk... from Python, of course.

Also the wmii developers are planning to write a minimalist X toolkit in C so we can have sane apps to run with a sane window manager, help is appreciated.

Use clipboard, not cut buffer

Posted Aug 15, 2005 2:54 UTC (Mon) by jdub (subscriber, #27) [Link]

Whoa, dude. We are *definitely* not targeting the Windows market. We're primarily targeting the 99.999% of users who are more interested in what they can do with their computer than the intricacies computer itself (ie. not like us). There are plenty of things that GNOME does that are very much *unlike* Windows (look at our dialogue boxes for possibly the most controversial - we have adopted a similar verb-and-muscle driven design much like Mac OS Classic and OS X).

Please don't turn a bad or buggy behaviour into a reason to accuse us of appealing only to Windows users. You've raised some good points regarding default behaviour, and some that are purely preferential. What we'd like to do is make stuff like this Just Work out of the box, no nonsense.

With GNOME 2.12, and the inbuilt clipboard manager, I think we've managed to solve a huge chunk of the ugly behaviour in one fell swoop - no configuration or mucking around required! :-)

Use clipboard, not cut buffer

Posted Aug 15, 2005 3:49 UTC (Mon) by Zarathustra (guest, #26443) [Link]

I don't care who you are targeting with Gnome, because we will both agree that it's not me. I have no problem with that, I don't use Gnome, and I'm happy.

But if GTK is a "cross-platform" toolkit, as others have claimed, then when it runs on a Unix platform, it better behave according to the Unix rules and conventions.

And I say this both as a Unix user that uses applications that happen to use GTK, and as a developer that considers GTK an option for writing cross platform applications.

The GTK developers seem to think that Unix == Gnome, and honestly, Al Viro said it best:

judging by the GNOME codebase the people who designed GNOME are culturally incompatible with UNIX.

Use clipboard, not cut buffer

Posted Aug 15, 2005 4:01 UTC (Mon) by jdub (subscriber, #27) [Link]

Well, let's get beyond the bile and look at what all of this means: Why do you perceive GTK+/GNOME developers to be anti-UNIX, or somehow incapable of writing software that conforms to your definition of UNIX-like? I'd be keen to find out what else defines UNIX-like to you (beyond the usual "small tools that work together" mantra).

(And for the record, aiming our sights at the 99.999% of users who are not like us makes the software better for us as we go - see the dramatic rise in geek use of Mac OS X for evidence enough of this.)

Use clipboard, not cut buffer

Posted Aug 15, 2005 12:37 UTC (Mon) by tgb (guest, #745) [Link]

The problem as I see it is that "legacy" X apps support a certain way of working (ctrl+a, ctrl+e, middle-click-paste etc.). As GTK+ is a cross-platform toolkit, it should support the same keybindings that people on their current platform are used to. X-style cut/paste/keybindings should work under X, in the same way as Ctrl+C should copy text under Windows, in the same way as Command+C does the same under Mac OS.

Any truly-cross-platform toolkit, IMHO, should change to fit in with the way people already work in that specific environment. It should be the toolkit, not the person, changing to fit an environment.

Use clipboard, not cut buffer

Posted Aug 15, 2005 18:15 UTC (Mon) by AJWM (subscriber, #15888) [Link]

The GTK developers seem to think that Unix == Gnome, and honestly, Al Viro said it best:

judging by the GNOME codebase the people who designed GNOME are culturally incompatible with UNIX.

That's hardly surprising. Remember, Gnu's Not Unix, and it shows.

Now, I happen to like some of the extra flags and options that the GNU tools (talking command line here) provide over standard Unix, on the other hand they do tend to take it to ridiculous extremes. And I really don't like that they expect me to use an EMACS-like info-browser to find out what some of those flags and options do, rather than putting that information in the man page where it belongs.

But what can you expect? RMS grew up on a DECSystem, not a Unix box. Nothing wrong with that, it's just different.

Use clipboard, not cut buffer

Posted Aug 15, 2005 14:00 UTC (Mon) by Arker (guest, #14205) [Link]

Whoa, dude. We are *definitely* not targeting the Windows market.

Then why did you (in the plural/generic sense, not the personal one) change all the keybindings in the shift from V1.x to V2.x, from a set that pretty much followed normal *nix conventions to a set that follows Windows conventions instead? This, combined with the utter disregard that's been given to people that ask for *at least the option* to go back to the old bindings consistently, certainly seems to give that impression.

And yes, we know about "emacs" key bindings, but as you'll see even just on a quick read through the comments here, there are a lot of problems with that, and people have gotten some very disdainful responses in trying to get those addressed. Besides which, even if this worked properly, it would still be a bit odd to have to change settings on a *nix system to get GTK to behave like a *nix system, don't you think?

Use clipboard, not cut buffer

Posted Aug 16, 2005 3:01 UTC (Tue) by rqosa (guest, #24136) [Link]

> The only problem here is that I can't find a working web browser that doesn't use GTK.

  • Konqueror
  • w3mmee (actually this uses GTK for displaying images, but it doesn't use GTK keybindings)

Both are useful

Posted Aug 14, 2005 19:08 UTC (Sun) by ikm (subscriber, #493) [Link]

> You're getting into trouble because you're using the Unix selection buffer instead of the clipboard. The selection buffer is a legacy X Window feature typically used for working with xterms. :-) It's very handy, but you'll be much happier if just use the clipboard for modern GUI applications.

The current state where there is both a volatile X selection and a more persistent clipboard is really what is best. People who don't know about the X selection live fine only with the clipboard, all others enjoy both of the worlds, where a save to the clipboard typically overwrites an X selection too, but an X selection doesn't overwrite the clipboard.

So please don't call this a "legacy X window feature". It doesn't became legacy just because there is no such thing in Windows(tm). Futhermore, people will get very grumpy in case the feature gets removed. What is more, I recall some Windows programs now actually feature a special "instant selection to the clipboard" mode. Seems some Windows people got addicted to this too :)

Use clipboard, not cut buffer

Posted Aug 15, 2005 12:24 UTC (Mon) by Arker (guest, #14205) [Link]

It's very handy, but you'll be much happier if just use the clipboard for modern GUI applications.

I doubt very much that he would be, and I certainly wouldn't be. The selection buffer is massively more efficient in a great many cases. When I'm doing work that involves a lot of pasting, the selection buffer plus 'sloppy focus' can make the same task take half the time. That's several hours a day saved, in many cases.

When I noticed Gnome interfering with that, and trying to force me to use my *nix machine like a windows machine, was when I quit using Gnome, quite simply.

Despite the flame-ish tone to some of the above posters comments, I can understand why he's feeling flame-ish, and he makes some very good points. If this is intended to be a cross-platform library, then it should follow the conventions of each platform, rather than trying to impose the Windows Way on users of other platforms. The persistent tendency of the Gnome project to do exactly the opposite has been a huge tactical error in my opinion. And I say this as someone that was a big fan and defender of Gnome in the early days. But it seems like every release has been less and less usable to me. The constant non-verbal message seemed to be "forget about using your machine they way you want to, learn to use it the way we want you to, or go away." So I went away. I think a lot of other people have too. And I don't see any likelihood of a huge exodus of windows users to *nix systems anytime soon to make up for that. Plus, even if there was, I'd like to think that a GNU Desktop system would offer them a better way of doing things, not just the same buggy and poorly-designed interface they're already used to.

Copyright © 2008, Eklektix, Inc.
Comments and public postings are copyrighted by their creators.
Linux is a registered trademark of Linus Torvalds