Per-file modal export alerts block batch CLI workflows
0 reputation · 01 May 2023, 06:49 UTC
0 reputation · 01 May 2023, 06:49 UTC
When multiple SVG files are exported through Inkscape's command-line interface in succession, each operation can trigger its own modal dialog reporting success or failure. These pop-ups require explicit user acknowledgment, which interrupts automated batch workflows and creates notification noise. The underlying component is the SPMessage class in src/widget/message.cpp, which generates individual info, warning, or error dialogs rather than a consolidated summary.
Despite longstanding requests for a quiet or summary mode, the project has not settled on a unified alert aggregation mechanism, leaving the behavior unresolved as of recent stable releases. It is also unclear whether the GUI-driven export dialog and the command-line export-filename or export-area options share the same dialog-generation path, or whether extensions wrapping export calls introduce additional pop-ups that compound the problem.
Because behavior may differ across versions and platforms, what is the intended mechanism for suppressing or aggregating these per-file dialogs during batch exports? Should the CLI expose a summary-only mode, or is process management expected to handle the noise? Are there version-specific differences in how SPMessage behaves in headless or batch contexts?
32275 reputation · 01 May 2023, 13:53 UTC
Inkscape does not expose a documented quiet or summary-only flag that aggregates SPMessage dialogs during batch CLI exports. Automated workflows are expected to handle dialog noise through process isolation rather than in-application suppression.
SPMessage is a GUI-oriented notification component defined in src/widget/message.cpp. When an export code path reaches it, the application expects a window manager to resolve the modal. Stable releases do not provide a unified aggregation mechanism, so each info, warning, or error dialog can require manual acknowledgment.
It is not confirmed whether the GUI export dialog and CLI flags such as --export-filename or --export-area share the same dialog-generation path. Python extensions may also invoke independent message boxes that compound the problem.
xvfb-run inkscape --export-filename=output.svg input.svg
inkscape -v --export-filename=output.svg input.svg
Behavior differs between the 0.92.x and 1.x+ release series. This guidance assumes Inkscape 1.x or newer on a Unix-like system where DISPLAY may be set. Headless execution without Xvfb may cause the process to hang if a modal is triggered. Windows Session 0 isolation is not a verified equivalent.
Missing diagnostic: Are the alerts triggered by standard export flags, or by Inkscape extensions called from the CLI? Extension-sourced pop-ups are not controlled by core CLI export logic.
Use comments to ask for clarification. Post a solution as an answer.
32,275 reputation · 01 May 2023, 13:48 UTC
Starting with Inkscape 1.0, the --batch-process option runs the application in a headless mode that turns off every GTK modal dialog, including the SPMessage pop‑ups that normally appear after each export. The flag works for both GUI‑initiated and CLI‑initiated export commands.
inkscape input.svg \
--export-filename=output.png \
--batch-process
When --batch-process is active, success or failure messages are written to stderr instead of popping up. You can capture them with 2>log.txt if you need a summary or further parsing.
Note that the flag is not available in pre‑1.0 binaries, and on some Windows builds a fully headless environment may still trigger a dialog; testing the flag in your target environment is recommended.