[systemd-devel] systemd service not connecting to session dbus

Andrei Borzenkov arvidjaar at gmail.com
Tue Aug 14 04:03:23 UTC 2018


13.08.2018 17:38, Deepan  Muthusamy пишет:
> My application is a user created application which will interact with
> systemd to monitor other running process, so I have to connect to
> system dbus. At the same time My application has to communicate with
> other session applications,

You seem to have completely ignored previous question - *which* session?

> so Iam communicating using session
> bus.Also My application has to start at boot time by systemd. Is it
> possible? 

If you need to communicate with session applications, you cannot start
your service before session is created (otherwise no session
applications can possibly exist nor even session bus is yet created).
What is not clear about it?

You can start your application as part of session; and you can make your
application connect to both session bus and system bus. If you need to
start your application "at boot", you need to create your session "at
boot" or use out of band means to communicate to your application
session bus address.

> If possible what are all the changes I have to make?
> 

If you answer, how you determine (or create) session that should be
used, this will likely automatically answer this question as well.

> My target board is rcar H3. My target os is yocto project with genivi
> meta ivi system.
> 

I do not see how hardware is relevant here.

> 
> DEEPAN MUTHUSAMY, TATA CONSULTANCY SERVICE, mobile no: +91
> 8012309210 ________________________________ From: Mantas Mikulėnas
> <grawity at gmail.com> Sent: Monday, August 13, 2018 7:13 PM To: Deepan
> Muthusamy Cc: Systemd Subject: Re: [systemd-devel] systemd service
> not connecting to session dbus
> 
> On Mon, Aug 13, 2018 at 3:37 PM Deepan Muthusamy
> <deepan.muthusamy at tcs.com<mailto:deepan.muthusamy at tcs.com>> wrote:
> 
> My application has to communicate to both system dbus and session
> dbus and I want to start my application through systemd. How to do
> that?
> 
> Everything can use the system bus, but only applications belonging to
> the session can use the session bus. Trying to access user sessions
> from within a system service is somewhat contradictory (is it a
> system service *or* is it a desktop app?). It *is* technically
> possible but you need a really good reason as well as to consider
> that there can be more than one session, less than one session, that
> sessions can appear and disappear at any time... The only common
> exception are tightly integrated embedded distros, where exactly one
> permanent session exists.
> 
> -- Mantas Mikulėnas =====-----=====-----===== Notice: The information
> contained in this e-mail message and/or attachments to it may contain
>  confidential or privileged information. If you are not the intended
> recipient, any dissemination, use, review, distribution, printing or
> copying of the information contained in this e-mail message and/or
> attachments to it are strictly prohibited. If you have received this
> communication in error, please notify us by reply e-mail or telephone
> and immediately and permanently delete the message and any
> attachments. Thank you
> 
> 
> 
> 
> 
> _______________________________________________ systemd-devel mailing
> list systemd-devel at lists.freedesktop.org 
> https://lists.freedesktop.org/mailman/listinfo/systemd-devel
> 



More information about the systemd-devel mailing list