Skip to content

Instructions

Luis Yanes edited this page Jun 26, 2018 · 5 revisions

Instructions

How to setup the rbpi for Kiosk mode

Install nodejs

curl -sL https://deb.nodesource.com/setup_10.x | sudo -E bash -

sudo apt install -y nodejs

Configure the autostart of the rbpi

Edit the file ~/.config/lxsession/LXDE-pi/autostart

@chromium-browser --kiosk http://localhost:3000
@xset s noblank
@xset s off
@xset -dpms

Add to the file /etc/lightdm/lightdm.conf

xserver-command= X -s 0 -dpms

Download the code to control the arduino and run the gui

mkdir ~/workspace

cd ~/workspace

git clone https://github.com/phenotipi/speedseed3

Install nodejs dependencies

cd speedseed3/Software/backend

npm install

cd ../gui

npm install

Create /etc/systemd/system/ss3_backend.service with the following content

[Service]
WorkingDirectory=/home/pi/workspace/speedseed3/Software/backend
ExecStart=/usr/bin/npm start
Restart=always
StandardOutput=syslog
StandardError=syslog
SyslogIdentifier=ss3_backend
User=pi
Group=pi
Environment=NODE_ENV=production PORT=3001 mongoserver=<IPADDRESS>

[Install]
WantedBy=multi-user.target

Create the file /etc/systemd/system/ss3_gui.service

[Service]
WorkingDirectory=/home/pi/workspace/speedseed3/Software/gui
ExecStart=/usr/bin/npm start
Restart=always
StandardOutput=syslog
StandardError=syslog
SyslogIdentifier=ss3_gui
User=pi
Group=pi
Environment=NODE_ENV=production

[Install]
WantedBy=multi-user.target

Install the service files in the system startup services

sudo systemctl enable ss3_backend

sudo systemctl enable ss3_gui

Clone this wiki locally