2

How can I boot my raspberry pi 2 directly into displaying a graphical image? What needs to happen is once I plug it in it boots up and directly after it finishes it just displays an image without outside intervention. Is there a way to do this? Thanks in advance!

2

to execute commands "at boot", if autologin is enabled (since what it really does it execute them when the pi user logs in), i'd suggest editing the autostart file wich is in the ~/.config/lxsession/LXDE-pi/ directory. just add these two lines at the end of the file:

@export DISPLAY=:0
@epiphany /path/to/your/file.png &

P.S. you need to have root permissions to edit autostart

  • I don't think the OP means disk image, but rather a picture. – Bex Mar 22 '17 at 13:34
  • Yes I meant boot into a picture. – bismuth boss Mar 22 '17 at 14:32
  • "to execute commands at boot" -> The general form of this is actually a bad way to execute commands "at boot" unless autologin is enabled (since what it really does it execute them when the pi user logs in), and even then it should not be used generally for just anything. However, it is a decent way to do simple things with the GUI in that context, which gets complicated unless there is an autologin. – goldilocks Apr 19 '17 at 12:15
  • Yes, what I am saying is it will only work if autologin is enabled. If it isn't, then nothing will happen until someone actual logs in. The boot process does not normally log any one in, as it is not required. The autologin set-up on the Pi is unusual. – goldilocks Apr 22 '17 at 14:57
1

Note that there are many image viewers (e.g. fbi) which can render images directly, without the need to start an X server and boot into a desktop environment. If you need to save boot time and SD card space, you can run

fbi -T 1 -a picture.jpg

at boot time as described here.

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.