I am working with raspberry pi os lite on raspberry pi 4.
I wanted to autostart a Qt application.
I created under /etc/systemd/system
a .service file named application_one.service
this is what the .service file looks like
[Unit]
Description=Qt application autostart
After=graphical.target
After=network-online.target
Wants=network-online.target
[Service]
Type=simple
User=pi
WorkingDirectory=/home/pi/a
ExecStart=/home/pi/a/test_v1 -platform linuxfb
[Install]
WantedBy=multi-user.target
after that I enabled this service
sudo systemctl enable application_one.service
but it couldn't autostart the apllication after rebooting
when I do sudo systemctl start application_one.service
it works fine
these ares the status
sudo systemctl status application_one.service
● application_one.service - Qt application autostart
Loaded: loaded (/etc/systemd/system/application_one.service; enabled; vendor
Active: inactive (dead)
when booting I have 2 messages before splashscreen
[ 3.005162] systemd[1] : multi-user.target : Job application_one.service/start deleted to break ordering cycle starting with multi-user.target/start
[ 3.005162] systemd[1] : multi-user.target : Job application_one.service/start
lti-user.target/start
this is what my splashscreen.service looks like :
[Unit]
Description=Splash screen
DefaultDependencies=no
After=local-fs.target
[Service]
ExecStart=/usr/bin/fbi -d /dev/fb0 --noverbose -a /home/pi/image.png
StandardInput=tty
StandardOutput=tty
[Install]
WantedBy=sysinit.target
Can some please explain to me what I am doing wrong
thank you
systemctl status application_one.service
and add its complete output including CGroup: lines and latest log messages to the question. You use a Qt application that is a GUI library and want to start it after the graphical target. So I assume you are running an application with a graphical user interface. Why do you need a GUI by running/home/pi/a/test_v1
as service continous in the background? Services do not have a user interface.sudo systemctl status application_one.service ● application_one.service - Qt application autostart Loaded: loaded (/etc/systemd/system/application_one.service; enabled; vendor Active: inactive (dead) lines 1-3/3 (END)
this all what I gottest_v1
is just an exactable of my Qt application that I want to start. is there an other way to autostart it without using a service?