0

I'm using fbi to display some images. fbi has some keyboard controls, like +, -, Page Up, Page Down, etc. to control the images.

Instead of using keyboard, I want to send these control commands over SSH to fbi.

I have already tried the following method:

mkfifo /tmp/mycmd
fbi /myfolder/*.jpg < /tmp/mycmd &

After doing so, fbi doesn't start. I try sending some commands like echo . > /tmp/mycmd, but it doesn't start; and gives the following error:

using "DejaVu Sans Mono-16", pixelsize=16.67 file=/usr/share/fonts/truetype/ttf-dejavu/DejaVuSansMono.ttf
ioctl VT_GETSTATE: Inappropriate ioctl for device (not a linux console?)

What is the problem?

How can I send commands to fbi over SSH !?

  • Any help is highly appreciated. – Omid1989 Jan 13 '18 at 14:57
1

To display an image, fbi needs access to the TTY. So, you need to use -T 1:

fbi -d /dev/fb0 -T 1 zxcv.png

If you get access /dev/tty1: Permission denied, you can run the command with sudo.

Unfortunately I don't know of any way of sending commands to it. I tried using ttyecho to send things to /dev/tty1 but it caused fbi to crash. Your fifo method didn't seem to work either.

0

Try using the -d /dev/fb0 option with fbi.

By default, fbi finds the framebuffer device it's supposed to use by looking at which virtual console device it's being used on. Apparently it looks at its standard input for this purpose. When you're redirecting its standard input from a FIFO, it gets a non-console device and cannot proceed. Specifying the framebuffer device to use explicitly might help.

You might even find that as long as you have the necessary permissions to use the framebuffer device, you even won't need the FIFO: just start fbi -d /dev/fb0 /myfolder/*.jpg over the SSH connection, if it suits your purposes.

  • Running fbi -d /dev/fb0 /myfolder/*.jpg gives exactly the same error: using "DejaVu Sans Mono-16", pixelsize=16.67 file=/usr/share/fonts/truetype/ttf-dejavu/DejaVuSansMono.ttf ioctl VT_GETSTATE: Inappropriate ioctl for device (not a linux console?) – Omid1989 Jan 14 '18 at 12:03

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.