piu_wrapp 1.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051
  1. #!/bin/bash
  2. #
  3. # Copyright (c) 2021 Clementine Computing LLC.
  4. #
  5. # This file is part of PopuFare.
  6. #
  7. # PopuFare is free software: you can redistribute it and/or modify
  8. # it under the terms of the GNU Affero General Public License as published by
  9. # the Free Software Foundation, either version 3 of the License, or
  10. # (at your option) any later version.
  11. #
  12. # PopuFare is distributed in the hope that it will be useful,
  13. # but WITHOUT ANY WARRANTY; without even the implied warranty of
  14. # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  15. # GNU Affero General Public License for more details.
  16. #
  17. # You should have received a copy of the GNU Affero General Public License
  18. # along with PopuFare. If not, see <https://www.gnu.org/licenses/>.
  19. #
  20. # meant to be called from `/etc/rc.local` via a `startx` call. e.g.:
  21. #
  22. # ( sleep 5 && su -c "/usr/bin/startx /home/bus/bin/piu_wrapp 2>&1 /tmp/piu_wrapp.log" ) &
  23. #
  24. export BASEDIR=/home/pi
  25. export DISPLAY=:0
  26. /usr/bin/matchbox-window-manager \
  27. -use_cursor no \
  28. -use_titlebar no &
  29. # turn off screensave/screen blanking
  30. #
  31. xset s noblank
  32. xset s off
  33. xset -dpms
  34. unclutter -idle 0.05 -root &
  35. rm -f /tmp/kiosk.info
  36. touch /tmp/kiosk.info
  37. echo "DISPLAY=$DISPLAY" >> /tmp/kiosk.info
  38. echo "XAUTHORITY=$XAUTHORITY" >> /tmp/kiosk.info
  39. sleep 1
  40. /home/bus/bin/piu_app > /tmp/piu_app.log 2>&1