Can't open viewport for graphics

Hello fellow KiCad simulators,

I tried to understand the whitenoise source by plotting the spectrum.
When i try to plot i get the error “Can’t open viewport for graphics”.

I searched for the error but there is very few cases which didn’t seem relevant for KiCad. Batchmode was the cause for someone with the same error.

I added my netlist below and all output. I am using NGSPICE 38 and KiCad 7.02 on Linux.

Netlist:
.title KiCad schematic
.save all
.probe alli
.tran 0.5n 1u
.control
set controlswait
run
linearize in
fft in
plot mag(in)
.endc
V1 in 0 TRNOISE( 1 0.7n 0 0 0 0 0 )
R1 in out 1
C1 out 0 1n
.end

full output:
Background thread stopped with timeout = 0
Note: No compatibility mode selected!
Circuit: KiCad schematic
Prepared to start controls after bg_run has finished
Doing analysis at TEMP = 27.000000 and TNOM = 27.000000
No. of Data Rows : 6774
Doing analysis at TEMP = 27.000000 and TNOM = 27.000000
No. of Data Rows : 6794
FFT: Time span: 1e-06 s, input length: 2001, zero padding: 47
FFT: Frequency resolution: 1e+06 Hz, output length: 1025
Can’t open viewport for graphics.

The .control section should be run in external ngspice to become fully effective.

Shared ngspice, as used by KiCad, does not support the ‘plot’ command, as it does not have a graphics interface. Plotting here is possible only via the Eeschema interface, restricted to the signals seen in the ‘Spice Simulator’ window…