Qt project run on raspberry pi boot

  • Re: run application on startup (raspberry PI)

    This is an old topic but I could not solve. I add the path and the run code on rc.local but pi does not start my application on boot. I copied the same path in home/pi/.bashrc file, this works when I click to terminal. How can I make my program to start on the boot of my raspberry pi?
    Thank you

  • @aysenur
    Assuming there is nothing at all Qt in this question, you may get answers by posing it outside of anything Qt on, say, stackoverflow.

  • @aysenur I agree with @JonB it looks like your issue is not related to Qt itself. However, just in case, have you tried starting a different application from rc.local (please use a GUI app...) to check what could be wrong?

  • @JonB
    And to add to what @Pablo-J-Rogina is suggesting, might it to be that wherever from your rc.local is too early to run a Qt if it is using a UI? By the time it gets to your ~/.bashrc file that's per user and you'll need & have a desktop, if you try to run it outside login the desktop might not be available or may not be allowed access?

  • Moderators

    I would suggest going to
    and add your application to that file.

    something like this:
    @sudo /path/to/QtApp

    works fine for me

  • Thank you for your suggestions. I asked here because many people solved the issue with rc.local for python. I tried @J.Hilk suggestion. This solved the problem. Thank you. I also asked in raspberrypi forum. From the replies ; systemd under etc forlder is for this purpose and creating a service would solve the problem.

Log in to reply