Qt project run on raspberry pi boot
-
wrote on 4 May 2018, 13:11 last edited by
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 -
wrote on 4 May 2018, 14:28 last edited by
-
@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.wrote on 4 May 2018, 14:34 last edited by@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
-
wrote on 7 May 2018, 06:57 last edited by aysenur 5 Jul 2018, 10:50
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.
2/6