Architectural Relationship Between Ventoy2Disk Linux GUI and Plugson Explained
Ventoy2Disk Linux GUI and Plugson are independent front-ends that share the Ventoy core library for JSON handling, communicating loosely through the ventoy.json configuration file rather than through direct function calls or process dependencies.
The ventoy/Ventoy repository provides multiple tools for creating bootable USB drives and managing plugin configurations. Understanding the architectural relationship between the Ventoy2Disk Linux GUI and the Plugson configuration tool reveals how the project maintains strict separation of concerns while ensuring configuration consistency across its ecosystem.
Distinct Responsibilities and Entry Points
Ventoy2Disk Linux GUI and Plugson serve fundamentally different roles in the Ventoy workflow, operating as separate executables with no direct invocation chains.
Ventoy2Disk Linux GUI handles the installation of the Ventoy bootloader onto USB or SSD media. It creates the necessary partitions, copies core files, and optionally embeds plugin configurations. The typical entry points are the compiled binaries Ventoy2Disk.qt5_x64 (Qt-based) or Ventoy2Disk.gtk (GTK-based), built via the scripts in LinuxGUI/.
Ventoy Plugson provides a web-based graphical editor for the ventoy.json plugin configuration file. It runs a lightweight HTTP server to serve a single-page interface where users modify plugin settings. The entry point is the Plugson binary, started from Plugson/INSTALL/VentoyPlugson.sh or directly from the build output directory.
These tools operate independently; neither launches the other, and users invoke them separately based on whether they are installing Ventoy or editing configurations.
Shared Core Library Implementation
Both tools rely on the Ventoy core library located in Ventoy2Disk/Core/ and Ventoy2Disk/Web/. This shared codebase implements JSON parsing, configuration handling, and utility functions through the public header ventoy_json.h.
Ventoy2Disk GUI JSON Integration
The Linux GUI includes the core during compilation. The build script LinuxGUI/build_qt.sh adds include paths -I./Ventoy2Disk/Core and -I./Ventoy2Disk/Web, linking against the shared implementation.
The GUI primarily uses the JSON API to read existing configurations. In LinuxGUI/Ventoy2Disk/ventoy_gui.c, the code loads the configuration file to display current plugin settings:
#include "ventoy_json.h"
// ...
ventoy_json_load(g_ini_file, &json_root);
Plugson JSON Integration
Plugson also includes ventoy_json.h and links against Ventoy2Disk/Core/ventoy_json.c. However, Plugson focuses on writing configurations. In Plugson/src/main_windows.c, the tool saves user modifications:
#include <ventoy_json.h>
// ...
ventoy_json_save(g_json_root, "ventoy.json");
Because both programs use the single implementation in Ventoy2Disk/Core/ventoy_json.c, any changes to the configuration format automatically propagate to both tools, ensuring consistent parsing and serialization across the ecosystem.
Runtime Interaction Through ventoy.json
The architectural relationship relies on loose coupling via the ventoy.json file rather than process-level dependencies or inter-process communication.
When users finish editing with Plugson, the tool writes ventoy.json to the Ventoy USB mount point or a temporary directory. If the user subsequently runs Ventoy2Disk GUI on the same media, the installer detects this file and copies it into the final Ventoy partition, making the plugins available at boot time.
This file-based communication means the tools have no direct function calls or runtime dependencies. Each binary can be built, packaged, and executed independently according to the source structure in ventoy/Ventoy.
Practical Code Examples
Building and Running the Linux GUI
The Qt-based GUI binary is compiled using the build script that pulls in core sources:
# Run the pre-built Qt binary to install to /dev/sdb
sudo ./INSTALL/tool/x86_64/Ventoy2Disk.qt5_x64 -I -Drive:/dev/sdb
The binary is compiled from sources listed in LinuxGUI/build_qt.sh and the Qt interface files in Ventoy2Disk/QT/, including ventoy2diskwindow.cpp and ventoy2diskwindow.ui.
Starting the Plugson Web Interface
Plugson runs its own HTTP server using CivetWeb, implemented in Plugson/src/Web/ventoy_http.c:
# Build Plugson (see Plugson/build.sh) then run
./INSTALL/tool/x86_64/Plugson 127.0.0.1 24680
# Access the editor at http://127.0.0.1:24680/
The client-side logic handling ventoy.json resides in Plugson/www/static/js/vtoy.js.
Using the Shared JSON API
Both tools utilize the same API for configuration management, demonstrating the shared architectural foundation:
#include "ventoy_json.h"
/* Load configuration - used by GUI to read settings */
VTOY_JSON *root = NULL;
if (ventoy_json_load("ventoy.json", &root) != 0) {
fprintf(stderr, "Failed to read ventoy.json\n");
}
/* Modify and save - Plugson calls this when user presses Save */
ventoy_json_set_string(root, "default_legacy", "1");
ventoy_json_save(root, "ventoy.json");
Key Source Files by Component
-
Ventoy2Disk Linux GUI
LinuxGUI/build_qt.sh- Build script linking core and UI sources with-I./Ventoy2Disk/CoreVentoy2Disk/QT/ventoy2diskwindow.cppandventoy2diskwindow.ui- Qt interface implementationLinuxGUI/Ventoy2Disk/ventoy_gui.c- Main entry point calling JSON functions
-
Ventoy Plugson
Plugson/src/main_windows.c- Windows entry point creating mutex and starting serverPlugson/src/main_linux.c- Linux entry pointPlugson/src/Web/ventoy_http.c- HTTP server implementationPlugson/www/static/js/vtoy.js- Client-side UI logic
-
Shared Core Library
Ventoy2Disk/Core/ventoy_json.handventoy_json.c- JSON parser/writer used by both toolsVentoy2Disk/Core/ventoy_util.c- Common utilities for logging and path handling
Summary
- Ventoy2Disk Linux GUI and Plugson are independent executables with distinct responsibilities: installation versus configuration editing
- Both tools share the Ventoy core library (
ventoy_json.c) to ensure consistent JSON handling and configuration format compliance - Communication occurs through the
ventoy.jsonfile rather than direct function calls or process dependencies - Plugson writes the configuration file, while Ventoy2Disk GUI reads and embeds it during installation
- The loose coupling allows each tool to be built, distributed, and executed separately within the ventoy/Ventoy ecosystem
Frequently Asked Questions
Can Ventoy2Disk Linux GUI launch Plugson automatically?
No. According to the ventoy/Ventoy source code, these tools are designed as separate front-ends without direct invocation logic. Users must run Ventoy2Disk.qt5_x64 or Ventoy2Disk.gtk for installation tasks, and execute the Plugson binary separately when editing plugin configurations. There are no function calls or process dependencies between the two applications.
Do I need to install Ventoy before using Plugson?
Not necessarily. Plugson can create or edit ventoy.json files in any directory or on any existing Ventoy drive. However, for the configuration to take effect during boot, the file must be present on the Ventoy partition. You can either place the file on an existing Ventoy drive or run Ventoy2Disk GUI afterward to embed the configuration during a fresh installation.
What file formats do both tools support for configuration?
Both tools exclusively use the ventoy.json format, parsed through the shared ventoy_json.h API defined in Ventoy2Disk/Core/ventoy_json.c. This JSON file contains plugin settings such as default boot options, theme configurations, and injection parameters. Because both programs use the same core library, configuration files are fully interchangeable between the Qt/GTK GUI and the Plugson web interface.
Are these tools available on all operating systems?
Ventoy2Disk Linux GUI is specifically built for Linux environments, producing binaries like Ventoy2Disk.qt5_x64 via LinuxGUI/build_qt.sh. Plugson supports both Linux and Windows, with separate entry points in Plugson/src/main_linux.c and Plugson/src/main_windows.c. Both platforms use the same shared core library, ensuring configuration file compatibility across operating systems.
Have a question about this repo?
These articles cover the highlights, but your codebase questions are specific. Give your agent direct access to the source. Share this with your agent to get started:
curl -s "https://instagit.com/install.md" Maintain an open-source project? Get it listed too →