3

I wanted to run a self made application based on C++ and opencv when I power on my Pi. My application is controlling the GPIO ports as well thus needs to be run as root. Followed a few articles in parts because all the methods of a perticular article were not working. 1) To auto log in and auto start Pi I have followed this article http://www.opentechguides.com/how-to/article/raspberry-pi/5/raspberry-pi-auto-start.html

2) I copied my application into the ./bin folder

3) To autostart the LXDE terminal and to auto run my application i used the following link http://www.raspberrypi-spy.co.uk/2014/05/how-to-autostart-apps-in-rasbian-lxde-desktop/ After doing all this I rebooted my pi but got stuck at boot with the following error

First I get a blank screen and for a second my Pi-Cam's Led glows then nothing at all then I'll need Ctrl+Alt+F1 to get the above screen. I cannot log into my pi. I tried Ctrl+C, Exit etc but nothing works.

  • 3rd link that you provided should work. ie, Add the program in LXDE-pi/autostart file. Here is an example : "@sudo /path/to/application" Please also have a look at paths in your application. They should be absolute paths and not relative. – dhruvvyas90 Jun 22 '15 at 7:19
  • Yea that worked for a couple of times on power on but once i rebooted my pi it didnt – Ayesha Khan Jun 22 '15 at 7:23
  • How did you check it if it worked without rebooting ? – dhruvvyas90 Jun 22 '15 at 7:25
  • Also, it seems like you're running an old raspbian. I'm not sure if LXDE-pi existed back then. – dhruvvyas90 Jun 22 '15 at 8:35
  • Actually the problem right now is I'm unable to even log into my pi. I'm getting the above output and nothings working – Ayesha Khan Jun 22 '15 at 10:54
0

The message FATAL: Module g2d_23 not found. is not a problem based on this Raspberry Pi forum post.

I looked at the Auto Login and Auto Start in Raspberry Pi instructions you linked to and think you should undo the steps in the Auto Login section that have you modify /etc/inittab. Once you do this I think you'll be able to login again.

The steps under Auto Start the Desktop (LXDE) should get the RPi to boot to a graphical interface.

From there, I have used these instructions to get a program running automatically on boot. I believe the pertinent steps for this are 4. Start Browser on Boot.

First install the following packages:

sudo apt-get install x11-xserver-utils unclutter

Then edit the following file:

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

To disable the screensaver add the comment mark at the beginning of this line:

# @xscreensaver -no-splash

These lines will disable power saving interface features:

# Turn off screensaver
@xset s off

# Turn off power saving
@xset -dpms

# Disable screen blanking
@xset s noblank

# Hide the mouse cursor
@unclutter

And finally, add the line to start your program; something like:

@/home/pi/bin/your_program

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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