Nugget Post: Raspberry Pi: Auto starting a program on login
As part of our effort to use Raspberry Pis as SOC monitors, we eventually needed to make sure that on reboot, a browser automatically starts up showing the appropriate information. We cannot simply add this to /etc/rc.local or /home/pi/.bashrc, since there is no GUI to actually start the browser.
The solution is to add a line to the file : /etc/xdg/lxsession/LXDE/autostart
The code to add would be similar to this:
chromium --kiosk 'http://nagiosadmin:firstname.lastname@example.org/check_mk'
I purposely chose the above example to illustrate another trick: you can use the format “http://username:password@serverIP” to automatically login to a site using BASIC HTTP authentication
- Auto open browser on boot. http://www.raspberrypi.org/forums/viewtopic.php?t=8298&p=210611