How to enable drag and drop in a VirtualBox running Ubuntu Linux?

Problem in: VirtualBox Ubuntu

Description: VirtualBox bidirectional drag and drop not working (on Windows 11 host / Windows 10 host with Ubuntu 20.04 and Ubuntu 22.04)

How does it work?

VirtualBox guest additions are software tools, to be installed in the guest VM after the OS has been installed. They consist of device drivers and system applications that improve the guest VM performance and usability. You can achieve more things by installing the VBox guest additions pack, other than drag and drop, such as shared folders, changing screen resolutions, copy-paste clipboards, automated logins, and so on. Please refer to the complete guide here: https://www.virtualbox.org/manual/ch04.html

Step #1: Make sure VirtualBox Guest Addition is installed

You have to install VirtualBox Guest Addition in the Ubuntu Guest OS to enable the copy-paste. If you are looking for the guide to installing VirtualBox Guest Addition installation, Please refer to this guide:

Step #2: Enabling Drag and Drop.

From VirtualBox, management window, follow these steps to enable Drag and Drop between Virtualbox hosts and guest(s) (Bidirectional).

  • Open the VirtualBox Manager window in Windows 11.
  • Right-click on the Ubuntu VM where you want to enable drag and drop, then click on Settings.
  • Go to the Advanced TAB on the right side of the Settings window. (shown in the picture below)
  • Click the Advanced Settings tab -> Drag’n’Drop, and select Bidirectional (Bidirectionally).
  • If you prefer to enable drag-drop in one direction, please choose that appropriately.
  • After your selection, click on the OK button to save your preferences.
  • Please refer to the below image for reference.

Sometimes, depending on the VirtualBox software versions, you may need to restart the guest OS (in our case, the Ubuntu 22.04 VM restart was required) to make this change in effect.

VirtualBox settings for enabling drag and drop

FAQ: This solution solves the below queries.

  • VirtualBox drag-drop is not working in Ubuntu 22.04 (or in any other VBox VMs with extension packs installed).
  • Bidirectional drag/drop Virtual-box not working Ubuntu.
  • Enable bi-directional drag-drop between Virtual Box Ubuntu VM and Windows 11 host (or on Windows 10 host).

This experiment is tried and tested on:

  • Ubuntu 20.04, VirtualBox 6.01
  • Ubuntu 22.04, VirtualBox 6.1.34
  • VBox Hosts: Windows 10 and Windows 11.

Conclusion

To enable drag and drop functionality between your host machine and a VirtualBox virtual machine, you need to install and configure the VirtualBox Guest Additions. The Guest Additions package provides additional features and drivers that enhance the integration between the host and guest systems, including drag-and-drop support.

This guide explained the steps for enabling file drag and drop. If you are looking for steps on how to enable clipboard copy-pastes between VirtualBox VM and the host, please refer to How to enable copy and paste in a VirtualBox running Ubuntu Linux

With these settings enabled, you should be able to drag and drop files and folders between your host machine and the VirtualBox virtual machine.

Note: The instructions provided above assume you are using a Linux guest. If you are using a different guest operating system, the installation and configuration steps may vary. Adjust the commands and procedures accordingly based on your specific guest operating system.