Implement proper clipboard in wayland

Bug #865885 reported by pyrates
106
This bug affects 20 people
Affects Status Importance Assigned to Milestone
wayland
Fix Released
Wishlist
wayland (Ubuntu)
Fix Released
Undecided
Unassigned

Bug Description

Well the bug to implement a proper clipboard in xorg has just been set to invalid:

https://bugs.freedesktop.org/show_bug.cgi?id=25220

So since wayland is replacing xorg, might as well implement a proper clipboard. Please do not follow the path xorg did to implement it. Normal users do not want a selection based clipboard. It's confusing for them and if some app wants it, then that app alone can implement it. This way those who need it can get it and the rest of us can go about without worrying that when I highlight something, I haven't just lost what was copied using ctrl+c.

Here's a rant on it:

http://elliotth.blogspot.com/2008/08/desktop-linux-suckage-clipboard.html

And here's a very simple implementation:

1. When copying text, copy it directly to the clipboard so that it is there even if the application is closed.
2. No more selection based copy. If an app wants it, it can implement it. Putty does that on windows and so does mirc. But it shouldn't be forced upon apps if they don't intend to use it.
3. When copying something to the clipboard and it is not text, the app must specify what kind of data it is so that if it can be used in another app if that app says it is compatible with it. Otherwise when that happens, nothing gets pasted if the app says it is not expecting that data type.
4. Wayland will monitor when an application wants to exit that has data in the clipboard that is above a certain size. If it is above a certain size, when that application wants to exit, then it will ask if the user wants to clear the clipboard before the application exits. This way the application developer doesn't have to worry about implementing this, the OS takes care of it.
5. When copying data to the clipboard, it will report what application it came from storing the full path. This way the above can be done.
6. When copying data from the file system, it will be stored in a separate clipboard. It will store the path to the file/directory it is set to copy and not the actual copy as that could get very large.
7. Finally when copying data to the clipboard, it will indicate if the data is to be copied or cut. If cut, then when it is pasted, it will delete the original copy. If it is copied, it will simply paste it to the place you pasted it to from the clipboard.

I think this is a good start. As I said, x and now xorg refused to do this, so may as well put it in wayland.

If not, I'll see this being complained about 30 years down the line with people asking why wasn't this implemented?

Tags: wishlist
pyrates (pyrates18)
description: updated
Revision history for this message
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in wayland (Ubuntu):
status: New → Confirmed
Revision history for this message
robbert (robbertvandendoorn) wrote :

Users of this crappy operating system have been annoyed by this bug since... well, actually since the first release. After all those years they failed (actually "refused") to implement a proper clipboard. I've lost all hopes. I don't think Ubuntu or Linux in general will ever get a proper clipboard. The developers are just stupid and keep on sticking to their old fashioned habits of the early '90s. They don't listen to the users and only want to keep on using Linux the old fashioned way. They don't want a proper clipboard, so a proper clipboard will never be implemented in Ubuntu of Linux in general.

That's exactly the reason why Linux will NEVER get more than 1% of market share. The market share of Linux is at 1% for years now. In all those years its market share didn't grow a single bit. Mac OS X keeps on growing. Why? Because their products just work. People use it and see it just works and they keep on using it and recommend it to family and friends who also keep on using it.

Linux is also recommended by Linux users, but after using it for a few weeks or a few months, everyone realizes it's just crap. Within a few months most users have encountered so many bugs they won't use it anymore. When you first install Ubuntu or any other distribution you think: "Yeah, this is actually quite good." but that feeling doesn't last for long. Within two months you get so annoyed of all those bugs, you just want to throw your computer out of the window.

Linux will never be a mature operating system and it will never get more than 1% market share. At least, not as long as those developers refuse to implement even the most basic features an operating system should contain. Unless they get their head of their asses Linux will stay an amateuristic operating system for ever.

Revision history for this message
papukaija (papukaija) wrote :

To maintain a respectful atmosphere, please follow the code of conduct - http://www.ubuntu.com/community/conduct/ . Bug reports are handled by humans, the majority of whom are volunteers, so please bear this in mind.

Revision history for this message
Philip Muškovac (yofel) wrote :

I'm not usually using windows so I don't know what windows users expect from a clipboard, and I'm not particulary affected by bug 11334 as KDE has a clipboard manager running by default, but I do want to remind people that there are a lot of linux users that _like_ the selection based clipboard behaiour.

Interestingly, Klipper manages to provide a working ctrl-c/v clipboard while still allowing selection based copy and paste. So it shouldn't be impossible to provide both as I do agree that the current situation needs to be improved.

Revision history for this message
pyrates (pyrates18) wrote :

You can include mac users too, not just windows users. They too expect the clipboard to behave this way.

Does the clipboard manager in kde handle anything other then text? I would guess it doesn't. This is why I want this properly implemented.

As for the selection method of those who want it, if the majority of linux users want it, then that means the majority of linux users are technical. And those who want linux to be made for the masses have to realize that a badly designed feature like the selection based clipboard will only confuse them. It's one of the many reasons why I don't use linux as a desktop. Of course the moment I say this, I'm then told that linux isn't for me. If so, who is it for exactly?

Clearly the selection based method was only put in because you couldn't use ctrl+c in a terminal emulator. That's the only reason. And because of that, it shouldn't hold back linux from having a proper clipboard. Now correct me if I'm wrong, but don't applications that don't want the selection based clipboard have to exclude it? I guess that's why firefox doesn't support it. If there users on linux don't want it, how many linux users actually want it? My guess is not that many. Just the ones who do want it are louder then the rest.

Here is my guess on how the clipboard works on mac since it seems it has more then one clipboard:

1. One type for text
2. Another type for audio
3. Another type for video
4. Another type for images
5. Another type for files/directories

If it works this way, then that means you have application interoperability. 2 completely different applications for say editing audio, could copy sound bytes back and forth between each other. I don't see windows doing this.

Revision history for this message
Darxus (darxus) wrote :

I doubt anybody involved in these decisions is reading bugs here.

Wayland bugs are tracked here: https://bugs.freedesktop.org/enter_bug.cgi?product=Wayland

Wayland mailing list: http://lists.freedesktop.org/mailman/listinfo/wayland-devel

And #wayland on irc.freenode.net.

Darxus (darxus)
tags: added: wayland
papukaija (papukaija)
summary: - implement proper clipboard in wayland
+ Implement proper clipboard in wayland
description: updated
tags: added: wishlist
removed: clipboard wayland
Revision history for this message
WhyNotHugo (whynothugo) wrote :

As I have stated on a comment to the linked xorg bug: https://bugs.freedesktop.org/show_bug.cgi?id=25220#c15

There is no negative impact for the selection-based copying for users who don't want it; you might as well use X for years without knowing it's existance and using CLIPBOARD without any issues.

Unless you can actually point out any way in which this interfieres with users who don't want use it, I see no point in requesting that selection-based copying isn't implemented in wayland.

Revision history for this message
In , Pyrates (pyrates) wrote :
Download full text (3.6 KiB)

Please implement a modern clipboard while wayland is still being developed. It's such a shame that linux itself has never had a proper one. Instead work arounds such as clipboard managers, that only handle text, are implemented. Here's how it works with xorg:

1. You copy some text storing the location in memory where that text is
2. You then tell another program to paste that text
3. The program goes back to the xorg clipboard and asks for the text to be pasted
4. The xorg clipboard asks the program that the text is supposed to come from for the text
5. That program then says here is the text
6. The text is then pasted into the new program

Now this process breaks if you close the original program before doing the pasting. Windows and Mac users find this very frustrating! Now the supposed fix is for each program to "check" if there is any data that the clipboard is pointing to. Some have done it, but the vast majority have not because those developers are use to the way windows and mac do it, where it handles it for them and they don't have to worry about it.

Also that selection based clipboard thing has got to go. It's only useful in the terminal because the terminal already was using the ctrl+c, ctrl+v, ctrl+x shortcut commands. So instead of making it system wide, make it on a per application basis when those applications need it. For example on windows, selection based copying works on mirc and putty, because they implemented it for only them to use it. So if another program wants selection based copying, then that program can implement it. Not many programs will I bet.

Now here is how we could redo it:

1. When copying text, copy both the plain text version and the stylized version. Any text pasting program can then specify if they want the stylized version, and if they don't, then they get the plain version. But they still need to specify they want text as the type.
2. Copying audio will identify that it is audio and programs that work with that, will expect that. This way 2 audio programs can interact with each other.
3. Copying video will identify that it is video and programs that work with that, will expect that. This way 2 video programs can interact with each other.
4. Copying files/directories will store the location of where the file/directory is and the name of it. This will identify itself as a file/directory when doing pasting of it. There will be 2 types though, one for a file, and one for a directory. This way if the file manager needs to have a special way to handle a file and another way to handle a directory, it can do that. Same thing if it's a symbolic link, both for soft and hard kinds being each of their own.
5. For any other kinds of data, it will have a unique identifier that wayland has to support. So if we need to add more types of data that the clipboard will support, we can do that.
6. Finally we will be copying the data to the clipboard, not storing a pointer to it. This solves the problem of what happens if you copy the data and then close the program before pasting it that frustrates so many windows and mac users who try out linux.
7. One more thing, when a program quits ...

Read more...

Revision history for this message
pyrates (pyrates18) wrote :

As Hugo's suggestion, here is the bug submitted to wayland:

https://bugs.freedesktop.org/show_bug.cgi?id=52077

I wonder if it will be accepted or not.

Changed in wayland:
importance: Unknown → Wishlist
status: Unknown → Confirmed
Revision history for this message
In , Kristian Hoegsberg (krh-bitplanet) wrote :

Closing this bug - we have a "modern clipboard" in the wayland protocol now. If there's anything specific with the protocol or weston implementation that you think is broken, please file a bug on that issue, thanks.

Changed in wayland:
status: Confirmed → Fix Released
Revision history for this message
pyrates (pyrates18) wrote :

May I get a link to check over the "modern clipboard" specifications? I'd like to see how it works.

Revision history for this message
pyrates (pyrates18) wrote :

And I'd like to just say, woohoo!

Revision history for this message
In , Pyrates (pyrates) wrote :

Can I get the link to the design document on how it is supposed to work? Thank you.

Changed in wayland (Ubuntu):
status: Confirmed → Fix Released
Revision history for this message
Walker Gusmão (walker-praiseweb) wrote :
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.