I'm SSHing into my raspberry pi 3 and would like to display and image or video that's being stored on the pi on the monitor its connected to. Not the monitor of the computer I'm using to SSH.

How could I go about this? I've tried using fbi, but am not sure how to specify which monitor.

I'm using Raspbian.

edit: edited for clarity

  • Hello, just to clarify, "host" is not the Pi but the machine you're SSHing from? If so, why do you need to use the Pi when the file to be displayed is already on the host? – Roger Jones Apr 1 '19 at 10:09
  • Hi, no I was referring the the pi as the host. I'm trying to display an image on the monitor the pi is plugged into while ssh'ed in. – Turner Apr 1 '19 at 16:31

To specify a display to use with X11-aware application you would either use a dedicated command line option or, if one is not available, set the DISPLAY environment variable in-line with the command, for example the following two commands do the same thing:

 DISPLAY=:0 xeyes

 xeyes --display :0

When you login via the graphical "greeter" the environment variable will be set correctly but as you are using SSH it's not being set. Depending how you're initiating the SSH connection you might be able to define some environment variables there.

I your specific case fbi is not using X11 but is rather accessing the frame buffer directly (clue is in the name) so the above will not work, however there is a command line option to specify the frame buffer device to use. You can use this to specify the display to use as follows:

fbi -d /dev/fb0 /path/to/some/file.png
| improve this answer | |
  • 2
    Note that over SSH, you probably want to use -T 1 so fbi can access to the TTY, like this: sudo fbi -d /dev/fb0 -T 1 /path/to/some/file.png. Else you might get a "(not a linux console?)" error. – Dan Chaltiel Jun 1 '19 at 19:35

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.