1

Я сделал скрипт под названием starter.sh:

#!/bin/bash

while true; do
sudo fluxbox & 

sudo -u pi epiphany-browser -a --profile ~/.config http://localhost/index.php &
sleep 2s

done;

Который запускается в /etc/rc.local:

#!/bin/sh -e
#
# rc.local
#
# This script is executed at the end of each multiuser runlevel.
# Make sure that the script will "exit 0" on success or any other
# value on error.
#
# In order to enable or disable this script just change the execution
# bits.
#
# By default this script does nothing.

# Print the IP address
_IP=$(hostname -I) || true
if [ "$_IP" ]; then
  printf "My IP address is %s\n" "$_IP"
fi

sudo  xinit /home/lustron/Lustron/starter.sh - :0 -nocursor & 2>1  &
sleep 5s
sudo  python /home/lustron/Lustron/sensor5.py  &


exit 0

В raspi-config я приказал RPi запускать только оболочку, а не X-сервер. Как я вижу, rc.local не загружается во время запуска RPi. когда я выполняю /etc/rc.local вручную с

sudo sh /etc/rc.local

Я получаю много ошибок:

_XSERVTransSocketOpenCOTSServer: Unable to open socket for inet6
_XSERVTransOpen: transport open failed for inet6/Lustron:0
_XSERVTransMakeAllCOTSServerListeners: failed to open listener for inet6

X.Org X Server 1.12.4
Release Date: 2012-08-27
X Protocol Version 11, Revision 0
Build Operating System: Linux 3.2.0-2-mx5 armv7l Debian
Current Operating System: Linux Lustron 4.0.8+ #805 PREEMPT Thu Jul 16 18:09:07 BST 2015 armv6l
Kernel command line: dma.dmachans=0x7f35 bcm2708_fb.fbwidth=1024 bcm2708_fb.fbheight=1280 bcm2708.boardrev=0x10 bcm2708.serial=0x92f55424 smsc95xx.macaddr=B8:27:EB:F5:54:24 bcm2708_fb.fbswap=1 bcm2708.disk_led_gpio=47 bcm2708.disk_led_active_low=0 sdhci-bcm2708.emmc_clock_freq=250000000 vc_mem.mem_base=0x1ec00000 vc_mem.mem_size=0x20000000  dwc_otg.lpm_enable=0 console=ttyAMA0,115200 console=tty1 root=/dev/mmcblk0p2 rootfstype=ext4 elevator=deadline rootwait
Build Date: 11 February 2015  09:31:17PM
xorg-server 2:1.12.4-6+deb7u6 (Julien Cristau <jcristau@debian.org>)
Current version of pixman: 0.33.1
        Before reporting problems, check http://wiki.x.org
        to make sure that you have the latest version.
Markers: (--) probed, (**) from config file, (==) default setting,
        (++) from command line, (!!) notice, (II) informational,
        (WW) warning, (EE) error, (NI) not implemented, (??) unknown.
(==) Log file: "/var/log/Xorg.0.log", Time: Sun Jul 26 16:12:48 2015
(==) Using system config directory "/usr/share/X11/xorg.conf.d"
FATAL: Module g2d_23 not found.
The XKEYBOARD keymap compiler (xkbcomp) reports:
> Warning:          Type "ONE_LEVEL" has 1 levels, but <RALT> has 2 symbols
>                   Ignoring extra symbols
Errors from xkbcomp are not fatal to the X server
Failed to read: session.ignoreBorder
Setting default value
Failed to read: session.forcePseudoTransparency
Setting default value
Failed to read: session.colorsPerChannel
Setting default value
Failed to read: session.doubleClickInterval
Setting default value
Failed to read: session.tabPadding
Setting default value
Failed to read: session.styleOverlay
Setting default value
Failed to read: session.slitlistFile
Setting default value

(И так далее, и так далее.)

(...)

Failed to read: session.screen0.windowPlacement
Setting default value
BScreen::BScreen: an error occured while querying the X server.
        another window manager already running on display:0
Error: Couldn't find screens to manage.
Make sure you don't have another window manager running.

** (epiphany-browser:2973): WARNING **: Error retrieving accessibility bus address: org.freedesktop.DBus.Error.ServiceUnknown: The name org.a11y.Bus was not provided by any .service files
Failed to read: session.ignoreBorder

Помогите, пожалуйста! Как заставить это работать (чтобы автоматически запускать прозрение в режиме киоска, я знаю, что могу использовать

while true; do
 sudo matchbox-window-manager -use_cursor no -use_titlebar no &
 sudo -u lustron epiphany-browser -a --profile ~/.config http://localhost/index.php
 sleep 2s
done;

в starter.sh, но он не работает из-за этой проблемы с X-сервером.

0