I can confirm that:
- When using a host system running VirtualBox 7.2.10,
- with a fully updated Kicksecure 18 system using the version of Guest Additions already present in Trixie,
- if I boot a Kicksecure 18 VM in
PERSISTENT Mode | USER Session, - then click (on the host)
Devices > Shared Clipboard > Bidirectional, - then open a terminal in the VM and run
VBoxClient --wayland, that I am now able to copy and paste arbitrary text between the host and the guest. Shared clipboard is fixed. I did not need to change anything inEDIT: This didn’t end up being quite true upon further testing, some clipboard sharing is working but other clipboard sharing is still very much broken./etc/modules-load.d.
I grepped for VBoxClient in /etc and discovered that VirtualBox Guest Additions is supposed to do this automatically, in /etc/X11/Xsession.d/98vboxadd-xclient. There is a block in that file that reads:
vbox_wl_check=$(/usr/bin/vboxwl --check 2> /dev/null)
if test "$vbox_wl_check" = "WL"; then
/usr/bin/VBoxClient --wayland || true
else
...
fi
This however isn’t kicking in for a couple of reasons:
- One, it’s in
/etc/X11/Xsession.d. labwc does not execute scripts in this directory. It needs to be added to/usr/share/desktop-config-dist/labwc/autostartor some similar autostart mechanism to be run at all. (Edit: This was reported to Debian already: I Challenge Thee Seems that VirtualBox’s Guest Additions ISO solves this by using /etc/xdg/autostart, which seems like a good solution to me.) - Two, even if you run it, it silently fails, because
/usr/bin/vboxwldoes not exist. I would guess that the VirtualBox Guest Additions package in Debian is building it, but isn’t installing it, since that’s was the case with/usr/bin/VBoxDRMClientsome time back (it’s required for dynamic screen resize to work).
Ideally, we should get that mechanism working rather than making our own service or similar. However, as an immediate workaround, we can document in the Wiki that users can run VBoxClient --wayland in a terminal to get shared clipboard working (assuming that they are running a new enough VirtualBox and have enabled clipboard sharing in VirtualBox).
EDIT: So unfortunately this isn’t the total fix I hoped. I am able to copy and paste between the host and guest, so long as I am copying from and pasting to the terminal window in the VM that I used to launch VBoxClient. I am not able to copy and paste between a separately launched FeatherPad window and the host.
If I install VirtualBox 7.2.10’s Guest Additions in the VM using the Guest Additions ISO provided by the host system, clipboard sharing mostly works. It sometimes takes some “shaking” to get it working (i.e. pasting multiple times, or copying from the host before trying to copy from the guest), but it gets the job done. However, one still has to run VBoxClient --wayland to get things to work, since vboxwl thinks that an X11 session is being used instead of Wayland and reports that to the launcher script. So… yeah. There is finally a workaround, but it is still a mess.
EDIT 2: And the reason vboxwl is reporting X11 is because…
else if (enmType == VBGHDISPLAYSERVERTYPE_XWAYLAND)
{
/* In case of XWayland, X11 version of VBoxClient still can
* work, however with some DEs, such as Plasma on Wayland,
* this will no longer work. Detect such DEs here. */
/* Try to detect Plasma. */
const char *pcszDesktopSession = RTEnvGet(VBGH_ENV_DESKTOP_SESSION);
if ( RT_VALID_PTR(pcszDesktopSession)
&& ( RTStrIStr(pcszDesktopSession, "plasmawayland")
|| RTStrIStr(pcszDesktopSession, "plasma")))
fWayland = true;
}
So apparently if XWayland is present, only KDE Plasma gets treated as Wayland anyway. We need this same kind of treatment though. Sigh…
EDIT 3: Ended up going down a very deep rabbit hole trying to debug this and figure out who to report bugs to. The tl;dr: is that Wayland and even wlroots is fragmented enough that it’s unlikely we will be able to get Oracle to help with fixing the bugs here. labwc has a very specific set of behaviors that combine to make clipboard sharing a total nightmare even with VirtualBox 7.2.10, and VirtualBox also has some behaviors related to detecting what clipboard sharing method to use that are problematic when dealing with the specific combination of LXQt and labwc. Maybe everything could be gotten to work out of the box if both labwc and VirtualBox were changed, but that would require someone with the time to make and file the patches.
There is likely a way to get things to work with some glue code in Kicksecure. I’ll most likely leave an update if we start implementing this.