I am trying to start the Midori web browser on Raspberry Pi, on boot. These are the steps I've followed so far:

  1. I have edited the .bashrc file from the root folder using this command:

    sudo nano /home/pi/.bashrc
  2. Added the following line at the end of the file.

    midori -e Fullscreen -a http://www.google.com
  3. I restarted Raspberry Pi:

    sudo reboot

It does not open the browser, on boot. However, if I manually click on Terminal, it opens the browser.

I have added the below lines in the autostartup file.

# Auto run the browser
@xset s off
@xset -dpms
@xset s noblank
@midori -e Fullscreen -a http://google. 

But it did not open the browser with this code when I restarted the Raspberry Pi.

  • 2
    As you are booting into the GUI bash is not started so .bashrc is not used. When you open a terminal a new bash shell is started and .bashrc is run. What OS are you using?
    – rob
    Jan 13, 2015 at 13:31
  • Do you want it to go straight to the browser without anyone logging in, or do you want the browser to start when a user logs in?
    – goldilocks
    Jan 13, 2015 at 13:43
  • I want it to directly go the browser with out log in.
    – Fayaz
    Jan 13, 2015 at 13:55
  • I am using Raspbian Debian Wheezy Kernel version:3.12 . And also I have updated Raspberry pi by using the command. sudo apt-get update
    – Fayaz
    Jan 13, 2015 at 13:57
  • What you want is called a kiosk. That's possible, but a little complicated to set up: raspberrypi.stackexchange.com/a/9692/5538
    – goldilocks
    Jan 13, 2015 at 14:12

4 Answers 4


I got the solution. In new versions it is not supported in this autostart file:

sudo nano /etc/xdg/lxsession/LXDE/autostart

I changed the code to the below autostart file.

sudo nano /etc/xdg/lxsession/LXDE-pi/autostart

There is a nice autostart guide that explains how to setup the


file to autostart Midori when the Pi boots into X.

Let us know how you get on.

  • I have folled the steps given in autostart guide
    – Fayaz
    Jan 13, 2015 at 13:40
  • I have folled the steps given in autostart guide. But this time it is not opening the browser even if I run the terminal
    – Fayaz
    Jan 13, 2015 at 13:47

move to directory

cd /home/pi/.config/autostart/

create new file midori.desktop

sudo nano midori.desktop

and add this lines

[Desktop Entry]
Comment=Browse the World Wide Web
GenericName=Web Browser
Exec=midori -e Fullscreen -a http://www.google.com

I tried all the mentioned methods and they did not work for me. It is noteworthy that epiphany outperforms midori in many aspects. To use epiphany, I tried this:

nano ~/.config/lxsession/LXDE-pi/autostart

the content of this file is like this:

@lxpanel --profile LXDE-pi
@pcmanfm --desktop --profile LXDE-pi
@xscreensaver -no-splash
@sh ${HOME}/.config/lxsession/LXDE-pi/autokey.sh

So, in order to ask epiphany to open on boot just add this line to the end of this file.

epiphany --display=:0 http://google.com

To prevent Raspberry to go on screen saver mode, add the following line in /etc/lightdm/lightdm.conf under [SeatDefaults] section. xserver-command=X -s 0 -dpms

That's all.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.