Script personalizado em /etc/rc.local - não iniciando corretamente o X

1

Eu fiz um script chamado starter.sh:

#!/bin/bash

while true; do
sudo fluxbox & 

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

done;

Que é iniciado em /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

Em raspi-config, ordenei que o RPi iniciasse apenas um shell, não um servidor X. Como eu posso ver, o rc.local não está sendo carregado durante o início do RPi. quando executo /etc/rc.local manualmente com

sudo sh /etc/rc.local

Recebo muitos erros:

_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 <[email protected]>)
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

(E assim por diante e assim por diante.)

(...)

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

Ajuda por favor! Como faço para que funcione (para iniciar automaticamente um epifania no modo de quiosque, sei que posso usar

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;

no starter.sh, mas não está funcionando por causa desse problema no servidor X.

    
por tarzanno 26.07.2015 / 16:21

0 respostas