Visit our website:
www.linutop.com


Usage/PhotoSlideshow

From LinutopWiki

This documentation is old and doesn't apply on the Linutop OS V4. Use the Linutop WebKiosk to display slideshows.

Basic photo slideshow

To set up a simple slideshow you first need to copy your files on the Linutop. You can either use an USB key to import them, or download them from the network. In our example we will assume that your files are in /home/linutop/images.

  • run AppStarter (Applications -> System -> Startup) and select the "Photo SLideshow" item. Clic on the folder button on the right of the text entry and select the folder in which your images are stored (/home/linutop/images)
  • check the "Disable the screen saver" box
  • clic "OK"

Your slide show will automatically start at next boot.

Photo slideshow with refresh of images through windows shares

This setup requires a bit more tweaking. We assume that you've already setup a windows share, available at /home/linutop/shared.

We need to create a configuration file for linutop-display. Run in a terminal:

mousepad ~/playlist.xml

In the new window copy the following text:

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE linutop-display SYSTEM "linutop-display.dtd">
<linutop-viewer>
  <settings>
    <option name="DefaultTimeout" value="10" />
    <option name="DefaultImageStyle" value="centered" />
  </settings>

  <playlist>
    <item type="imagedir" uri="/home/linutop/data" />
  </playlist>
</linutop-viewer>

Save the file and quit.

Now we will create a script that will import new files and delete old one on the linutop. This scripts duplicates the files to make sure that we always have something to display. The network might go down and lock the display, so we have to avoid this.

Type in a terminal:

mousepad ~/run.sh

Copy in the file:

#!/bin/sh

### Config Options

WIN_DIR=/home/linutop/shared
LOCAL=/home/linutop/data
PLAYLIST=/home/linutop/playlist.xml
DELAY=60

### End Config

# make sure the dirs exist
mkdir -p $WIN_DIR
mkdir -p $LOCAL

update () {
    # return if we can't access the  shared directory
    if ! ls $WIN_DIR; then
        return
    fi

    # Copy files from the windows mount
    for file in $(ls $WIN_DIR); do
        cp $WIN_DIR/$file $LOCAL
    done

    # Delete files that shouldn't be there
    for file in $(ls $LOCAL); do
        if ! ls $WIN_DIR/$file >/dev/null 2>&1; then
            rm $LOCAL/$file
        fi
    done
}

# First copy; and start the viewer
update
linutop-display $PLAYLIST &

# Loop to update the local dir; the viewer will handle missing files
while :; do
    sleep $DELAY
    update
done

exit 0

Save and exit.

Now let's automate the launch of the script. In the Startup tool select the "Custom Command item", and type in the text entry:

sh /home/linutop/run.sh

The script will be run at next boot. The images on the linutop will be refreshed every minute and displayed in a loop.