Cross-platform Ventoy theme previewer built with Tauri (Rust backend + React frontend). It detects QEMU, lets you pick a Ventoy USB drive, and boots it in QEMU snapshot/readonly mode with configurable memory, resolution, GPU, and fullscreen.
- Rust toolchain (for Tauri backend)
- Node 18+ (for frontend) and
npm - QEMU on the host (the app can try to install via winget on Windows or apt on Debian/Ubuntu)
npm install
npm run tauri:devFor a release build:
npm run tauri:build- Launch the app; it checks for QEMU (
qemu-system-x86_64[w].exeon Windows orqemu-system-x86_64on Linux) and common install paths. - If QEMU is missing, click “Install QEMU” (winget on Windows, pkexec/sudo apt on Linux) or “Select QEMU…” to browse to the executable.
- Pick a removable drive from the table. The app runs Ventoy heuristics on mounted partitions (looks for
ventoy/,ventoy.json,ventoy.cfg,EFI/BOOT). - Configure:
- Memory (default 1024 MB)
- Resolution presets or custom (e.g., 1920x1080)
- GPU:
virtio-vga(fast, EDID) orVGA(compat, EDID) - Firmware: BIOS (default) or UEFI (if OVMF present in common locations)
- Fullscreen toggle
- Click “Preview Theme” to launch QEMU in snapshot mode with readonly raw disk access. Use “Stop Preview” to terminate the session.
- QEMU runs with
-snapshotandreadonly=onfor the raw drive to avoid writes. - Raw disk access may still require Administrator/root. On Windows, winget install uses elevation; QEMU launch itself does not auto-elevate—run the app elevated if needed.
check_qemu: detect QEMU path and version; load config.list_drives: Windows PowerShell (Get-CimInstance/Get-Volume) orlsblk -J -Oon Linux.launch_preview: build QEMU command with EDID resolution, snapshot, virtio/vga GPU choice, optional fullscreen and OVMF.stop_preview: terminate the running QEMU child.install_qemu: winget (Windows) or apt via pkexec/sudo (Debian/Ubuntu).- Config stored at
~/.config/ventoy-theme-previewer/config.json(Windows uses the standard roaming config dir) with keys:qemu_path,last_selected_drive,memory_mb,resolution,firmware_mode,gpu_mode,fullscreen.
src/App.tsxhandles UI flow, calls Tauri commands via@tauri-apps/apiinvocations.- Simple card layout with drive table, QEMU actions, advanced options, and status footer.
- QEMU not found: set a custom path via “Select QEMU…” or install via the provided button.
- Permission denied opening
PhysicalDriveN//dev/sdX: run the app/QEMU elevated (Administrator/root). - UEFI toggle disabled: install OVMF (
ovmf/edk2-ovmfpackages on Linux, ensure OVMF_CODE/OVMF_VARS underC:\Program Files\qemu\shareon Windows).