Hi all,
I've been tasked a small project... A sales office wants to use a Pi as a information dashboard up on the wall which involves it just displaying a webpage hosted locally.
I need the Pi to automatically boot, open a browser full screen (F11 stylee) and point to a page.
I would be very grateful for any input!
Mike.
Auto open browser on boot
14 posts
- Posts: 4
- Joined: Wed Jun 13, 2012 12:54 pm
To launch a command automatically on login, put the command into a file named
.bashrc
in the user directory (for example /home/pi)
For example, the file could contain
chromium-browser --kiosk www.google.com
to launch Chromium in full-screen pointed to www.google.com
.bashrc
in the user directory (for example /home/pi)
For example, the file could contain
chromium-browser --kiosk www.google.com
to launch Chromium in full-screen pointed to www.google.com
- Posts: 1413
- Joined: Tue Jan 17, 2012 2:38 pm
fantastic, worked a treat 
Thank you!
Thank you!
- Posts: 4
- Joined: Wed Jun 13, 2012 12:54 pm
PM received thanks Bredman, it wont let me reply as I assume i'm a new user. Will keep you posted.
- Posts: 4
- Joined: Wed Jun 13, 2012 12:54 pm
exactly what I need as well!, possible to disable mouse courser from the system completely? I can use all keyboard commands and this would remove it from showing up onscreen when restarted. Thanks for any help!
- Posts: 32
- Joined: Tue Jul 31, 2012 11:33 pm
Frankly your best bet would be to install openbox and have openbox open the bowser for you. this would give you a fullscreen webbrowser with NOTHING else. no statusbar, no time, no startmenu, nothing but the browser.
and then make a openbox config file with
Then edit the autostart to openthe browser at boot
remove all the code and past this in:
that will make it run with fewer options auto resetting after 2 minutes inactivity
- Code: Select all
sudo aptitude install openbox obconf obmenu
and then make a openbox config file with
- Code: Select all
mkdir -p ~/.config/openbox && cp /etc/xdg/openbox/* ~/.config/openbox
Then edit the autostart to openthe browser at boot
- Code: Select all
nano ~/.config/openbox/autostart
remove all the code and past this in:
- Code: Select all
# Autostart script
#will sleep to make sure everything else loads
sleep 5s && midori --inactivity-reset=120 -e Fullscreen --app=/PATH/TO/HOMEPAGE/FILE.html
that will make it run with fewer options auto resetting after 2 minutes inactivity
echo "Something Useful" > /dev/null
bredman wrote:To launch a command automatically on login, put the command into a file named
.bashrc
in the user directory (for example /home/pi)
For example, the file could contain
chromium-browser --kiosk http://www.google.com
to launch Chromium in full-screen pointed to http://www.google.com
Chromium is MUCH to slow to browse comfortably on the pi,especially with lxde overhead which you do not need. you WILL see speed increases with openbox/midori!
echo "Something Useful" > /dev/null
To launch a command automatically on login, put the command into a file named
.bashrc
in the user directory (for example /home/pi)
For example, the file could contain
chromium-browser --kiosk www.google.com
to launch Chromium in full-screen pointed to www.google.com
I have done this but it does not recognise chromium-browser.... I changed it to simply chromium instead but I get the error (chromium:2100): Gtk-WARNING **: cannot open display:
If I set the pi to boot in to the GUI on startup then it gets to the GUI without opening chromium but if I try to open the terminal suddenly the pi starts chromium in kiosk mode.......
What am I doing wrong?
- Posts: 8
- Joined: Tue Jan 08, 2013 9:48 am
Try putting the following line just before the one invoking your browser.
export DISPLAY=:1
The line you had which created an error is probably the right command. I am not sure whether 1 is the right display number, but I have the above line in my .bashrc on a host box I VNC into, so I can start GUI apps from command line when I want to.
Since it is coming back with :2100 in your error message, you might try display number :0
Also, I would be concerned about starting the app from your .bashrc and not ending the line with an ampersand so that .bashrc can finish any other things you might place there in addition, after calling the browser. Otherwise, .bashrc will not close until you close chromium.
export DISPLAY=:1
The line you had which created an error is probably the right command. I am not sure whether 1 is the right display number, but I have the above line in my .bashrc on a host box I VNC into, so I can start GUI apps from command line when I want to.
Since it is coming back with :2100 in your error message, you might try display number :0
Also, I would be concerned about starting the app from your .bashrc and not ending the line with an ampersand so that .bashrc can finish any other things you might place there in addition, after calling the browser. Otherwise, .bashrc will not close until you close chromium.
FORUM TIP: To view just one person's posting history, sign in, click on their user name, then click on "Search User's Posts." || This Pi owner is running Arch on 512MB Model B.
- Posts: 874
- Joined: Fri Mar 16, 2012 5:20 am
- Location: California
I have tried export DISPLAY=:1 and export DISPLAY=:0
Both give me the error "Cannot open display:1" or "Cannot open display:0"
Both give me the error "Cannot open display:1" or "Cannot open display:0"
- Posts: 8
- Joined: Tue Jan 08, 2013 9:48 am
coolblue2000 wrote:I have tried export DISPLAY=:1 and export DISPLAY=:0
Both give me the error "Cannot open display:1" or "Cannot open display:0"
I hope somebody can solve that, I get the same thing when I try to open a VNC server on my Pi, so do not know the answer at this point.
FORUM TIP: To view just one person's posting history, sign in, click on their user name, then click on "Search User's Posts." || This Pi owner is running Arch on 512MB Model B.
- Posts: 874
- Joined: Fri Mar 16, 2012 5:20 am
- Location: California
Ok, I have got it working. It seems you can't start chromium from bash as it there is no gui so fails.
I got chromium to start on boot by adding "@chromium --kiosk www.bbc.co.uk" to the "autostart" file in /etc/xdg/lxsession/LXDE/
One problem though.....
On my home pi this works fine (not going through a proxy at home), however on the one at work chromium complains that it can not connect to the proxy server.
The proxy is setup on the pi and if I start Chromium from the desktop it works fine, also if I start chromium from terminal using "Chromium --kiosk www.bbc.co.uk" it also works fine.
Why is it complaining about the proxy server when it is started from the autostart file? And is there a way to specify the proxy in the "@chromium --kiosk www.bbc.co.uk" line?
Also if I autostart with the following line @chromium www.bbc.co.uk
ie not in kiosk mode so I have access to the menus, the same thing happens, but if I click refresh it works fine.... So it looks like a timing issue possibly?
If I use @chromium --proxy-auto-detect www.bbc.co.uk I no longer get the proxy server error, however I get a webpage not available error instead. If I refresh it works fine.....
Do I need to somehow pause the execution of chromium for a few seconds in order for the desktop to catch up? If so how do I do this in the autostart file?
I got chromium to start on boot by adding "@chromium --kiosk www.bbc.co.uk" to the "autostart" file in /etc/xdg/lxsession/LXDE/
One problem though.....
On my home pi this works fine (not going through a proxy at home), however on the one at work chromium complains that it can not connect to the proxy server.
The proxy is setup on the pi and if I start Chromium from the desktop it works fine, also if I start chromium from terminal using "Chromium --kiosk www.bbc.co.uk" it also works fine.
Why is it complaining about the proxy server when it is started from the autostart file? And is there a way to specify the proxy in the "@chromium --kiosk www.bbc.co.uk" line?
Also if I autostart with the following line @chromium www.bbc.co.uk
ie not in kiosk mode so I have access to the menus, the same thing happens, but if I click refresh it works fine.... So it looks like a timing issue possibly?
If I use @chromium --proxy-auto-detect www.bbc.co.uk I no longer get the proxy server error, however I get a webpage not available error instead. If I refresh it works fine.....
Do I need to somehow pause the execution of chromium for a few seconds in order for the desktop to catch up? If so how do I do this in the autostart file?
- Posts: 8
- Joined: Tue Jan 08, 2013 9:48 am
I know everything about nothing"
- Posts: 982
- Joined: Fri Sep 14, 2012 9:13 am
Super-Nathan wrote:Frankly your best bet would be to install openbox and have openbox open the bowser for you. this would give you a fullscreen webbrowser with NOTHING else. no statusbar, no time, no startmenu, nothing but the browser.
- Code: Select all
sudo aptitude install openbox obconf obmenu
and then make a openbox config file with
- Code: Select all
mkdir -p ~/.config/openbox && cp /etc/xdg/openbox/* ~/.config/openbox
Then edit the autostart to openthe browser at boot
- Code: Select all
nano ~/.config/openbox/autostart
remove all the code and past this in:
- Code: Select all
# Autostart script
#will sleep to make sure everything else loads
sleep 5s && midori --inactivity-reset=120 -e Fullscreen --app=/PATH/TO/HOMEPAGE/FILE.html
that will make it run with fewer options auto resetting after 2 minutes inactivity
I am working on a similar project.
I tried this, but it doesn't launch at startup.
and If I say "startx" after logging in, it starts the default GUI
can I skip login and just directly into the browser?
Tx.
Steve
- Posts: 4
- Joined: Thu Jan 31, 2013 11:08 am