[systemd-devel] About systemd call dbus session bus

张洋 zhangyang at hangsheng.com.cn
Thu Feb 5 19:32:15 PST 2015


Hi all

I've got a problem here:

When my system setup I need to execute a shell script to export dbus
session address, the script as follows:

#!/bin/sh
rm /tmp/session_amgr
dbus-daemon --session --print-address --fork > /tmp/session_amgr
export DBUS_SESSION_BUS_ADDRESS=`cat /tmp/session_amgr`

And I have an app in folder /geniviLife, it will export interfaces in
session bus.  When I run the app manually, it works.
However, when I tried to start it using systemd, it failed. It seems
systemd didn't read the export env? Here is the log:



root at mx6q:/lib/systemd/scripts# systemctl start hsaevideo
root at mx6q:/lib/systemd/scripts# systemctl status hsaevideo -l
hsaevideo.service - LUC test service
   Loaded: loaded (/etc/systemd/system/hsaevideo.service; disabled)
   Active: failed (Result: signal) since Thu 1970-01-01 01:49:35 UTC; 10s
ago
  Process: 2435 ExecStart=/geniviLife/hsaevideo (code=killed, signal=TRAP)
 Main PID: 2435 (code=killed, signal=TRAP)

Jan 01 01:49:35 mx6q hsaevideo[2435]: ** Message: ----------video start
running!!-------------
Jan 01 01:49:35 mx6q hsaevideo[2435]: ** (process:2435): ERROR **: can't
connection session bus


Ps: env: iMX6, arm

looking forward to received your reply, tks :)

Best Regards
ShenZhen HangSheng Electronics Co.,LTD
ShangHai R&D Center
SW Enginner
Rex Zhang
Mobile: (+86) 18652759021
Tel: (+86) 0514-85828822-8243





More information about the systemd-devel mailing list