Question

So, I've read the porting guide (https://wiki.tizen.org/wiki/Porting_Guide). There is a section named "Tizen Bootup Overview". This section says that user instance of systemd daemon is run. When I run the emulator I can see it with ps aux | grep systemd and I see that it is run by user app. But when I type in systemctl --user list-units as app user I recieve following message Failed to issue method call: Failed to execute program /bin/false: Success. But when I type in /usr/lib/systemd/systemd --user & as app user and only the call to list-units method it runs ok. What I don't understand properly about running systemctl --user list-units, please?

As far as I understand the DBus service file already has /bin/false as the executable specified, to avoid systemd --user from being accidentally DBus-activated. But looking at the sources of systemctl I see that when running with --user option it tries to connect to DBus to "unix:path=$XDG_RUNTIME_PATH/systemd/private"

I'm pretty new to both systemd and dbus. I tried calling /usr/lib/systemd/systemd --user & from my program before it connected to systemd and it worked, but systemd began the executing user targets. I connect to DBus with dbus_bus_get(DBUS_BUS_SESSION, &err) (DBUS_BUS_SESSION is to connect to user instance, as I understand by looking atthe sources of systemd & Co)

PS: Tizen uses systemd v43

Thanks in advance.

Sorry for my broken English.

Was it helpful?

Solution

The answer is: To connect to the user session of systemd:

$ su -

# su - app

app$ export XDG_RUNTIME_DIR=/run/user/app

app$ systemctl --user status default.target

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top