使用fbi显示图像

I've been trying to display images from a simple Go app using the following code:

output, err := exec.Command("fbi", "-a", "-noverbose", "-norandom", "-T 1", "-t 8", files).CombinedOutput()
if err != nil {
    log.Fatalf("Unable to start fbi: %v", string(output))
}

Where files is just a file name string. Running fbi -a -noverbose -norandom -T 1 -t 8 /path/to/file on the command line works fine, but when running the go executable I get the following error:

ioctl VT_GETSTATE: Inappropriate ioctl for device (not a linux console?)

I'm guessing the issue is that fbi is unable to access the correct tty even though I've specified which one to use. Does anyone know why this is? What's the difference between me running the command on the command line and it running in an executable?

I'm running this on Rasbian Stretch (not ssh). Tried both as root and not. Tried adding -d /dev/fb0.