A tool for launching Windows applications in a VirtualBox environment.
vbox-windows-app-launcher is a utility designed to seamlessly launch Windows applications within a VirtualBox virtual machine. This tool is particularly useful for users who need to run Windows applications in an isolated environment or on systems where native installation is not possible or desired.
This adds a feature that I was missing since I moved over from Parallel Desktop on macOS to VirtualBox on Linux. Similar to the "Open in VM" feature in Parallel Desktop, this script allows you to open various documents in a VirtualBox VM directly from the host system's file manager.
This project was inspired by andpy73, sbnwl, 3Pilif, and TVG and is based on this forum thread: https://forums.virtualbox.org/viewtopic.php?t=91799&sid=fe97378eec124475e838cf6ea5ea79e3&start=15
- Easy launch of Windows applications in a VirtualBox VM
- Seamless integration with host system
- Configurable VM settings
- Automatic VM startup and user login detection
- Optional automatic window focus and desktop notifications
- Desktop integration for easy file opening
- Clone this repository or download the script files.
- Make sure you have VirtualBox installed on your system.
- Install the optional dependencie if you want auto-focus or desktop notifications. For example in Arch Linux:
sudo pacman -S dunst wmctrl
- dunst: notification daemon used for desktop notifications
- wmctrl: window manager control used for automatic window focus
- Copy
vbox_windows_app_launcher.conf.sample
to~/.config/vbox_windows_app_launcher.conf
and edit it with your settings. - Make the script executable:
chmod +x vbox_windows_app_launcher.sh
- Edit the
open-windows-app-in-vm.desktop
file:- Update the
Exec=
line with the correct path to yourvbox_windows_app_launcher.sh
script:Exec=/path/to/your/script/vbox_windows_app_launcher.sh %f
- Update the
- Install the desktop file for easy file opening:
- For local installation (current user only):
mkdir -p ~/.local/share/applications cp open-windows-app-in-vm.desktop ~/.local/share/applications/
- For global installation (all users, requires sudo):
sudo cp open-windows-app-in-vm.desktop /usr/share/applications/
- For local installation (current user only):
- Update the desktop database:
update-desktop-database ~/.local/share/applications
-
Configure your settings in
~/.config/vbox_windows_app_launcher.conf
. -
Double-click on any file or folder to open it in the VM
or run the script directly:
./vbox_windows_app_launcher.sh /path/to/your/file_or_folder
The script will automatically use the appropriate application in the VM to open the file or folder.
Edit ~/.config/vbox_windows_app_launcher.conf
with your specific settings:
VM_NAME
: Name of your VirtualBox VMVM_USER
: Username in the VMVM_PASSWORD
: Password for the VM userVM_SHARE_PATH
: Path to shared folder on hostVM_DRIVE_LETTER
: Drive letter for shared folder in VMAUTO_FOCUS
: Set to true/false to enable/disable automatic window focusSCRIPT_TIMEOUT
: Timeout for the script in secondsNOTIFICATION_TIMEOUT
: Timeout for notifications in milliseconds
Check out the vbox_windows_app_launcher.conf.sample
file for more details.
- VirtualBox
- Windows applications installed in a VirtualBox VM
- Bash shell
- dunst (for notifications)
- wmctrl (for window management)
If you encouter the following error:
VBoxManage: error: Waiting for guest process failed: The specified user account on the guest is restricted and can't be used to logon
VBoxManage: error: Details: code VBOX_E_IPRT_ERROR (0x80bb0005), component GuestSessionWrap, interface IGuestSession, callee nsISupports
VBoxManage: error: Context: "WaitForArray(ComSafeArrayAsInParam(aSessionWaitFlags), 30 * 1000, &enmWaitResult)" at line 770 of file VBoxManageGuestCtrl.cpp
That can potentially mean that your password expired and that you need to reset it in the VM. You can do that while being logged in and in an administrator command prompt:
net user WindowsAccountName *
Contributions are welcome! Please feel free to submit a Pull Request. This project was initially developed with contributions from andpy73, sbnwl, 3Pilif, and TVG.
This project is open-source. This has no specific license.
For support, please open an issue in the GitHub repository or contact the maintainers.
The open-windows-app-in-vm.desktop
file provides desktop integration for easy file opening. It associates common file types with the launcher script.