- 1 year ago
octave-gui invoked by bat script does not work unless you run octave(-gui) before (or "run octave-cli.exe with qt")
If you are experiencing issues running Octave GUI (octave-gui) through a batch script, it could be due to the way Octave is initialized. Octave requires proper initialization before invoking the GUI interface.
Here's an example of how you can modify your batch script to ensure proper initialization of Octave before launching the GUI:
batch@echo off
REM Initialize Octave by running octave-cli.exe with qt option
octave-cli.exe --gui qt --eval "1;"
REM Launch Octave GUI
octave-gui.exe
In this example, we first run octave-cli.exe
with the --gui qt
option and the --eval "1;"
option to evaluate a dummy expression (1;
). This step ensures that Octave is properly initialized with the Qt interface. Once the initialization is complete, we can then proceed to launch octave-gui.exe
to start the Octave GUI.
By following this approach, you should be able to run Octave GUI through the batch script without any issues.