dumaine - google it...

Raspberry Pi Slideshow .PPT .PPTX .ODP

The information below will help you to setup a Raspberry Pi with Raspbian OS that will play a slideshow/PowerPoint presentation using a PPT/PPTX or ODP file.

The system will be setup to automatically login to a desktop, load Libre Office Impress (PowerPoint alternative) and run a slide show presentation with custom slide show settings defined.

Why:

Instead of using a costly full blown MS Windows desktop PC we can use a Raspberry Pi that not only costs hundreds of pounds less to buy but also consumes a minor percentage of power that a full desktop uses as well as being small enough to attach to the rear of the display device.

Note: These instructions do not cover the use of 3rd party applications, please consult the relevant program guides.

Note: The steps below are carried out using the Raspbian Full image, instructions to come for Raspbian Lite.


The process order for this task is:

  • Install Raspbian
  • Update Raspbian
  • Apply Raspbian custom settings
  • Install / Update  Libre Office
  • Apply Libre Office Impress custom settings

To build an Raspberry Pi up to a base image where it then can be used for this projects like this,    see this post about Base Images

Once you have a working base image, follow the steps below:


Update Libre Office on Raspbian

Once Logged in,  enter the following commands to update Libre office to the latest version.

Note: Libre Office comes installed on the Raspbian full image but not on the Lite image

Start by updating the Raspbian OS

sudo apt-get update

RPiSetup-2

You will be shown ‘Reading package lists… Done’ on successfully completing the update

RPiSetup-3

sudo apt-get install  libreoffice-impress

RPiSetup-24

If the latest version is already installed the below output will be shown

RPiSetup-25


Automatically load file on boot

To run a file automatically at start-up we must place some code into the autostart file.

–norestore  is required in the event of an unsafe shutdown, Libre Office will try and restore the file when its next loaded, this process required user interaction.

Navigate to the autostart file located below – this can be done from Putty or locally using the console.

/home/pi/.config/lxsession/LXDE-pi/autostart

Insert the below line into the autostart file.

Note: This will be the location of the presentation that will start on boot.

@libreoffice --show /home/pi/Documents/presentation.ppt --norestore

Custom Macro To Enforce Global Settings

  1. Start Impress
  2. Select Tools -> Macros -> Organise macros -> LibreOffice Basic
  3. In the left pane, select My Macros -> Standard -> Module1
  4. In the right pane you will get: Main
  5. Select Edit
  6. You should get something like:
-------------------------------------------
REM  *****  BASIC  *****

Sub Main

End Sub
-------------------------------------------

Replace the contents with below:

-------------------------------------------
REM  *****  BASIC  *****
REM Set presentation variables for all presentations
Sub Main
Dim Doc As Object
Dim Presentation As Object
Doc = ThisComponent
Presentation = Doc.Presentation
REM Uncomment the line below to make all presentations loop endlessly:
Presentation.IsEndless(True)
REM Uncomment the line below to make all presentations run fullscreen:
Presentation.IsFullScreen(True)
REM Uncomment the line below to remove the 10-second delay:
Presentation.Pause = 0
REM Uncomment the line below to bypass the navigator on program start:
Presentation.StartWithNavigator(False)
REM Uncomment the line below to make sure presentations always run on top:
Presentation.IsAlwaysOnTop(False)
REM Uncomment the line below to change slides automatically rather than manually on all presentations:
Presentation.IsAutomatic(True)
REM Uncomment the line below to allow animations in all presentations:
Presentation.AllowAnimations(True)
REM Uncomment the line below to always hide the mouse during presentations:
Presentation.IsMouseVisible(False)
REM Uncomment the line below to start presentations directly on opening:
Presentation.start()
End Sub
----------------------------------------------
  1. Save the macro, close the dialog (of course you’re welcome to give the macro a somewhat more informative name than the default)
  2. Select Extra -> Customize in the menu
  3. Select the tab Events
  4. At the bottom of the dialog it says Save In: Untitled1 (or another filename)
  5. Change Untitled1 into ‘LibreOffice’ (this will save the event in the global configuration instead of the local document)
  6. Select the event Open Document
  7. Click on Macro…
  8. Select your library in the left pane (e.g. My Macros -> Standard -> Module1)
  9. Select “Main” in the right pane, and click OK. This will assign the macro you just created to an “Open Document” event.

Fingers crossed I have written all this down correctly, restart the PC and away you go!!

Leave a Reply

Your email address will not be published. Required fields are marked *