Shared clipboard not working with Linux guest
-
- Posts: 12
- Joined: 24. Jan 2012, 19:16
- Primary OS: Mac OS X other
- VBox Version: PUEL
- Guest OSses: Ubuntu, RHEL/Oracle/CentOS
Shared clipboard not working with Linux guest
I know this has come up in the past, but the shared clipboard is not working on my Mac; neither drag-n-drop nor copy-and-paste works. As far as I can tell, everything has been setup right, but please look over the info below and let me know if something is missing.
Host system:
Hardware model: MacBook Air 2017
Operating system: macOS 11.5.2
VirtualBox:
Version: 6.1.26
GA version: 6.1.26
VM Guest:
Operating System: Oracle Linux 8.4 (with UEK)
Shared Clipboard: Bidirectional
Drag'n'Drop: Bidirectional
I've also attached the current log file (attempts to use the shared clipboard should be toward the end of the log), and a few screenshots backing up the information I provided above.
If this is a bug, I'll be happy to report it, or if someone has someone troubleshooting ideas, I'll be happy to give those a shot.
Thank you!
Host system:
Hardware model: MacBook Air 2017
Operating system: macOS 11.5.2
VirtualBox:
Version: 6.1.26
GA version: 6.1.26
VM Guest:
Operating System: Oracle Linux 8.4 (with UEK)
Shared Clipboard: Bidirectional
Drag'n'Drop: Bidirectional
I've also attached the current log file (attempts to use the shared clipboard should be toward the end of the log), and a few screenshots backing up the information I provided above.
If this is a bug, I'll be happy to report it, or if someone has someone troubleshooting ideas, I'll be happy to give those a shot.
Thank you!
- Attachments
-
- Oracle Linux 8-2021-08-27-15-02-27.log
- (119.04 KiB) Downloaded 14 times
-
- GA Installed.png (38.63 KiB) Viewed 11242 times
-
- Clipboard settings.png (60.61 KiB) Viewed 11245 times
-
- Volunteer
- Posts: 5677
- Joined: 14. Feb 2019, 03:06
- Primary OS: Mac OS X other
- VBox Version: PUEL
- Guest OSses: Linux, Windows 10, ...
- Location: Germany
Re: Shared clipboard not working with Linux guest
In the Oracle%20Linux%208-2021-08-27-15-02-27.log file, I didn't see any indication of Shared Clipboard issues. I noticed only two rarely used settings (System > Motherboard > Chipset set to ICH9 instead of PIIX3, and System > Processor > Nested VT-x/AMD-V being enabled), which I wouldn't expect to have influence on the Shared Clipboard, though.
In the Linux guest, you could try the following commands for additional logging:
In the Linux guest, you could try the following commands for additional logging:
Code: Select all
# Clipboard logging (X11 guest)
sudo pkill -fx "/usr/bin/VBoxClient --clipboard"
VBOX_RELEASE_LOG_DEST="file=/tmp/clipboard.log" VBOX_RELEASE_LOG_FLAGS="time tid thread" VBOX_RELEASE_LOG="all.e.l.l2.l3.f" VBoxClient -d --clipboard
-
- Posts: 12
- Joined: 24. Jan 2012, 19:16
- Primary OS: Mac OS X other
- VBox Version: PUEL
- Guest OSses: Ubuntu, RHEL/Oracle/CentOS
Re: Shared clipboard not working with Linux guest
fth0 -
Thanks for looking at that. I used the commands you provided, but I'm not sure it did what it was supposed to. clipboard.log was not created in /tmp, and I noticed that when I run VBoxClient at the end,I get a message saying "Worker loop running" and the command prompt does not return. I presume that VBoxClient is a daemon and does not return to the prompt, but I've put it in here just in case.
I have attached the latest log file, also just in case it proves useful.
Thanks for looking at that. I used the commands you provided, but I'm not sure it did what it was supposed to. clipboard.log was not created in /tmp, and I noticed that when I run VBoxClient at the end,I get a message saying "Worker loop running" and the command prompt does not return. I presume that VBoxClient is a daemon and does not return to the prompt, but I've put it in here just in case.
I have attached the latest log file, also just in case it proves useful.
- Attachments
-
- Oracle Linux 8-2021-08-30-13-31-18.log.zip
- (40.89 KiB) Downloaded 15 times
-
- Volunteer
- Posts: 5677
- Joined: 14. Feb 2019, 03:06
- Primary OS: Mac OS X other
- VBox Version: PUEL
- Guest OSses: Linux, Windows 10, ...
- Location: Germany
Re: Shared clipboard not working with Linux guest
You're right.le_jawa wrote:I used the commands you provided, but I'm not sure it did what it was supposed to.
"-d" is equivalent to "--nodaemon" (counterintuitive to me). In consequence, with "-d" the log messages are printed to the shell, and without "-d" they are printed to the given log file. Other than that, it works for me as expected, and log messages are printed for copy and paste operations.
-
- Posts: 12
- Joined: 24. Jan 2012, 19:16
- Primary OS: Mac OS X other
- VBox Version: PUEL
- Guest OSses: Ubuntu, RHEL/Oracle/CentOS
Re: Shared clipboard not working with Linux guest
fth0-
Tried that, no log file is being generated; I even killed and restarted the draganddrop client daemon, and that had no effect. Come to think of it, when I was running it in the foreground, I never saw any messages going to the terminal either
To be certain that I communicated the problem clearly... Neither drag 'n' drop nor copy 'n' paste from the guest to the host works at all (or the other way, for that matter). When I try to drag from the guest to the host, the file icon goes the edge of the VM screen and stops there. If I go the other way around, I see the Mac icon for the file go over the VM screen, but it doesn't drop there; it just cancels. If I try to copy and paste from the guest to the host, nothing is ever on my Mac clipboard.
So... any other thoughts?
Tried that, no log file is being generated; I even killed and restarted the draganddrop client daemon, and that had no effect. Come to think of it, when I was running it in the foreground, I never saw any messages going to the terminal either
To be certain that I communicated the problem clearly... Neither drag 'n' drop nor copy 'n' paste from the guest to the host works at all (or the other way, for that matter). When I try to drag from the guest to the host, the file icon goes the edge of the VM screen and stops there. If I go the other way around, I see the Mac icon for the file go over the VM screen, but it doesn't drop there; it just cancels. If I try to copy and paste from the guest to the host, nothing is ever on my Mac clipboard.
So... any other thoughts?
-
- Volunteer
- Posts: 5677
- Joined: 14. Feb 2019, 03:06
- Primary OS: Mac OS X other
- VBox Version: PUEL
- Guest OSses: Linux, Windows 10, ...
- Location: Germany
Re: Shared clipboard not working with Linux guest
When running the command in the foreground (with "-d"), you saw at least the "Worker loop running" message. When running daemonized (without "-d"), did you write the whole command VBOX_RELEASE_LOG_DEST="file=/tmp/clipboard.log" VBOX_RELEASE_LOG_FLAGS="time tid thread" VBOX_RELEASE_LOG="all.e.l.l2.l3.f" VBoxClient --clipboard in a single line? I'm asking because I just noticed that this forum software can create the impression that the command spans multiple lines.
But it doesn't really matter: Simply run the command in the foreground (with "-d").
Does macOS perhaps require any special security permissions to let VirtualBox access the macOS clipboard?
But it doesn't really matter: Simply run the command in the foreground (with "-d").
Does macOS perhaps require any special security permissions to let VirtualBox access the macOS clipboard?
-
- Volunteer
- Posts: 703
- Joined: 3. Mar 2015, 07:27
- Primary OS: Mac OS X other
- VBox Version: OSE other
- Guest OSses: Linux, macOS, Windows
Re: Shared clipboard not working with Linux guest
I just tested with
Host
macOS 11.5.2
VirtualBox 6.1.26 r145957
Security & Privacy: Full disk access for VirtualBox
VM
Linux debian bullseye debian-64bit
8192MB RAM
Shared Clipboard: Bidirectional
Drag'n'Drop: Bidirectional
3 vCPU
KDE windowing environment
It all worked as expected, being able to D&D both text and images. I have never used the Oracle Linux VM but debian bullseye definitely is working.
Host
macOS 11.5.2
VirtualBox 6.1.26 r145957
Security & Privacy: Full disk access for VirtualBox
VM
Linux debian bullseye debian-64bit
8192MB RAM
Shared Clipboard: Bidirectional
Drag'n'Drop: Bidirectional
3 vCPU
KDE windowing environment
It all worked as expected, being able to D&D both text and images. I have never used the Oracle Linux VM but debian bullseye definitely is working.
-
- Posts: 12
- Joined: 24. Jan 2012, 19:16
- Primary OS: Mac OS X other
- VBox Version: PUEL
- Guest OSses: Ubuntu, RHEL/Oracle/CentOS
Re: Shared clipboard not working with Linux guest
Hmmmm... The main difference between my setup and yours is the distro. I'll have to throw Ubuntu or Debian on and see if that makes any difference.
-
- Posts: 12
- Joined: 24. Jan 2012, 19:16
- Primary OS: Mac OS X other
- VBox Version: PUEL
- Guest OSses: Ubuntu, RHEL/Oracle/CentOS
Re: Shared clipboard not working with Linux guest
Variable setting: I had done that on separate lines previously, so I tried them all together, with no effect. Since it is just setting variables, I can't imagine putting them on 1 line or 3 would make a difference. (But I don't know it all, especially where VB is concerned )fth0 wrote:When running the command in the foreground (with "-d"), you saw at least the "Worker loop running" message. When running daemonized (without "-d"), did you write the whole command VBOX_RELEASE_LOG_DEST="file=/tmp/clipboard.log" VBOX_RELEASE_LOG_FLAGS="time tid thread" VBOX_RELEASE_LOG="all.e.l.l2.l3.f" VBoxClient --clipboard in a single line? I'm asking because I just noticed that this forum software can create the impression that the command spans multiple lines.
But it doesn't really matter: Simply run the command in the foreground (with "-d").
Does macOS perhaps require any special security permissions to let VirtualBox access the macOS clipboard?
Clipboard permissions: VB has "Accessibility" and "Input Monitoring"; that should cover everything it needs for clipboard access.
Tried the same thing with drag and drop, got an entirely different result this time (see attachment).
-
- Volunteer
- Posts: 5677
- Joined: 14. Feb 2019, 03:06
- Primary OS: Mac OS X other
- VBox Version: PUEL
- Guest OSses: Linux, Windows 10, ...
- Location: Germany
Re: Shared clipboard not working with Linux guest
In a Linux OS, you can use different shells. In BASH for example, you'd have to use the export command. See Defining a Bash Variable With or Without ‘export’.le_jawa wrote:Since it is just setting variables, I can't imagine putting them on 1 line or 3 would make a difference.
-
- Posts: 12
- Joined: 24. Jan 2012, 19:16
- Primary OS: Mac OS X other
- VBox Version: PUEL
- Guest OSses: Ubuntu, RHEL/Oracle/CentOS
Re: Shared clipboard not working with Linux guest
Grrrrr... I installed Ubuntu and the GA's, and it doesn't work there either. Maybe fth0 was on to something with permissions. I'll take a look at that, but if anyone else has any other thoughts, feel free to share.
-
- Volunteer
- Posts: 5677
- Joined: 14. Feb 2019, 03:06
- Primary OS: Mac OS X other
- VBox Version: PUEL
- Guest OSses: Linux, Windows 10, ...
- Location: Germany
Re: Shared clipboard not working with Linux guest
I re-learned today to ask an easy question first:
VirtualBox only supports the X11 clipboard. Does your Linux guest OS provide an X11 clipboard?
Background information: The Wayland clipboard and the X11 clipboard are two different things, and VirtualBox only supports the X11 clipboard. Wayland installations can provide an X11 clipboard, but it depends on their configuration. Look for components like KWayland or XWayland, and investigate if your guest OS has a running X11 clipboard (and not "only" a running Wayland clipboard).
VirtualBox only supports the X11 clipboard. Does your Linux guest OS provide an X11 clipboard?
Background information: The Wayland clipboard and the X11 clipboard are two different things, and VirtualBox only supports the X11 clipboard. Wayland installations can provide an X11 clipboard, but it depends on their configuration. Look for components like KWayland or XWayland, and investigate if your guest OS has a running X11 clipboard (and not "only" a running Wayland clipboard).
-
- Posts: 12
- Joined: 24. Jan 2012, 19:16
- Primary OS: Mac OS X other
- VBox Version: PUEL
- Guest OSses: Ubuntu, RHEL/Oracle/CentOS
Re: Shared clipboard not working with Linux guest
Aw dang, I didn't even know that Wayland had a different clipboard. It sounds like you probably just hit the nail on the head.
Thanks for bringing that up; I'll have to go educate myself a little bit and see what I can do.
Thanks for bringing that up; I'll have to go educate myself a little bit and see what I can do.
-
- Posts: 12
- Joined: 24. Jan 2012, 19:16
- Primary OS: Mac OS X other
- VBox Version: PUEL
- Guest OSses: Ubuntu, RHEL/Oracle/CentOS
Re: Shared clipboard not working with Linux guest
I've been digging around for info on this for about 3 hours now, and I can't anything definitive regarding an X-server and support for VirtualBox. Here's what (I think) I know at this point:
If anyone can offer advice on Wayland and VirtualBox, I'd really appreciate it.
- There are a couple of packages that add X functionality/compatibility to Wayland: XWayland and mutter.
- There's nothing definitive on either of these and VirtualBox
- The only solid, direct suggestion I can see is to move back to X11 instead of Wayland
If anyone can offer advice on Wayland and VirtualBox, I'd really appreciate it.
-
- Volunteer
- Posts: 5677
- Joined: 14. Feb 2019, 03:06
- Primary OS: Mac OS X other
- VBox Version: PUEL
- Guest OSses: Linux, Windows 10, ...
- Location: Germany
Re: Shared clipboard not working with Linux guest
I'm not sure. For Wayland, you'll have to check at least two things: If XWayland runs an X11 clipboard, and if VBoxClient --clipboard is running. One starting point may be ps -elfH | grep -i clipboard.le_jawa wrote:So is that accurate, that XWayland and mutter don't solve the problem, and X11 is the only solution?