You are not logged in.

#1 2023-05-16 18:05:02

mathbike
Guest

[SOLVED] VirtualBox: Can't figure out how to enable clipboard

My host is Arch with x11. I'm trying to set up an Arch guest in VirtualBox. I need shared clipboard but I can't figure out how to get it working.

I have:

Read through both of these pages:
https://wiki.archlinux.org/title/VirtualBox
https://wiki.archlinux.org/title/Virtua … as_a_guest

On the host:

- Installed virtualbox package, choose virtualbox-host-modules-arch because I'm using the linux kernel
- Loaded the kernel module with modprobe vboxdrv
- Added my $USER to the vboxusers group
- Installed the Guest Additions package virtualbox-guest-iso
- Installed the Extension Pack package virtualbox-ext-oracle from the AUR

Then I created an Arch virtual machine using archinstall, so I now have a working Arch vm.

On the guest:

- Eject the iso: Storage > Remove disk from virtual drive
- Enable bidirectional clipboard Devices > Shared Clipboard > Bidirectional
- Install headers: linux-headers
- Insert Guest Additions: Devices > Insert guest additions CD image
- Install Guest Additions: ./VBoxLinuxAdditions.run

These are my notes

Host:

# install virtualbox package
sudo pacman -S virtualbox # choose virtualbox-host-modules-arch
# load kernel module
modprobe vboxdrv
# add user to vboxusers group
sudo usermod -aG vboxusers $USER
# install guest additions package
sudo pacman -S virtualbox-guest-iso
# install extension pack package
yay -S virtualbox-ext-oracle

Guest:

# install headers
sudo pacman -S linux-headers
# mount guest additions
mount -t iso9660 /dev/sr0 /mnt
# install guest additions
cd /mnt
sudo ./VBoxLinuxAdditions.run

As far as I can tell everything is done properly, but I guess it probably isn't because it's not working.  I also tried to install virtualbox-guest-utils on the guest, but that didn't work either. If anyone knows how to get this working I'd appreciate the help. Thanks.

Last edited by mathbike (2023-05-19 17:11:42)

#2 2023-05-16 20:42:20

seth
Member
From: Won't reply 2 private help req
Registered: 2012-09-03
Posts: 76,734

Re: [SOLVED] VirtualBox: Can't figure out how to enable clipboard

https://wiki.archlinux.org/title/Virtua … _Additions

The wiki wrote:

The guest additions running on your guest, and the VirtualBox application running on your host must have matching versions, otherwise the guest additions (like shared clipboard) may stop working. If you upgrade your guest (e.g. pacman -Syu), make sure your VirtualBox application on this host is also the latest version.

https://wiki.archlinux.org/title/Virtua … t_services

The wiki wrote:

you need to start the guest services. The guest services are actually just a binary executable called VBoxClient which will interact with your X Window System. VBoxClient manages the following features:

shared clipboard and drag and drop between the host and the guest;

All of these features can be enabled independently with their dedicated flags:

$ VBoxClient --clipboard

Notice that VBoxClient can only be called with one flag at a time, each call spawning a dedicated service process. As a shortcut, the VBoxClient-all bash script enables all of these features.

Are those services (at least VBoxClient --clipboard) running on the guest?

Offline

#3 2023-05-16 21:30:40

mathbike
Guest

Re: [SOLVED] VirtualBox: Can't figure out how to enable clipboard

Ya the versions were different:

virtualbox 7.0.8-2
virtualbox-ext-oracle 7.0.8-1
virtualbox-guest-iso 7.0.8-1
virtualbox-guest-utils 7.0.8-2

I created a new vm and installed virtualbox-guest-utils instead of the outdated AUR package but it's still not working.  And I did run VBoxClient --clipboard, and VBoxClient-all which I forgot to mention before.

#4 2023-05-16 21:47:33

seth
Member
From: Won't reply 2 private help req
Registered: 2012-09-03
Posts: 76,734

Re: [SOLVED] VirtualBox: Can't figure out how to enable clipboard

My host is Arch with x11.

What is the guest system running? X11 as well?
Does DnD work?

I did run VBoxClient

The more relevant question is whether those processes are actually (still) running

ps aux | grep -i vbox

Offline

#5 2023-05-19 10:57:29

mathbike
Guest

Re: [SOLVED] VirtualBox: Can't figure out how to enable clipboard

It turned out to be my fault, my install script failed and I didn't realize it.  Thanks for the help seth.

#6 2023-05-19 12:43:43

seth
Member
From: Won't reply 2 private help req
Registered: 2012-09-03
Posts: 76,734

Re: [SOLVED] VirtualBox: Can't figure out how to enable clipboard

Please always remember to mark resolved threads by editing your initial posts subject - so others will know that there's no task left, but maybe a solution to find.
Thanks.

Offline

Board footer

Powered by FluxBB