Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have put the following line in my /etc/bash.bashrc file:


However I then get an error at start up:

(chromium:2100): Gtk-WARNING **: cannot open display:

If I set the Pi to boot into OS at startup, chromium never appears, but if I start a terminal window it suddenly opens chromium in kiosk mode and with the specified web page!

What am I doing wrong?

share|improve this question
Put that in you xinitrc. – Tom Wijsman Jan 15 '13 at 0:48
Which DE? If you're using Arch + Openbox, you could add it to the ~/.config/openbox/autostart, otherwise as @TomWijsman suggested, the ~/.xinitrc should work. I might put a (sleep 3 && command) & in there to wait for X to start. – nerdwaller Jan 15 '13 at 1:10
up vote 4 down vote accepted

anything in the /etc/bash.bashrc is run when a shell starts up (which doesnt have an xdisplay) - see What is .bashrc file? for more info. Try adding that line into the file that your desktop enviroment uses when it logs in the user.

If you are using lxde, which I assume,

and edit it to your specifiacitons: so it should look like:

[Desktop Entry] 


share|improve this answer
Thanks agovizer. Just to confirm what I did to get this to work. I added "@chromium --kiosk" to the autostart file in /etc/xdg/lxsession/LXDE/. It now boots into the desktop and then starts chromium in kiosk mode. It would be nice to never see the desktop, but that is just a minor gripe. Other than that it works as I need. – coolblue2000 Jan 15 '13 at 13:13

You could use "screenly" it actually can run in kiosk mode (using UZBL) and can even be interactive with a keyboard and mouse. (ability to lock to certain sites and block actions available as well). You could accomplish this easily though by simply scheduling a web asset to that URL. Screenly boots instantly never showing the desktop.

share|improve this answer

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .