4

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

2
  • 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? Apr 1, 2019 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, 2019 at 16:31

2 Answers 2

3

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
2
  • 4
    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. Jun 1, 2019 at 19:35
  • @DanChaltiel your comment could be the best answer.
    – Samveen
    Sep 18, 2021 at 12:45
4

To add to Roger's answer, if you are running this command over SSH, you might need to add the parameter -T 1 so that fbi can access to the TTY:

sudo fbi -d /dev/fb0 -T 1 /path/to/some/file.png

Otherwise, you might get a (not a linux console?) error.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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