I've just set up a shiny new Pi B+ as a web kiosk, using kweb3. Following the various instructions around the place, I finally added the line "xinit /home/pi/kiosk" to rc.local to boot the Pi into the web browser when it powers up. This all works brilliantly.
Until now, I've been connecting to the Pi (via SSH) using a wireless LAN adapter. This has also worked fine, until I added that line to rc.local; now, the Pi boots OK, goes to the kiosk, but it doesn't connect to the network. If I plug a LAN cable in, it's all great. From an SSH console, I see that wlan0 is there but hasn't got an IP address. I can do sudo ifdown wlan0 then sudo ifup wlan0, and after about 2 seconds, wlan0 gets an IP address & I can, once again, access the network.
Any ideas what I'm doing wrong? Do I need to stick a delay in the boot script to give wlan0 time to come up, before it fires up the X server?
My kiosk file is as follows:
Code: Select all
#!/bin/sh
xset -dpms
xset s off
xset s noblank
unclutter &
matchbox-window-manager &
kweb3 -JEKHCA+-zbhrqfpoklgtjneduwxy http://my.url/here
Code: Select all
#!/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/pi/kiosk &
exit 0Cheers!
Ade.