Copy-paste oddity

Discussions related to using VirtualBox on Mac OS X hosts.
Post Reply
jernst
Posts: 32
Joined: 20. Sep 2013, 19:31
Primary OS: Other
VBox Version: OSE other
Guest OSses: Arch. UBOS.

Copy-paste oddity

Post by jernst »

Running Arch Linux / KDE on VirtualBox on macOS. Clipboard set to bidirectional:

* Copy-paste from Mac to Linux works fine.
* Copy-paste from Linux to Mac works only sometimes. It works reliably when copying from a text editor (Geany). It does not paste anything from many other apps, such as the terminal (Konsole). But, if I copy-paste on the Linux side from Konsole into Geany, and then re-select in Geany and copy paste from there, it arrives on the Mac.

Looking at the clipboard content with xclip does not show any difference between those two scenarios, at least that I can tell.

So, an oddity that sounds like a bug?
socratis
Site Moderator
Posts: 27329
Joined: 22. Oct 2010, 11:03
Primary OS: Mac OS X other
VBox Version: PUEL
Guest OSses: Win(*>98), Linux*, OSX>10.5
Location: Greece

Re: Copy-paste oddity

Post by socratis »

The Shared Clipboard only supports simple text, it's very limited. And as you see it does fine with Geany. Now, I don't know what format the Konsole puts the contents in the clipboard, but it looks like it's not simple (enough) text. Maybe it's a different UTF formatting, maybe it has a BOM or not? I don't know enough...
Do NOT send me Personal Messages (PMs) for troubleshooting, they are simply deleted.
Do NOT reply with the "QUOTE" button, please use the "POST REPLY", at the bottom of the form.
If you obfuscate any information requested, I will obfuscate my response. These are virtual UUIDs, not real ones.
clouddev
Posts: 14
Joined: 2. Sep 2018, 06:38

Re: Copy-paste oddity

Post by clouddev »

Just as another data point - I have two Linux VMs at different KDE levels with different add-on versions. Copy behavior is as follows:

Copy from Konsole to Mac (Mojave) works on:

Code: Select all

$ konsole -v
Qt: 4.8.6
KDE Development Platform: 4.13.3
Konsole: 2.13.2
Guest additions: 5.0.40
VBox: 6.0.4
Copy from Konsole does not work on the newer VM: (Works from other apps e.g. emacs..)

Code: Select all

$ kdeinit5 --version
Qt: 5.11.1
KDE: 5.50.0
$ konsole -v
konsole 18.04.3
Guest additions 6.0.4
VBox: 6.0.4
socratis
Site Moderator
Posts: 27329
Joined: 22. Oct 2010, 11:03
Primary OS: Mac OS X other
VBox Version: PUEL
Guest OSses: Win(*>98), Linux*, OSX>10.5
Location: Greece

Re: Copy-paste oddity

Post by socratis »

I don't usually quote other messages verbatim, but I'm going to quote an older post hoping that this time it will get more attention, especially from Linux users:
Is there any tool in Linux that allows you to see the contents and kind of the clipboard? I know there's a couple for Windows (Free Clipboard Viewer, ClipView, InsideClipboard) and one for OSX (ClipboardViewer, Apple source code), but I don't know what's available for Solaris or Linux hosts, something like an X11 clipboard viewer.

If you know of such a tool, please post it here, so that we can examine the clipboard contents. I've heard that "xclip" might do the job...
This was from the thread "Strange clipboard share in VirtualBox 6 (#18285)". You should also read the threads:
Do NOT send me Personal Messages (PMs) for troubleshooting, they are simply deleted.
Do NOT reply with the "QUOTE" button, please use the "POST REPLY", at the bottom of the form.
If you obfuscate any information requested, I will obfuscate my response. These are virtual UUIDs, not real ones.
clouddev
Posts: 14
Joined: 2. Sep 2018, 06:38

Re: Copy-paste oddity

Post by clouddev »

This worked for me in Konsole (KDE5/Fedora29). Go to Settings->Edit Current Profile->Mouse tab and un-select "Copy text as HTML". Now I can copy from Konsole to Mac.
socratis
Site Moderator
Posts: 27329
Joined: 22. Oct 2010, 11:03
Primary OS: Mac OS X other
VBox Version: PUEL
Guest OSses: Win(*>98), Linux*, OSX>10.5
Location: Greece

Re: Copy-paste oddity

Post by socratis »

Wait a minute... Konsole has a "copy as HTML" option? What on earth would you copy as HTML? The bold text? :shock:

For the love of bytes!!! :roll:
Do NOT send me Personal Messages (PMs) for troubleshooting, they are simply deleted.
Do NOT reply with the "QUOTE" button, please use the "POST REPLY", at the bottom of the form.
If you obfuscate any information requested, I will obfuscate my response. These are virtual UUIDs, not real ones.
clouddev
Posts: 14
Joined: 2. Sep 2018, 06:38

Re: Copy-paste oddity

Post by clouddev »

Bold text, colors, etc. Not sure when you'd really need this. Probably shouldn't be the KDE default in my opinion.
socratis
Site Moderator
Posts: 27329
Joined: 22. Oct 2010, 11:03
Primary OS: Mac OS X other
VBox Version: PUEL
Guest OSses: Win(*>98), Linux*, OSX>10.5
Location: Greece

Re: Copy-paste oddity

Post by socratis »

No kidding! I would never have thought to look into the options of a Terminal to see something like that. What's next? Gedit copying as HTML? "/etc/hosts" having colors? :D
Do NOT send me Personal Messages (PMs) for troubleshooting, they are simply deleted.
Do NOT reply with the "QUOTE" button, please use the "POST REPLY", at the bottom of the form.
If you obfuscate any information requested, I will obfuscate my response. These are virtual UUIDs, not real ones.
jernst
Posts: 32
Joined: 20. Sep 2013, 19:31
Primary OS: Other
VBox Version: OSE other
Guest OSses: Arch. UBOS.

Re: Copy-paste oddity

Post by jernst »

If memory serves, this used to work better. I understand the difficulties of matching non-plain-text clipboard implementations, although it did not look to me like that was the issuem, as I checked with xclip.

Would still be nice if it worked in more cases out of the virtual box :-)
Post Reply