KWin 5.8.4 does not currently implement the Wayland Primary Selection Protocol:
It needs to be implemented for middle-click paste to work on Wayland. At least one other compositor (GNOME's Mutter) already implements that protocol.
This is not yet an upstream standard and not part of Wayland-protocols
I too desire this feature. This doesn't appear to be completely broken, though. I noticed any text I select (regardless of source) will middle-click-paste in Xwayland programs. In other words, I can select text from a Wayland-native program and middle-click-paste in a Xwayland program, but not in another Wayland-native program.
At the very least, I would like it if there was an implementation not backward compatible with Xwayland. Something is better than nothing.
Primary selection copy/pasting isn't working neither between Wayland-to-Wayland apps nor between XWayland-to-Wayland apps for me in:
Distribution: KDE neon Developer Edition Unstable Branches
KDE Plasma Version: 5.10.90
KDE Frameworks Version: 5.37.0
Qt Version: 5.9.1
Kernel Version: 4.10.0-32-generic
I get the feeling that if KDE won't push forward on upstreaming this then nobody will. GNOME seems quite happy using it as a nonstandard protocol.
The protocol is available at https://git.gnome.org/browse/mutter/tree/src/wayland/protocol/gtk-primary-selection.xml
It seems that main kwin developper is against this feature: In https://blog.martin-graesslin.com/blog/2016/07/synchronizing-the-x11-and-wayland-clipboard/ comments he says:
"Doesn’t address the useability problems I see with the primary selection. Also does not even address the security issues [...] has it never happened to you that you copied from the wrong clipboard? You selected something and then pasted with ctrl+v? That’s part of the usability problem. Another problem is that it only works for text and you never know whether it worked or not. You will know once you paste. Not before."
So, for now I would not hold my breath, even though I agree with #4.
Primary selection copy/paste is a feature that I heavily rely on. I would be delighted if it could be implemented.
I cannot understand the usability issues Martin Graesslin sees in the X11 behavior. I also do not see any discoverability issues - like with console keyboard shortcuts (CTRL-k, CTRL-w etc.) you either know about them or you do not. I do that think that this is a valid reason to not implement such functionality.
I tried KDE on Wayland only today (OpenSUSE Tumbleweed) and even though there were some seemingly more severe problems (like the whole GUI turning black and completely freezing when I tried to change my primary display in my 3-monitor-setup) the missing middle-click copy/paste was the final nail in the coffin that made me go back to KWin/X11.
I might be able to live without it - but I do not want to ;-)
And since for me everything works with KWin/X11 I will avoid Wayland for now.
Just my $0.02...
I agree, it's too useful to give up this feature.
AFAIK nobody wrote a Qt bug about it until now:
Someone's asked about the status on wayland-devel, which seems to be the first discussion of the protocol since the 2016 thread linked in comment 1.
Between this and the the 49.7 day bug in Qt on X11 rendering the clipboard and primary unusable, there's no winning.
I agree with people - I love KDE, and Wayland seems really fast, but I use this feature constantly and I've been trying to use Wayland with multiple Konsole terminals up with multiple sessions - this is painful without the normal copy/paste features. I'm going to have to move back to X11 tomorrow, sadly, because I cannot work well without it.
(In reply to John Apple II from comment #9)
> I agree with people - I love KDE, and Wayland seems really fast, but I use
> this feature constantly and I've been trying to use Wayland with multiple
> Konsole terminals up with multiple sessions - this is painful without the
> normal copy/paste features. I'm going to have to move back to X11 tomorrow,
> sadly, because I cannot work well without it.
Just run Konsole as an X11 window...
...and all other applications. And keep wayland for plasmashell only.
That's not an acceptable answer. That's no different than that classic problem of the iPhone user who was getting poor reception when holding his phone in a certain way and Apple told him "just don't hold it like that".
You're defeating the purpose of running Wayland when you run your Wayland-compatible programs in XWayland. Not only is [plasmashell's] Wayland not stable enough to make that effort worth-while, but you're just adding unnecessary overhead.
That was sarcasm.
erm, I don't want to say anything. But running all apps on XWayland is part of our short term strategy, see: https://blog.martin-graesslin.com/blog/2018/03/unsetting-qt_qpa_platform-environment-variable-by-default/
If you want to use Wayland and at the same time don't miss some features of X11 I think that's a totally possible way. I'm using this combination for years.
Apart from a kmail crash at startup, this is the only thing that will keep me away from Wayland at this time.
This is probably the basic feature that makes my desktop so much more usable than other ones.
Wayland Protocols 1.17 Brings Explicit Synchronization & Primary Selection: https://www.phoronix.com/scan.php?page=news_item&px=Wayland-Protocols-1.17-Released
I just tried out a Wayland session on KDE Neon for the first time today. Everything seems to work well apart from using the middle mouse button to paste.
I don't want to discuss the merits of having 2 separate paste sources like X11 has (clipboard and primary selection) but it seems crazy to me that I can select a word in Konsole using the mouse but have to use the keyboard (Ctrl-Shift-V) to paste what I just selected.
Is there no option to have the middle mouse click perform the same action as pressing Ctrl-Shift-V ? I don't really care if it only uses the one Wayland Clipboard source and ignores the X11 primary selection but not being able to middle button paste is a show stopper for me.
Uh, please don't do that (pasting from the regular clipboard with middle click). If you implement the middle-click paste, please implement it right (with a separate primary selection), anything else would be really confusing and annoying. The primary selection protocol has been adopted by Wayland upstream, all that is needed is implementing it.
The protocol exists now. We will eventually add support for it, but it will take time. At doesn't support it yet, so there's no need to rush.
(In reply to Martin Flöser from comment #19)
> The protocol exists now. We will eventually add support for it, but it will
> take time. At doesn't support it yet, so there's no need to rush.
Qt Not at
Qt 5.14 alpha supports the protocol \o/
(In reply to Martin Flöser from comment #1)
> This is not yet an upstream standard and not part of Wayland-protocols
Now it seems to be: https://github.com/wayland-project/wayland-protocols/blob/master/unstable/primary-selection/primary-selection-unstable-v1.xml
(In reply to udevnull from comment #22)
> (In reply to Martin Flöser from comment #1)
> > This is not yet an upstream standard and not part of Wayland-protocols
> Now it seems to be:
Related QTBUG: https://bugreports.qt.io/browse/QTBUG-66008
Did anyone have a chance to test Qt 5.14 (dev) builds? The question is, if besides support in Qt something else needs to be added/changed in KDE code.
(In reply to Christoph Feck from comment #24)
> Did anyone have a chance to test Qt 5.14 (dev) builds? The question is, if
> besides support in Qt something else needs to be added/changed in KDE code.
We need to implement the protocol in kwayland and add support in KWin.
Is anyone planning on looking at this now that Qt has support? It's basically the only thing stopping me from using Wayland...
This is on our radar and indeed we can take advantage of Qt fixing https://bugreports.qt.io/browse/QTBUG-66008.
We have a benevolent developer that is willing to implement this, when he gets time to work on it but we still have to wait for Qt 5.14 to be released (end of November) and become Plasma dependency.
This won't be the case for Plasma 5.18 as it will be an LTS version based on Qt 5.12 LTS.
You can see our current progress on this at https://phabricator.kde.org/T11601
I subscribed to the Phabricator task. Again, I will not be able to switch from X11 without that feature.
We lack the XWayland bridge for now, follow up at :