Difference between revisions of "Install Canvas"

From xPL
Jump to: navigation, search
(Base installation)
(Debian with SystemD)
Line 57: Line 57:
 
the scripts can be defined as services.
 
the scripts can be defined as services.
  
Edit <code>/lib/systemd/system/xpl-loungeScreen.service</code>:
+
Edit <code>/lib/systemd/system/xpl-canvas.service</code>:
 
  [Unit]
 
  [Unit]
  Description=lounge Sony Bravia screen control
+
  Description=picture display service
 
  After=network.target
 
  After=network.target
 
   
 
   

Revision as of 11:28, 19 March 2019

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
SCRIPTS_BASE_DIR=/home/control/Documents/Controls
cd $SCRIPTS_BASE_DIR
wget http://www.dspc.ch/xPL/Downloads/xpl-canvas.pl
chown control:users *.pl
chmod 775 *.pl

Test the picture display:

su control
SCRIPTS_BASE_DIR=/home/control/Documents/Controls
$SCRIPTS_BASE_DIR/xpl-canvas.pl -vn canvas1 -u 60

Open another terminal window and test the commands:

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

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

$SCRIPTS_BASE_DIR/xpl-monitor.pl -vf

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:

[Unit]
Description=picture display service
After=network.target

[Service]
Type=simple
ExecStart=/home/control/Documents/Controls/xpl-screen-bravia.pl -v -n loungeScreen -w 2
Restart=always

[Install]
WantedBy=multi-user.target

Activate the service:

su
systemctl enable xpl-loungeScreen.service
service xpl-loungeScreen start

Reboot and check:

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