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 -
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.@JonB
And to add to what @Pablo-J-Rogina is suggesting, might it to be that wherever from yourrc.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? -
I would suggest going to
~/.config/lxsession/LXDE-pi/autostart
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.