How do I fix the ngspice warning "Can't open viewport for graphics."?
PEBACK - I was running my script in batch mode, thinking that stuff in .control would run automatically, pop up a waveform window and exit.

Batch mode does not do this.

Instead, just ngspice circuit.cir.