[systemd-devel] Dbus user/system session
arnaud gaboury
arnaud.gaboury at gmail.com
Sun Nov 2 09:17:20 PST 2014
Here are the unit files I use to start my user Dbus session daemon
/home/gabx/.config/systemd/user/dbus.service
----------------------------------------
[Unit]
Description=D-Bus System Message Bus
Requires=dbus.socket
[Service]
ExecStart=/usr/bin/dbus-daemon --session --address=systemd: --nofork
--systemd-activation
ExecReload=/usr/bin/dbus-send --print-reply --session
--type=method_call --dest=org.freedesktop.DBus /
org.freedesktop.DBus.ReloadConfig
[Install]
WantedBy=default.target
/home/gabx/.config/systemd/user/dbus.socket
------------------------------------------
[Unit]
Description = D-Bus System Message Bus Socket
[Socket]
ListenStream = %t/dbus/user_bus_socket
[Install]
WantedBy=dbus.target
WantedBy=sockets.target
It seems everything is Ok as Dbus is doing its job.
gabx at hortensia ➤➤ ~aur % systemctl --user status
● hortensia
State: running
Jobs: 0 queued
Failed: 0 units
Since: Sun 2014-11-02 11:58:45 CET; 6h ago
CGroup: /user.slice/user-1000.slice/user at 1000.service
├─839 /usr/lib/systemd/systemd --user
├─840 (sd-pam)
├─dbus.service
│ └─855 /usr/bin/dbus-daemon --session --address=systemd:
--nofork --systemd-activation
Now when I list dbus process, here is the output:
118:dbus 588 1 0 11:58 ? 00:00:00
/usr/bin/dbus-daemon --system --address=systemd: --nofork --nopidfile
--systemd-activation
126:gabx 855 839 0 11:58 ? 00:00:00
/usr/bin/dbus-daemon --session --address=systemd: --nofork
--systemd-activation
132:dbus 892 461 0 11:58 ? 00:00:00
/usr/bin/dbus-daemon --system --address=systemd: --nofork --nopidfile
--systemd-activation
152:gabx 1485 1 0 11:58 ? 00:00:00
/usr/bin/dbus-launch --autolaunch 77f348a2b3fb429b85a5de751ea9175a
--binary-syntax --close-stderr
153:gabx 1486 1 0 11:58 ? 00:00:00
/usr/bin/dbus-daemon --fork --print-pid 5 --print-address 7 --session
155:gabx 1494 1488 0 11:58 ? 00:00:00
/usr/bin/dbus-daemon --config-file=/etc/at-spi2/accessibility.conf
--nofork --print-address 3
As one can see, I have two similar systemd dbus-daemon processes owned
by Dbus : PID 588 & 892.
Is it the expected behavior ?
Thank you for suggestions.
--
google.com/+arnaudgabourygabx
More information about the systemd-devel
mailing list