Install Canvas

From xPL
Jump to: navigation, search

A Raspberry Pi can easily serve 4&nbspK high definition images (3840 x 2160 pixels) to a TV screen or a computer monitor. The system is aimed to remain lightweight. It uses the framebuffer to display the images and, as such, doesn't require the X Window System to be installed.

The installation instructions are provided for raspbian on a Raspberry Pi.

Base installation

At first, install the raspbian console operating system.

Set the framebuffer resolution to match the monitor's.

Install the framebuffer image viewer together with the graphic libraries for image transformation and display.

The system is to be controlled via xPL. Install:

Install xPL picture frame

Download the screen controller script to xPL scripts directory:

su control
chown control:users *.pl
chmod 775 *.pl

Test the picture display:

su control
$SCRIPTS_BASE_DIR/ -vn canvas1 -u 60

Open another terminal window and test the commands:

su control
$SCRIPTS_BASE_DIR/ -v -t cmnd -c canvas.basic -d dspc-canvas.canvas1 command=stop
$SCRIPTS_BASE_DIR/ -v -t cmnd -c canvas.basic -d dspc-canvas.canvas1 command=start
$SCRIPTS_BASE_DIR/ -v -t cmnd -c canvas.basic command=next
$SCRIPTS_BASE_DIR/ -v -t cmnd -c canvas.basic directory=/home/control/Canvas/Paintings/Tintoretto
$SCRIPTS_BASE_DIR/ -v -t cmnd -c canvas.basic duration=10

Alternatively, start an xPL monitor and watch the status information issued by the canvas:


Launch the scripts at startup

Debian with SystemD

On Debian with systemd (such as Raspbian), the scripts can be defined as services.

Edit /lib/systemd/system/xpl-canvas.service:

Description=picture display service

ExecStart=/home/control/Documents/Controls/ -n canvas1


Activate the service:

systemctl enable xpl-canvas.service
service xpl-canvas start

Reboot and check:

ps ax | grep -v grep | grep -i xpl
systemctl list-units --type=service --state=running | grep xpl
service xpl-canvas status