| Summary: | Klipper copies many unnecessary mime types | ||
|---|---|---|---|
| Product: | [Plasma] plasmashell | Reporter: | pbs3141 |
| Component: | Clipboard widget & pop-up | Assignee: | Plasma Bugs List <plasma-bugs-null> |
| Status: | CONFIRMED --- | ||
| Severity: | normal | CC: | dezzadk, jens.lallensack, kde, nate, noahadvs, qydwhotmail |
| Priority: | NOR | Keywords: | efficiency-and-performance, regression |
| Version First Reported In: | 6.3.4 | ||
| Target Milestone: | 1.0 | ||
| Platform: | Arch Linux | ||
| OS: | Linux | ||
| See Also: | https://bugs.kde.org/show_bug.cgi?id=504470 | ||
| Latest Commit: | Version Fixed/Implemented In: | ||
| Sentry Crash Report: | |||
|
Description
pbs3141
2025-05-18 13:52:35 UTC
Totally agree. For this to have a purpose with xdg-mime, it needs to be AT LEAST assuming: > text/* types as well as their > application/* counterparts > x-ruby > x-shellscript > x-python3 To be actual pasteable, copyable text and NOT just > text/plain Relying on xdg-mime and its returned filetype breaks copying into klipper from almost any applications: https://github.com/tmux-plugins/tmux-yank/pull/189 and to me its pretty clear that this is primarily upstream problem for the most part since it assumes so badly about all special chars. In tmux-yank's case its safe to assume as it factually text copied from terminal. Terrible workaround - which isn't very logic: > Configure > General Configuration > Non-text-selection: Never save in history Actually means 'Do not use xdg-mime' - because it still stores copied files from Dolphin in the clipboard (oddly despite what is documented above). A side-effect is also: > Configure > Action Menu > Show action popup menu: Immediately on selection and a configured shortcut: > Configure > Shortcuts Configuration > plasmashell > Manually Invoke Action on Current Clipboard Will not trigger when a different type is detected (which is totally random based on single special characters and far too uncertain) > Terrible workaround - which isn't very logic:
> > Configure > General Configuration > Non-text-selection: Never save in history
I retract that statement. It worked at the time, now its reversed. I will have to look more into the code.
(In reply to dezzadk from comment #2) > > Terrible workaround - which isn't very logic: > > > Configure > General Configuration > Non-text-selection: Never save in history > I retract that statement. It worked at the time, now its reversed. I will > have to look more into the code. With both settings klipper seems to go into a state where it assumes the next copied text is of the same mime-type is all I can infer from it. Copying from vim with wayland support now randomly works - because it does not send a mime-type with it - exactly same issue as tmux-yank - so klippers functionality of auto-detecting via xdg-mime completely prevents normal clipboard operation. Let me add a third program affected in addition to Inkscape and Libreoffice: LyX. Upon copying an equation, LyX hangs in lyx::cap::copySelection while consuming all available RAM, eventually crashing with a std::bad_alloc. During this time plasmashell is also frozen. I have verified that this behaviour does not happen on GNOME with the same LyX version. We've now had to put in a hack in Inkscape specifically to work around this behaviour: https://gitlab.com/inkscape/inkscape/-/merge_requests/7252. It's still not as good as an upstream fix though, especially for the duplicate requests. Note that when trying to copy larger/multiple shapes in Inkscape, this bug makes Inkscape crash consistently. It already led to data loss on my side. If I disable Klipper before using Inkscape, everything works fine. I'm on Plasma 6.5.1. |