0

Nice to meet you.

I made an application (car<-> controller) that communicates using qtdbus provided by Qt. see. https://doc.qt.io/qt-5/qtdbus-remotecontrolledcar-example.html

Fortunately, I was able to verify that the application's communication was working fine.

But when I use systemd to run the application automatically at system boot, I have a problem with no communication.

Below are the services I wrote.

Controller systemd service

[Unit]
Description=Controller App execution 
ConditionPathExists=/var/run/user/root/wayland-0

[Service]
Type=dbus
BusName=org.example.CarExample.service
EnvironmentFile=/etc/sysconfig/weston
ExecStart=/home/root/controller_app
WorkingDirectory=/home/root/

[Install]
WantedBy=multi-user.target

Car systemd service

[Unit]
Description=Car app execution
ConditionPathExists=/var/run/user/root/wayland-0

[Service]
Type=dbus
BusName=org.example.CarExample.service
EnvironmentFile=/etc/sysconfig/weston
ExecStart=/home/root/car_app
WorkingDirectory=/home/root/

[Install]
WantedBy=multi-user.target

my qdbus service

[D-BUS Service]
Name=org.example.CarExample.service
Exec=/usr/bin/car_dbus

My purpose is to make the two applications using qtdbus work fine when the system boots through systemd.

It seems you are approaching the wrong way now.

What more should I look for?

1 Answer 1

0

found the answer.

The problem was to implement the service in the system area.

It has been found that qtbus communicates in the user area.

Therefore, if a service is created in the user area of systemd, it can be confirmed that it operates normally without connection to the dbus service.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .