2

Hi sorry for the answer I´m very inexperienced in Raspbian, just started to use the pi a few weeks ago, I need to start an app developed with Qt in C++, it has a GUI, this app has strict timing requirements so I need to get rid of all the overhead of the graphic interface of Raspbian. So the question is how can I start only this app on startup. Please excuse my english, it's not my mother tongue.

Fabian
  • 1,288
  • 1
  • 10
  • 19

2 Answers2

1

As @eftshift0 suggested in his answer I would also start with Raspbian Stretch Lite 2018-03-13. On this minimal platform you can get your application to run with installing just the minimal required packets. For example you can install the integrated development environment (IDE) for Qt with all its dependencies (150 additional packets):

rpi3 ~$ sudo apt install qtcreator
[...]
0 upgraded, 150 newly installed, 0 to remove and 0 not upgraded.
Need to get 231 MB of archives.
After this operation, 802 MB of additional disk space will be used.

If you get your application running start it with an optimized service for systemd. systemd is starting services parallel so with smart selected dependencies Before and After starting just needed services you should be able to start your application as fast as possible. Here I have made a simple test service in an other context but it may give you an idea how it works.

Ingo
  • 42,961
  • 20
  • 87
  • 207
0

instead of trying the GUI-based distros for raspberry pi I think you should try the ones that are based on terminal and then install the x server (or wayland... not sure of which one is supported on raspberry) plus the dependencies to start your application. You could write a script that does two things (this would have worked a few years ago with X server.... would have to give it a test these days to see if it still holds water):

startx &
wait a couple of seconds to make sure that X is working
export DISPLAY=:0.0
start_your_application

Talking about X server, you have to make sure than X is configured to accept tcp connections and that should be enough. If it's wayland, I'm not sure of how exactly it would work but it should be something similar.

Then you could set up this script to be started with systemd on boot, which is a whole different topic.

eftshift0
  • 800
  • 1
  • 7
  • 13