pema
Posts: 12
Joined: Tue Feb 09, 2016 10:49 am

Open browser at boot in latest jessie image.

Tue Mar 08, 2016 4:58 pm

Hej.
Can someone please guide me how to boot to web browser, preferably epiphany, in latest Jessie image ? I kindly request you verify suggested method before posting. I confirm I followed correct syntax, not even leafpad can be started. Below is a list of a few things I've tried. My backup plan would be to get a old Jessie image from mid 2015 that probably works, where can old images be found ?

http://www.raspberry-projects.com/pi/pi ... on-startup
viewtopic.php?t=78767&p=559903
viewtopic.php?t=99782&p=692262
viewtopic.php?t=107835&p=742373
viewtopic.php?t=109099&p=754590
viewtopic.php?t=8298&p=210611

/pema

pema
Posts: 12
Joined: Tue Feb 09, 2016 10:49 am

Re: Open browser at boot in latest jessie image.

Tue Mar 08, 2016 5:00 pm

I probably should inform Ive tried both Jessie lxde, openbox and matchbox. Jessie images tried is versions 2016 February.

fruitoftheloom
Posts: 23132
Joined: Tue Mar 25, 2014 12:40 pm
Location: Delightful Dorset

Re: Open browser at boot in latest jessie image.

Tue Mar 08, 2016 5:04 pm

Kweb has kiosk mode: viewtopic.php?t=40860
Rather than negativity think outside the box !
RPi 4B 4GB (SSD Boot)..
Asus ChromeBox 3 Celeron is my other computer...

stderr
Posts: 2178
Joined: Sat Dec 01, 2012 11:29 pm

Re: Open browser at boot in latest jessie image.

Tue Mar 08, 2016 7:38 pm

pema wrote:I probably should inform Ive tried both Jessie lxde, openbox and matchbox. Jessie images tried is versions 2016 February.
And starting X apps at start up of X is impossible under those desktops? I think that is unlikely because most desktops have a means of starting up applications when the desktop is started.

gkreidl
Posts: 6307
Joined: Thu Jan 26, 2012 1:07 pm
Location: Germany

Re: Open browser at boot in latest jessie image.

Wed Mar 09, 2016 5:19 am

It can be easily done using xinit and a small script which starts a window manager (openbox or matchbox) and the application, e. g.

Code: Select all

#!/bin/sh
openbox --config-file ~/.config/openbox/LXDE-rc.xml --startup epiphany-browser
Save this as "kiosk" (for example) in the root of your user directory and make it executable. Start it from the command line with

Code: Select all

xinit ./kiosk
Booting into it is a bit more difficult than on wheezy. I still use rc.local, but have to insert a "sleep 10" (or more) command, because rc.local is started too early in the boot process by systemd. Add something like this to rc.local (just before "exit 0")

Code: Select all

sleep 10
su -l pi -c "xinit ./kiosk"
There may be better ways but I haven't studied systemd yet.
Minimal Kiosk Browser (kweb)
Slim, fast webkit browser with support for audio+video+playlists+youtube+pdf+download
Optional fullscreen kiosk mode and command interface for embedded applications
Includes omxplayerGUI, an X front end for omxplayer

pema
Posts: 12
Joined: Tue Feb 09, 2016 10:49 am

Re: Open browser at boot in latest jessie image.

Thu Mar 10, 2016 8:55 am

Dear Gunther. I have tried your kiosk browser and can not get it to work. Im personally convinced this worked very well in older versions of Jessie but something was improved and nothing that used to work is not working in recent versions. I will now remove the raspberry as this is a dead end.

gkreidl
Posts: 6307
Joined: Thu Jan 26, 2012 1:07 pm
Location: Germany

Re: Open browser at boot in latest jessie image.

Thu Mar 10, 2016 10:49 am

pema wrote:Dear Gunther. I have tried your kiosk browser and can not get it to work. Im personally convinced this worked very well in older versions of Jessie but something was improved and nothing that used to work is not working in recent versions. I will now remove the raspberry as this is a dead end.
This is working very well for me on latest Raspbian Jessie and for tens of thousands of other users. Most of them won't boot into a browser environment, though, but I do, as I'm using it as a desktop replacement.
I'm not sure, where your problems are, but you should always do something like this in single steps.
First create a "kiosk" file and try to start it with
xinit ./kiosk
after booting to the command line.
If that works, you can add it to rc.local, trying different values for the sleep command.
I have been using such a solution for more than 3 years now and it has survived the upgrade to Jessie by adding the sleep command. And I know from my support work that lots of developers of embedded applications are using it in a similar way.

If you need help, we need a description of what you have been doing and of what is going wrong. "I can not get it to work" doesn't tell me anything.
Minimal Kiosk Browser (kweb)
Slim, fast webkit browser with support for audio+video+playlists+youtube+pdf+download
Optional fullscreen kiosk mode and command interface for embedded applications
Includes omxplayerGUI, an X front end for omxplayer

rogerggbr
Posts: 4
Joined: Sun Mar 06, 2016 11:02 pm

Re: Open browser at boot in latest jessie image.

Thu Mar 10, 2016 7:53 pm

New owner here - trying to achieve the same thing. I understand that chromium is no longer
supported but I have got kweb to work.
Exactly as advised by gkreidl, I put a small script in my home folder, called by adding it to the autostart file (/home/pi/.config/lxsession/LXDE-pi by default):-

Code: Select all

echo "Kiosk Running"
@lxpanel --profile LXDE-pi
@pcmanfm --desktop --profile LXDE-pi
# @xscreensaver -no-splash // commented out
xset -dpms
xset s off
@./kiosk
The contents of kiosk are:-

Code: Select all

#!/bin/sh
export DISPLAY=:0.0
kweb -JKAEr https://web site address & > /dev/null
while true; do
sleep 5m
WID=$(xdotool search --onlyvisible --class kweb)
xdotool windowactivate $WID key alt+r
done
Hope this helps someone else with the latest version.

Reini1000
Posts: 35
Joined: Wed Apr 20, 2016 8:30 am
Location: Germany

Re: Open browser at boot in latest jessie image.

Wed Apr 20, 2016 1:37 pm

how on earth can i autostart the Kweb Browser automatically without entering the Desktop? So that the user will only see the Webpage.

I have tried all methods which are described here, also I have read the Kweb manuals, but nothing works! :|

I'm using the latest Jessie Image 3rd March 2016.

Please help me !!!!

gkreidl
Posts: 6307
Joined: Thu Jan 26, 2012 1:07 pm
Location: Germany

Re: Open browser at boot in latest jessie image.

Wed Apr 20, 2016 2:41 pm

Reini1000 wrote:how on earth can i autostart the Kweb Browser automatically without entering the Desktop? So that the user will only see the Webpage.

I have tried all methods which are described here, also I have read the Kweb manuals, but nothing works! :|

I'm using the latest Jessie Image 3rd March 2016.

Please help me !!!!
First step: create a kiosk file in your home directory (You'll find examples in the kweb manual) and make it executable.
Set your RPI to boot to the command line (without asking for a password) .
Run xinit ./kiosk
(if kiosk is the name of your kiosk file) from the command line. If this works, add to /etc/rc.local (before the last line):
sleep 10
su -l pi -c "xinit ./kiosk"
Eventually you have to use a higher value for sleep.
Minimal Kiosk Browser (kweb)
Slim, fast webkit browser with support for audio+video+playlists+youtube+pdf+download
Optional fullscreen kiosk mode and command interface for embedded applications
Includes omxplayerGUI, an X front end for omxplayer

Reini1000
Posts: 35
Joined: Wed Apr 20, 2016 8:30 am
Location: Germany

Re: Open browser at boot in latest jessie image.

Wed Apr 20, 2016 2:55 pm

Hi, thank you !
the Script example from Kweb Manual works fine but only if I execute it with

Code: Select all

sudo xinit ./kiosk

it doesn't start automatically. I have change the raspi-config -> boot options-> console autologin
is that right ?

my /etc/rc.local file looks like:

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
sleep 15
su -l pi -c "xinit ./kiosk"
exit 0

gkreidl
Posts: 6307
Joined: Thu Jan 26, 2012 1:07 pm
Location: Germany

Re: Open browser at boot in latest jessie image.

Wed Apr 20, 2016 3:06 pm

Why sudo? You should never run it as root!
The kiosk file path must be:
/home/pi/kiosk
Minimal Kiosk Browser (kweb)
Slim, fast webkit browser with support for audio+video+playlists+youtube+pdf+download
Optional fullscreen kiosk mode and command interface for embedded applications
Includes omxplayerGUI, an X front end for omxplayer

Reini1000
Posts: 35
Joined: Wed Apr 20, 2016 8:30 am
Location: Germany

Re: Open browser at boot in latest jessie image.

Wed Apr 20, 2016 3:14 pm

okay it start also manually without sudo
but not automatically.

The file kiosk was produced by using
sudo nano /home/pi/kiosk
by using
sudo chmod +x kiosk
executable made.

Where is my mistake ?

gkreidl
Posts: 6307
Joined: Thu Jan 26, 2012 1:07 pm
Location: Germany

Re: Open browser at boot in latest jessie image.

Wed Apr 20, 2016 3:20 pm

sudo chown pi:pi /home/pi/kiosk
chmod a+x /home/pi/kiosk
(should not be owned by root)
Try
sleep 20
in rc.local
Minimal Kiosk Browser (kweb)
Slim, fast webkit browser with support for audio+video+playlists+youtube+pdf+download
Optional fullscreen kiosk mode and command interface for embedded applications
Includes omxplayerGUI, an X front end for omxplayer

Reini1000
Posts: 35
Joined: Wed Apr 20, 2016 8:30 am
Location: Germany

Re: Open browser at boot in latest jessie image.

Wed Apr 20, 2016 3:26 pm

Sorry not succesful, always end up in the command line doning nothing.

gkreidl
Posts: 6307
Joined: Thu Jan 26, 2012 1:07 pm
Location: Germany

Re: Open browser at boot in latest jessie image.

Wed Apr 20, 2016 5:46 pm

Reini1000 wrote:Sorry not succesful, always end up in the command line doning nothing.
Strange, all my PRis boot this way ...
Put an
echo "some text"
into rc.local and check if the message appears during boot.
Minimal Kiosk Browser (kweb)
Slim, fast webkit browser with support for audio+video+playlists+youtube+pdf+download
Optional fullscreen kiosk mode and command interface for embedded applications
Includes omxplayerGUI, an X front end for omxplayer

Reini1000
Posts: 35
Joined: Wed Apr 20, 2016 8:30 am
Location: Germany

Re: Open browser at boot in latest jessie image.

Thu Apr 21, 2016 6:21 am

I have tried it. The Text comes while booting.

Also it seems that the RPi tries to start the Kiosk script and is failing with the message

Code: Select all

X: user not authorized to run the X server, aborting.
seems that it tries to start the kiosk sricpt before login in with the pi user.

gkreidl
Posts: 6307
Joined: Thu Jan 26, 2012 1:07 pm
Location: Germany

Re: Open browser at boot in latest jessie image.

Thu Apr 21, 2016 6:50 am

Try using a long delay (just for testing)
sleep 60

As I already said, I boot all my RPis this way. It worked on Wheezy and all I had to do on Jessie was to add the delay (I also run a start script before starting XORG which mounts network drives etc.).

There may be better ways using systemd, but I haven't studied that yet.
Minimal Kiosk Browser (kweb)
Slim, fast webkit browser with support for audio+video+playlists+youtube+pdf+download
Optional fullscreen kiosk mode and command interface for embedded applications
Includes omxplayerGUI, an X front end for omxplayer

Reini1000
Posts: 35
Joined: Wed Apr 20, 2016 8:30 am
Location: Germany

Re: Open browser at boot in latest jessie image.

Thu Apr 21, 2016 7:00 am

I added i higher delay, that didin't work.
The rpi always try to start the xinit ./kiosk script before It is logged in.
Is there a other possiblity to autostart scripts ?

User avatar
RaTTuS
Posts: 10558
Joined: Tue Nov 29, 2011 11:12 am
Location: North West UK
Contact: Twitter YouTube

Re: Open browser at boot in latest jessie image.

Thu Apr 21, 2016 7:14 am

having booted
can you get into x from the command line
if so how do you do it [exactly what do you type]
How To ask Questions :- http://www.catb.org/esr/faqs/smart-questions.html
WARNING - some parts of this post may be erroneous YMMV

1QC43qbL5FySu2Pi51vGqKqxy3UiJgukSX
Covfefe

gkreidl
Posts: 6307
Joined: Thu Jan 26, 2012 1:07 pm
Location: Germany

Re: Open browser at boot in latest jessie image.

Thu Apr 21, 2016 7:22 am

You could also try the following:
su -l pi -c "xinit ./kiosk -- vt01"
Minimal Kiosk Browser (kweb)
Slim, fast webkit browser with support for audio+video+playlists+youtube+pdf+download
Optional fullscreen kiosk mode and command interface for embedded applications
Includes omxplayerGUI, an X front end for omxplayer

Reini1000
Posts: 35
Joined: Wed Apr 20, 2016 8:30 am
Location: Germany

Re: Open browser at boot in latest jessie image.

Thu Apr 21, 2016 7:24 am

When the Pi has booted to the console like this

Code: Select all

pi@raspberrypi:~ $

(not to desktop!)

i type:

Code: Select all

xinit ./kiosk
then the example script from the Kweb manual is running and opening the webpage.

User avatar
RaTTuS
Posts: 10558
Joined: Tue Nov 29, 2011 11:12 am
Location: North West UK
Contact: Twitter YouTube

Re: Open browser at boot in latest jessie image.

Thu Apr 21, 2016 7:26 am

at the end of .basrc
put
xinit ./kiosk

or more cleverly

if [ $(tty) == /dev/tty1 ]; then
xinit ./kiosk
fi

so it will only do it if logged on via terminal 1
How To ask Questions :- http://www.catb.org/esr/faqs/smart-questions.html
WARNING - some parts of this post may be erroneous YMMV

1QC43qbL5FySu2Pi51vGqKqxy3UiJgukSX
Covfefe

Reini1000
Posts: 35
Joined: Wed Apr 20, 2016 8:30 am
Location: Germany

Re: Open browser at boot in latest jessie image.

Thu Apr 21, 2016 7:27 am

gkreidl wrote:You could also try the following:
su -l pi -c "xinit ./kiosk -- vt01"
sorry, also not working... same problem with user rights.

Reini1000
Posts: 35
Joined: Wed Apr 20, 2016 8:30 am
Location: Germany

Re: Open browser at boot in latest jessie image.

Thu Apr 21, 2016 7:38 am

RaTTuS wrote:at the end of .basrc
put
xinit ./kiosk

or more cleverly

if [ $(tty) == /dev/tty1 ]; then
xinit ./kiosk
fi

so it will only do it if logged on via terminal 1
sorry were is the file located ?

what do if have to type?

sudo nano .....<filepath> ?

Return to “Troubleshooting”