- ) First make sure to install chromium browser, incase its not installed. Install chromium with following command .
sudo apt-get install chromium -yNOTE: In some cases, the browser name might be chromium-browser, so try with (sudo apt-get install chromium-browser -y).
- ) Installation of tool needed for browser synching, named xdotool .
sudo apt install xdotool
..............................................................................................................................................................
- ) You have three files named, swapPre.sh , swapMain.sh and stationRpi . Place them in some safe folder accordingly.
- ) After placements of both file in folder, run this command to make it executable.
chmod +x swapPre.sh && chmod +x swapMain.sh
- ) After this, open swapPre.sh in editor mode :-
sudo nano swapPre.sh- ) Now edit 19th line where cron_command is placed, provide full/absolute path of swapMain.sh, for example :
cron_command="/home/XYZ/Desktop/SwappingPackages/swapMain.sh"- ) Now check whether chromium browser process name is chromium or chromium-browser. It can be done with tapping TAB button after typing chromium in terminal.
- ) If in case the browser name is chromium-browser swap 6th line with bottom one where string="@chromium-browser --kiosk http://batswap.electrifuel.com:3000" is mentioned. It should look like this.
# string="@chromium --kiosk http://batswap.electrifuel.com:3000"
string="@chromium-browser --kiosk http://batswap.electrifuel.com:3000"- ) Now, edit swapMain.sh as well provide the absolute path for stationRpi and proper station ID, organisation ID and rack ID in 16th line.
..............................................................................................................................................................
- ) Now run command .
./swapPre.sh- ) Above commands updates the chromium to run at startup and add swapMain.sh to crontab. To check the consistency of these two steps, run the following command
cat /etc/xdg/autostart/nm-applet.desktop && echo ---------- && crontab -l- ) After ensuring all the data, simply reboot the system with command.
rebootFor support, email ritik.sangwan@electrifuel.com or call me at +919050536764