Difference between revisions of "Install Canvas"
(Created page with "A [https://www.raspberrypi.org/ Raspberry Pi] can easily serve 4 K high definition images (3840 x 2160 pixels) to a TV screen or a computer monitor. The sys...") |
(→Base installation) |
||
Line 23: | Line 23: | ||
* the [[Install dawnDusk|dawn/dusk messenger]] | * the [[Install dawnDusk|dawn/dusk messenger]] | ||
− | + | = Install xPL picture frame = | |
+ | |||
+ | Download the [http://www.dspc.ch/xPL/Downloads/xpl-canvas.pl 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 [https://wiki.debian.org/systemd systemd] (such as [https://www.raspbian.org/ Raspbian]), | ||
+ | the scripts can be defined as services. | ||
+ | |||
+ | Edit <code>/lib/systemd/system/xpl-loungeScreen.service</code>: | ||
+ | [Unit] | ||
+ | Description=lounge Sony Bravia screen control | ||
+ | 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 | ||
+ | |||
+ | |||
+ | [[Category: all]] [[Category: install]] [[Category:xPL]] |
Revision as of 11:23, 19 March 2019
A Raspberry Pi can easily serve 4 K 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.
Contents
[hide]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:
- the hub
- the clock ticker
- the dawn/dusk messenger
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-loungeScreen.service
:
[Unit] Description=lounge Sony Bravia screen control 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