Raspberry Pi Asked by Simyo Paris on December 12, 2021
I am quite new to programming but I have already started a too big project, and thus I got stuck.
The project is mainly meant to replace a pc used for slideshows in a museum. The current pc is way overpowered for this simple job, and tends to crash when the power is cut. My father got the idea to replace this pc with a raspberry as it is more fit, and if it crashes you can just replace the sd card.
After some looking around I found an extension called Feh, wich worked perfectly. But the problem is: the program needs to start when the raspberry boots up. I have tried a few things but none of them worked yet. the only thing that did work was the created .SH file. Furthermore I am scared to change too much in the laun
You may be able to simplify this considerably.
1) Install LibreOffice
It's free. It's similar to MS-Office. You'll create a presentation (the module similar to "PowerPoint" is called LibreOffice "Impress").
2) Add slide transitioins
After you build your deck (you can actually import PowerPoint slide decks if you have one) make sure you set automatic slide transitions. (You'll find slide transitions is an icon in the right margin of the user interface).
3) Set the slide show to auto-repeat
In "Slide Show" -> "Slide Show Settings" click the "Loop & Repeat after ____" and set some number of seconds.
4) Save the presentation
Give it a filename and save it (e.g. "File" -> "Save as...", etc.)
5) Test auto-launch of your show
You can launch the presentation so that it automatically starts running via command line. Open a Terminal and type libreoffice -show my_presentation.obp
(or whatever the name is for the presentation).
6) Configure the user-account to auto-launch the slide show.
Assuming everything works as you expect... configure the Pi to auto-launch the presentation as soon as the desktop launches.
You can configure the desktop to auto-launch an application by editing
~/.config/lxsession/LXDE-pi/autostart
Add a row to the end of the autostart file that looks like this:
@libreoffice -show /home/pi/Documents/Sample-Slide-Show.odp
7) Test it
Logout (Shutdown -> Logout) Log back in The slide-show should automatically launch and start playing within a few seconds.
If all of these steps work, then the Pi will autolaunch your slide show when it boots each day.
If you want to avoid the Pi's memory card becoming corrupted, you might want to create a cron job to shutdown the Pi each day when the museum closes.
sudo crontab -e
"cron" is a unix facility that automatically runs commands at periodic times. The "crontab" file (the "table" of "cron" entries) is the file that specifies what to do ... and when.
An entry that would shut the Pi down at 9:00pm each day might look like this:
00 21 * * * shutdown -h now
This command says at "00" minutes of hour "21" (9pm) on any () day-of-the-month and any () month and any (*) day-of-the-week, run the command "shutdown -h now" (shuts the system down with a "halt" and do it immediately (normally there's a delay).
By doing a system shutdown, all files are closed and processes and terminated so that there should be no memory card corruption. The Pi wont deprive itself of power (it doesn't have a way to do that) so someone will have to unplug them you can get power supplies that have a tiny on/off button on the cord.)
Answered by Tim Campbell on December 12, 2021
You can add the launch command for your particular application to rc.local using 'sudo nano /etc/rc.local' if you add it above the final line that says exit 0 then it will run that command on boot.
I wouldn't start replacing the sd card every time the power goes out unless it actually gets corrupted. You'll end up spending a fortune on sd cards when you probably don't need to. If you do end up with a corrupt card then a re format should solve it most of the time. That said its never a bad idea to have a back up and the best thing with a pi is you can clone the sd card once your setup and so if one does start having issues take that card out and while your reformatting or investigating that card you can just plug the other one in and carry as normal.
Answered by rohtua on December 12, 2021
Get help from others!
Recent Answers
Recent Questions
© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP