Thursday, April 10, 2014

Slideshow with non X Server

Slideshow for the shell 

Auf einem Server wollte ich nebenbei noch eine Slideshow mit Bildern laufen lassen.
At my server i would run a slideshow with pictures.
Because the server has no graphical enviroment i decieded to use the framebuffers.
As programm i installed "fbi"

aptitude install fbi 

The programm is part of the official debian repository.
For creating a framebuffer device the kernel need this parameter during boot:


This means 16 Bit colour and 1024x768 Pixel.

fbi -d /dev/fb0 -t 7 -u /daten/bilder/*.JPG 

With this command line i show all pictures from the directory /daten/Bilder for each 7 secounds a picture on the /dev/fb0 framebuffer device.
With -d i chose the device, -t are the time in secounds and -u the sources of the pictures.

That the scripts run in a ininity loop i create two shell-scripts:

while true
fbi -d /dev/fb0 -t 7 -u /daten/bilder/*.jpg

while true
sleep 30
killall fbi

The first script starts the fbi command and the loop garants, that if the programm is closed, it starts again. The secound scripts stops the fbi programm every 5 minutes (so that script 1 restart it) and with this it recognize the new pictures.

No comments:

Post a Comment