In Virtualbox the clipboard between the host and the guest OS does not work

Information about my pc.

System:
  Kernel: 6.6.32-1-MANJARO arch: x86_64 bits: 64 compiler: gcc v: 14.1.1
    clocksource: tsc avail: hpet,acpi_pm
    parameters: BOOT_IMAGE=/@/boot/vmlinuz-6.6-x86_64
    root=UUID=31e79652-d999-49a0-a894-d32dbe968c86 rw rootflags=subvol=@
    nvidia-drm.modeset=1 quiet splash udev.log_priority=3
  Desktop: KDE Plasma v: 6.0.5 tk: Qt v: N/A info: frameworks v: 6.2.0
    wm: kwin_x11 vt: 2 dm: SDDM Distro: Manjaro base: Arch Linux
Machine:
  Type: Desktop Mobo: ASRock model: Z170M Pro4S serial: <superuser required>
    uuid: <superuser required> UEFI: American Megatrends v: P7.00
    date: 09/23/2016
CPU:
  Info: model: Intel 0000 bits: 64 type: MT MCP arch: Skylake-S level: v3
    note: check built: 2015 process: Intel 14nm family: 6 model-id: 0x5E (94)
    stepping: 1 microcode: 0x1D
  Topology: cpus: 1x cores: 4 tpc: 2 threads: 8 smt: enabled cache:
    L1: 256 KiB desc: d-4x32 KiB; i-4x32 KiB L2: 1024 KiB desc: 4x256 KiB
    L3: 8 MiB desc: 1x8 MiB
  Speed (MHz): avg: 800 min/max: 800/2600 scaling: driver: intel_pstate
    governor: powersave cores: 1: 800 2: 800 3: 800 4: 800 5: 800 6: 800 7: 800
    8: 800 bogomips: 35210
  Flags: avx avx2 ht lm nx pae sse sse2 sse3 sse4_1 sse4_2 ssse3 vmx
  Vulnerabilities:
  Type: gather_data_sampling status: Vulnerable: No microcode
  Type: itlb_multihit status: KVM: VMX disabled
  Type: l1tf mitigation: PTE Inversion; VMX: conditional cache flushes, SMT
    vulnerable
  Type: mds status: Vulnerable: Clear CPU buffers attempted, no microcode;
    SMT vulnerable
  Type: meltdown mitigation: PTI
  Type: mmio_stale_data status: Vulnerable: Clear CPU buffers attempted, no
    microcode; SMT vulnerable
  Type: reg_file_data_sampling status: Not affected
  Type: retbleed status: Vulnerable
  Type: spec_rstack_overflow status: Not affected
  Type: spec_store_bypass status: Vulnerable
  Type: spectre_v1 mitigation: usercopy/swapgs barriers and __user pointer
    sanitization
  Type: spectre_v2 mitigation: Retpolines; STIBP: disabled; RSB filling;
    PBRSB-eIBRS: Not affected; BHI: Not affected
  Type: srbds status: Vulnerable: No microcode
  Type: tsx_async_abort status: Vulnerable: Clear CPU buffers attempted, no
    microcode; SMT vulnerable
Graphics:
  Device-1: NVIDIA GP106 [GeForce GTX 1060 6GB] driver: nvidia v: 550.78
    alternate: nouveau,nvidia_drm non-free: 545.xx+ status: current (as of
    2024-04; EOL~2026-12-xx) arch: Pascal code: GP10x process: TSMC 16nm
    built: 2016-2021 pcie: gen: 2 speed: 5 GT/s lanes: 16 ports: active: none
    off: DP-1 empty: DVI-D-1,DVI-D-2,HDMI-A-1 bus-ID: 01:00.0
    chip-ID: 10de:1c03 class-ID: 0300
  Display: x11 server: X.Org v: 21.1.13 with: Xwayland v: 24.1.0
    compositor: kwin_x11 driver: X: loaded: nvidia gpu: nvidia,nvidia-nvswitch
    display-ID: :0 screens: 1
  Screen-1: 0 s-res: 1920x1080 s-dpi: 92 s-size: 530x301mm (20.87x11.85")
    s-diag: 610mm (24")
  Monitor-1: DP-1 mapped: DP-0 note: disabled model: Philips PHL 242E1GJ
    serial: <filter> built: 2021 res: 1920x1080 dpi: 93 gamma: 1.2
    size: 527x296mm (20.75x11.65") diag: 604mm (23.8") ratio: 16:9 modes:
    max: 1920x1080 min: 640x480
  API: EGL v: 1.5 hw: drv: nvidia platforms: device: 0 drv: nvidia device: 2
    drv: swrast gbm: drv: nvidia surfaceless: drv: nvidia x11: drv: nvidia
    inactive: wayland,device-1
  API: OpenGL v: 4.6.0 compat-v: 4.5 vendor: nvidia mesa v: 550.78 glx-v: 1.4
    direct-render: yes renderer: NVIDIA GeForce GTX 1060 6GB/PCIe/SSE2
    memory: 5.86 GiB
  API: Vulkan v: 1.3.279 layers: 7 device: 0 type: discrete-gpu name: NVIDIA
    GeForce GTX 1060 6GB driver: nvidia v: 550.78 device-ID: 10de:1c03
    surfaces: xcb,xlib
Audio:
  Device-1: Intel 100 Series/C230 Series Family HD Audio vendor: ASRock
    driver: snd_hda_intel v: kernel alternate: snd_soc_avs bus-ID: 00:1f.3
    chip-ID: 8086:a170 class-ID: 0403
  Device-2: NVIDIA GP106 High Definition Audio driver: snd_hda_intel
    v: kernel pcie: gen: 2 speed: 5 GT/s lanes: 16 bus-ID: 01:00.1
    chip-ID: 10de:10f1 class-ID: 0403
  Device-3: C-Media USB Audio Device driver: hid-generic,snd-usb-audio,usbhid
    type: USB rev: 1.1 speed: 12 Mb/s lanes: 1 mode: 1.1 bus-ID: 1-9:5
    chip-ID: 0d8c:0012 class-ID: 0300
  API: ALSA v: k6.6.32-1-MANJARO status: kernel-api with: aoss
    type: oss-emulator tools: alsactl,alsamixer,amixer
  Server-1: JACK v: 1.9.22 status: off tools: N/A
  Server-2: PipeWire v: 1.0.7 status: active with: 1: pipewire-pulse
    status: active 2: wireplumber status: active 3: pipewire-alsa type: plugin
    tools: pactl,pw-cat,pw-cli,wpctl
Network:
  Device-1: Intel Ethernet I219-V vendor: ASRock driver: e1000e v: kernel
    port: N/A bus-ID: 00:1f.6 chip-ID: 8086:15b8 class-ID: 0200
  IF: enp0s31f6 state: down mac: <filter>
  Device-2: Ralink MT7601U Wireless Adapter driver: mt7601u type: USB
    rev: 2.0 speed: 480 Mb/s lanes: 1 mode: 2.0 bus-ID: 1-13:6 chip-ID: 148f:7601
    class-ID: 0000 serial: <filter>
  IF: wlp0s20f0u13 state: up mac: <filter>
  Info: services: NetworkManager, systemd-timesyncd, wpa_supplicant
Bluetooth:
  Device-1: Realtek Bluetooth Radio driver: btusb v: 0.8 type: USB rev: 1.1
    speed: 12 Mb/s lanes: 1 mode: 1.1 bus-ID: 1-3:2 chip-ID: 0bda:8771
    class-ID: e001 serial: <filter>
  Report: rfkill ID: hci0 rfk-id: 0 state: up address: see --recommends
Drives:
  Local Storage: total: 1.59 TiB used: 795.91 GiB (48.8%)
  SMART Message: Unable to run smartctl. Root privileges required.
  ID-1: /dev/sda maj-min: 8:0 vendor: Apacer model: AS350 512GB
    size: 476.94 GiB block-size: physical: 512 B logical: 512 B speed: 6.0 Gb/s
    tech: SSD serial: <filter> fw-rev: 5PE0 scheme: GPT
  ID-2: /dev/sdb maj-min: 8:16 vendor: KingDian model: S280 240GB
    size: 223.57 GiB block-size: physical: 512 B logical: 512 B speed: 6.0 Gb/s
    tech: SSD serial: <filter> fw-rev: 6A scheme: GPT
  ID-3: /dev/sdc maj-min: 8:32 vendor: Toshiba model: HDWD110
    size: 931.51 GiB block-size: physical: 4096 B logical: 512 B speed: 6.0 Gb/s
    tech: HDD rpm: 7200 serial: <filter> fw-rev: A8J0 scheme: GPT
Partition:
  ID-1: / raw-size: 223.27 GiB size: 223.27 GiB (100.00%)
    used: 96.82 GiB (43.4%) fs: btrfs dev: /dev/sdb2 maj-min: 8:18
  ID-2: /boot/efi raw-size: 300 MiB size: 299.4 MiB (99.80%)
    used: 588 KiB (0.2%) fs: vfat dev: /dev/sdb1 maj-min: 8:17
  ID-3: /home raw-size: 223.27 GiB size: 223.27 GiB (100.00%)
    used: 96.82 GiB (43.4%) fs: btrfs dev: /dev/sdb2 maj-min: 8:18
  ID-4: /var/log raw-size: 223.27 GiB size: 223.27 GiB (100.00%)
    used: 96.82 GiB (43.4%) fs: btrfs dev: /dev/sdb2 maj-min: 8:18
Swap:
  Alert: No swap data was found.
Sensors:
  System Temperatures: cpu: 30.0 C pch: 43.0 C mobo: N/A gpu: nvidia temp: 45 C
  Fan Speeds (rpm): N/A gpu: nvidia fan: 0%
Info:
  Memory: total: 24 GiB available: 23.42 GiB used: 3.19 GiB (13.6%)
  Processes: 310 Power: uptime: 21m states: freeze,mem,disk suspend: deep
    avail: s2idle wakeups: 0 hibernate: platform avail: shutdown, reboot,
    suspend, test_resume image: 9.36 GiB services: org_kde_powerdevil,
    power-profiles-daemon, upowerd Init: systemd v: 255 default: graphical
    tool: systemctl
  Packages: 1590 pm: pacman pkgs: 1557 libs: 395 tools: pamac,yay pm: flatpak
    pkgs: 28 pm: snap pkgs: 5 Compilers: clang: 17.0.6 gcc: 14.1.1 Shell: Zsh
    v: 5.9 default: Bash v: 5.2.26 running-in: konsole inxi: 3.3.34

Hello forum! I installed virtualbox using this instruction VirtualBox - Manjaro
I’ve tried everything, but nothing helps.
The clipboard does not work in both directions

This is unlikely to be a Manjaro-specific issue; as a cursory Internet search will reveal:

The VirtualBox guest additions are a prerequisite for the clipboard functionality to work. You should probably make sure they are installed correctly before much else; See the Manjaro Wiki article:

I know that in previous years it has sometimes been possible to have clipboard work in one direction only by adjusting the respective VirtualBox settings; however, I don’t know the current official status of the feature. I imagine https://www.virtualbox.org/ would be a good place to start. Another potentially useful resource is the Arch Linux Wiki article:

In my experience with VirtualBox, the clipboard; drag-and-drop; has been rather hit-or-miss; it works, or it doesn’t.

Currently, copy/paste doesn’t seem to work easily from a Manjaro desktop to a Windows guest, but with some persistence, drag/drop eventually does.

Usually it does not work at all - until you enable it.

You need to select bidirectional.

Either

  • with the virtual machine running
  • windowed
  • not full screen
  • click on Devices menu
  • Shared Clipboard
  • Bidirectional

Or

  • before starting it
  • rightclick on the vm
  • Settings
  • General
  • Advanced tab
  • Shared Clipboard
  • Bidirectional

As I assume - from your inxi sysinfo - your host is Manjaro - add your host username to vboxusers grup

sudo gpasswd -a $USER vboxusers

If you don’t have the guest iso - sync it from the repo

sudo pacman -Syu virtualbox-guest-iso

Assuming your guest is Windows - you need to insert guest additions from the Devices menu - then install from the image inserted.

If you guest is Manjaro - inside the running guest - add your guest username to vbboxsf group - restart the vm.

If your guest is anything but an Arch Linux based system - insert the guest iso and run the installer.

pacman -Q | grep virtualbox                                                                               ✔ 
virtualbox 7.0.18-1
virtualbox-guest-iso 7.0.18-1
virtualbox-guest-utils 7.0.18-1
virtualbox-host-dkms 7.0.18-1

I have everything installed. The clipboard used to work before installing virt manager. I then deleted it, with the same packages that it installed, reinstalled virtualbox, it does not help

id                                                                                                        ✔ 
uid=1000(vladimir) gid=1001(vladimir) группы=1001(vladimir),3(sys),90(network),98(power),108(vboxusers),109(vboxsf),957(libvirt-qemu),958(libvirt),991(lp),992(kvm),998(wheel),1000(autologin)
sudo VBoxClient --clipboard                                                                               ✔ 
VBoxClient: error: VbglR3InitUser failed: VERR_FILE_NOT_FOUND

such is error

What ??? I have no idea what you are doing or trying to do.

  • vboxusers group is on host
  • vboxsf is inside guest

Did you remember to enable the service inside the guest?

Assuming the guest is Manjaro (at least Arch based) [root tip] [How To] VirtualBox - Installation - USB - Shared Folder

sudo systemctl enable --now vboxservice

If guest is not Manjaro - you will have to lookup how to configure that specific guest.

The clipboard used to work before installing virt manager. I then deleted it, with the same packages that it installed, reinstalled virtualbox, it does not help

I deleted my vboxsf group. vboxsf added user to guest system

host always Manjaro Kde, guest - Mabox or Fedora

Based on Manjaro - manjaro rules apply

I am not familiar with Fedora in a virtual environment

BUT - I don’t know the current state with VirtualBox - currently I am using vmware workstation pro to run my virtual workstations.

Yes, I think that much is understood.

I don’t think I can offer anything here.
Good luck.

I rolled back the version of VirtualBox via manjaro-downgrade from 17.0.18 to 17.0.16 and the clipboard started working! I added the package to ignore, but in /etc/pacman.conf, the IgnorePkg line is empty. Can you tell me where else it could have written it?

I realized they didn’t write it anywhere, although they suggested adding it to ignore, I added virtualbox and virtualbox-guest-utils to IgnorePkg packman.conf myself

Don’t forget that you did - these will not be updated ever again if you do.

I suppose you intended that reply for someone else.

However, did you update the guest-additins in the Guest OS?

guest-additions

Note that the version of guest-additions installed in a Guest OS must match the version of VirtualBox installed on the Host OS, for the bidirectional clipboard to work.

When you updated to VirtualBox 17.0.18 did you also update the guest-additions to the current version? This would mean uninstalling the previous guest-additions (in the Guest OS) and installing the new version.

If you did not also update the guest-additions installed in the Guest OS to match the installed version of VirtualBox then it’s not surprising that features of the guest-additions (including bidirectional clipboard, and drag/drop) might not work.

as I rolled back to version 17.0.16, the clipboard works without any installations in the guest virtual machine, I have already tried installing new images, everything works👌

ok thanks👍

I think you might have completely missed the point; although, I don’t see how.
As long as you’re happy.

Good luck.

I figured out what the problem was, I didn’t have virtualbox-ext-oracle 7.0.18-1 installed, I mounted VirtualBox Guest Additions in the guest system, updated VirtualBox to 7.0.18 and everything worked.
Here are all the packages that I have installed

[vladimir@manjaro ~]$ pacman -Q | grep virtualbox
linux66-virtualbox-host-modules 7.0.18-6
virtualbox 7.0.18-1
virtualbox-ext-oracle 7.0.18-1
virtualbox-guest-iso 7.0.18-1