Re: [systemd-devel] Access session bus from service application

2018-08-13 Thread Mantas Mikulėnas
On Tue, Aug 14, 2018 at 7:21 AM deepan muthusamy 
wrote:

> I have an application which has to communicate with systemd to monitor
> other process and it has to communicate with other session applications ,
> so my application is designed to communicate to both session dbus and
> system dbus. And also my application has to be started as service by
> systemd. How to do this?
>

If it's a session application, why does it have to be started by systemd?
That isn't a requirement for accessing the system bus; any application can
access the system bus.

-- 
Mantas Mikulėnas
___
systemd-devel mailing list
systemd-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/systemd-devel


[systemd-devel] Access session bus from service application

2018-08-13 Thread deepan muthusamy
I have an application which has to communicate with systemd to monitor
other process and it has to communicate with other session applications ,
so my application is designed to communicate to both session dbus and
system dbus. And also my application has to be started as service by
systemd. How to do this?

Iam facing process termination when try trying to access session dbus, only
when iam starting as boot process. If I run manually or run with init.d, my
application is running sucessfully. Any way to solve this issue?
___
systemd-devel mailing list
systemd-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/systemd-devel


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

2018-08-13 Thread Andrei Borzenkov
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
>  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
> mailto:deepan.muthus...@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@lists.freedesktop.org 
> https://lists.freedesktop.org/mailman/listinfo/systemd-devel
> 

___
systemd-devel mailing list
systemd-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/systemd-devel


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

2018-08-13 Thread 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, so 
Iam communicating using session bus.Also My application has to start at boot 
time by systemd. Is it possible? If possible what are all the changes I have to 
make?

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


DEEPAN MUTHUSAMY,
TATA CONSULTANCY SERVICE,
mobile no: +91 8012309210

From: Mantas Mikulėnas 
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 
mailto:deepan.muthus...@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@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/systemd-devel


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

2018-08-13 Thread Mantas Mikulėnas
On Mon, Aug 13, 2018 at 3:37 PM Deepan Muthusamy 
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
___
systemd-devel mailing list
systemd-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/systemd-devel


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

2018-08-13 Thread Deepan Muthusamy

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?
DEEPAN MUTHUSAMY,
TATA CONSULTANCY SERVICE,
mobile no: +91 8012309210


From: systemd-devel  on behalf of 
systemd-devel-requ...@lists.freedesktop.org 

Sent: Monday, August 13, 2018 3:21 PM
To: systemd-devel@lists.freedesktop.org
Subject: systemd-devel Digest, Vol 100, Issue 16

Send systemd-devel mailing list submissions to
systemd-devel@lists.freedesktop.org

To subscribe or unsubscribe via the World Wide Web, visit
https://lists.freedesktop.org/mailman/listinfo/systemd-devel
or, via email, send a message with subject or body 'help' to
systemd-devel-requ...@lists.freedesktop.org

You can reach the person managing the list at
systemd-devel-ow...@lists.freedesktop.org

When replying, please edit your Subject line so it is more specific
than "Re: Contents of systemd-devel digest..."


Today's Topics:

   1.  systemd service not connecting to session dbus
  (Deepan  Muthusamy)
   2. Re:  systemd service not connecting to session dbus
  (Jérémy Rosen)
   3.  Restarting a service as user instead as root (Cecil Westerhof)
   4. Re:  Restarting a service as user instead as root (Reindl Harald)
   5. Re:  Restarting a service as user instead as root (Silvio Knizek)


--

Message: 1
Date: Mon, 13 Aug 2018 07:17:51 +
From: "Deepan  Muthusamy" 
To: "systemd-devel@lists.freedesktop.org"

Subject: [systemd-devel] systemd service not connecting to session
dbus
Message-ID: <1534144671090.92...@tcs.com>
Content-Type: text/plain; charset="iso-8859-1"


I have an application which has to communicate with session dbus. If I start my 
application binary manually or start using Init.d, it is connecting to session 
d-bus.

But if I start my application through systemd, it is failing to start.  I tried 
to start using systemctl start my-service-name, this time also it is failing.


And also I go through the answer given by keithel in 
https://serverfault.com/questions/892465/starting-systemd-services-sharing-a-session-d-bus-on-headless-system
 .

Still Iam facing the same error.


The .service fail is as follows:


[Unit]
Requires= dbus.socket
After= dbus.socket

[Service]
Type=dbus
BusName=org.client
ExecStart=/usr/local/bin/myExe
TimeoutSec=300
WatchdogSec=20

[Install]
WantedBy=basic.target


Operating system:
Ubuntu 16.04 (64-bit)









DEEPAN MUTHUSAMY,
TATA CONSULTANCY SERVICE,
mobile no: +91 8012309210
=-=-=
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


-- next part --
An HTML attachment was scrubbed...
URL: 
<https://lists.freedesktop.org/archives/systemd-devel/attachments/20180813/897d3337/attachment-0001.html>

--

Message: 2
Date: Mon, 13 Aug 2018 10:10:21 +0200
From: Jérémy Rosen 
To: systemd-devel@lists.freedesktop.org
Subject: Re: [systemd-devel] systemd service not connecting to session
dbus
Message-ID: <39db67b3-c51f-3cdd-156d-2fc06ae34...@smile.fr>
Content-Type: text/plain; charset="windows-1252"; Format="flowed"

There are two types of systemd instances
* system instance (PID1) which controls the machine as a whole
* user instances that are started when the user logs in.

You seem to have a system service (started by the system session). A
system service can't (easily) access the user bus.
The session bus is started by the user instance when the user login. If
the user hasn't logged in yet, the bus isn't started.
Moreover, the user bus is found via an environment variable, which is
not set for system services (even when User= is used)

What are you trying to do exactly ? should your service be a session
service ?

Regards
Jeremy


On 13/08/2018 09:17, Deepan Muthusamy wrote:
> I have an application which has to communicate with session dbus. If I start 
> my application binary manually or start using Init.d, it is connecting to 
> session d-bus.
>
> But if I start my application through systemd, it is failing to start.  I 
> tried to start using systemctl start my-service-name, this time also it is 
> failing.
>
>
> And also I go through the answer given by keithel in 
> https://serverfault.com/questions/892465/starting-systemd-services-sharing-a-s

Re: [systemd-devel] Restarting a service as user instead as root

2018-08-13 Thread Simon McVittie
On Mon, 13 Aug 2018 at 12:44:48 +0200, Cecil Westerhof wrote:
> I tried to put this in:
>     /etc/polkit-1/rules.d/10-auth.rules
...
> I am using Debian 9.

Debian uses an old version of polkit (with most of the changes from
newer versions backported) due to maintainability concerns about the
use of Javascript as the policy language in newer versions. Simpler
rules can be expressed in the old "local authority" policy language
(see the man pages installed with polkit on your Debian system) but
finer-grained rules using lookup() cannot be translated for Debian's
older polkit version.

smcv
___
systemd-devel mailing list
systemd-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/systemd-devel


Re: [systemd-devel] Restarting a service as user instead as root

2018-08-13 Thread Cecil Westerhof
2018-08-13 12:52 GMT+02:00 Michael Chapman :

> On Mon, 13 Aug 2018, Cecil Westerhof wrote:
> > 2018-08-13 11:51 GMT+02:00 Michael Chapman :
> >
> > > On Mon, 13 Aug 2018, Cecil Westerhof wrote:
> > > > I have a service that is run as a different user as root. But only
> root
> > > can
> > > > restart the service. Is there a way to make 'systemctl restart' work
> for
> > > > the user that runs the service?
> > >
> > > You could simply add some Sudo rules allowing the user to perform that
> > > command.
> > >
> > > Alternatively, you can write a polkit rule to describe the permissions.
> > > For example, the following would give permission for a particular
> > > user to restart a particular service:
> > >
> > > polkit.addRule(function(action, subject) {
> > > if (action.id == "org.freedesktop.systemd1.manage-units" &&
> > > action.lookup("unit") == "example.service" &&
> > > action.lookup("verb") == "restart" &&
> > > subject.user == "username") {
> > > return polkit.Result.YES;
> > > }
> > > });
> > >
> > > See the AUTHORIZATION RULES section of the polkit(8) manpage for
> further
> > > details.
> > >
> >
> > I tried to put this in:
> > /etc/polkit-1/rules.d/10-auth.rules
> >
> > When reading:
> > https://www.freedesktop.org/software/polkit/docs/latest/
> polkit.8.html
> > AUTHORIZATION RULES
> >
> > It should work immediately after writing the file, but it does not.
> > Is there something else I should do?
> >
> > I am using Debian 9.
>
> It should work immediately. polkitd will log that it is reloading the
> rules. I suggest you check the log... maybe there's some syntax error or
> other problem with your rule file.
>

I already checked the log, but when changing the file, nothing is logged. I
remember that some things have a different location in Debian. So probably
I should ask this on a Debian group.

-- 
Cecil Westerhof
___
systemd-devel mailing list
systemd-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/systemd-devel


Re: [systemd-devel] Restarting a service as user instead as root

2018-08-13 Thread Michael Chapman
On Mon, 13 Aug 2018, Cecil Westerhof wrote:
> 2018-08-13 11:51 GMT+02:00 Michael Chapman :
> 
> > On Mon, 13 Aug 2018, Cecil Westerhof wrote:
> > > I have a service that is run as a different user as root. But only root
> > can
> > > restart the service. Is there a way to make 'systemctl restart' work for
> > > the user that runs the service?
> >
> > You could simply add some Sudo rules allowing the user to perform that
> > command.
> >
> > Alternatively, you can write a polkit rule to describe the permissions.
> > For example, the following would give permission for a particular
> > user to restart a particular service:
> >
> > polkit.addRule(function(action, subject) {
> > if (action.id == "org.freedesktop.systemd1.manage-units" &&
> > action.lookup("unit") == "example.service" &&
> > action.lookup("verb") == "restart" &&
> > subject.user == "username") {
> > return polkit.Result.YES;
> > }
> > });
> >
> > See the AUTHORIZATION RULES section of the polkit(8) manpage for further
> > details.
> >
> 
> I tried to put this in:
> /etc/polkit-1/rules.d/10-auth.rules
> 
> When reading:
> https://www.freedesktop.org/software/polkit/docs/latest/polkit.8.html
> AUTHORIZATION RULES
> 
> It should work immediately after writing the file, but it does not.
> Is there something else I should do?
> 
> I am using Debian 9.

It should work immediately. polkitd will log that it is reloading the 
rules. I suggest you check the log... maybe there's some syntax error or 
other problem with your rule file.
___
systemd-devel mailing list
systemd-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/systemd-devel


Re: [systemd-devel] Restarting a service as user instead as root

2018-08-13 Thread Cecil Westerhof
2018-08-13 11:51 GMT+02:00 Michael Chapman :

> On Mon, 13 Aug 2018, Cecil Westerhof wrote:
> > I have a service that is run as a different user as root. But only root
> can
> > restart the service. Is there a way to make 'systemctl restart' work for
> > the user that runs the service?
>
> You could simply add some Sudo rules allowing the user to perform that
> command.
>
> Alternatively, you can write a polkit rule to describe the permissions.
> For example, the following would give permission for a particular
> user to restart a particular service:
>
> polkit.addRule(function(action, subject) {
> if (action.id == "org.freedesktop.systemd1.manage-units" &&
> action.lookup("unit") == "example.service" &&
> action.lookup("verb") == "restart" &&
> subject.user == "username") {
> return polkit.Result.YES;
> }
> });
>
> See the AUTHORIZATION RULES section of the polkit(8) manpage for further
> details.
>

I tried to put this in:
/etc/polkit-1/rules.d/10-auth.rules

When reading:
https://www.freedesktop.org/software/polkit/docs/latest/polkit.8.html
AUTHORIZATION RULES

It should work immediately after writing the file, but it does not.
Is there something else I should do?

I am using Debian 9.

-- 
Cecil Westerhof
___
systemd-devel mailing list
systemd-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/systemd-devel


Re: [systemd-devel] Restarting a service as user instead as root

2018-08-13 Thread Tomasz Torcz
On Mon, Aug 13, 2018 at 11:51:46AM +0200, Silvio Knizek wrote:
> Am Montag, den 13.08.2018, 11:28 +0200 schrieb Cecil Westerhof:
> > I have a service that is run as a different user as root. But only
> > root can
> > restart the service. Is there a way to make 'systemctl restart' work
> > for
> > the user that runs the service?
> 
> Hi,
> 
> you can either define a sudo-rule or you use policykit (polkit) for
> this. See 
> https://wiki.archlinux.org/index.php/Polkit#Allow_management_of_individual_systemd_units_by_regular_users
>  for an example. Keep in mind that the polkit feature depends on your
> available systemd version.

Or, if the service has Restart= setting, user can kill the MainPID.
-- 
Tomasz Torcz"Funeral in the morning, IDE hacking
xmpp: zdzich...@chrome.plin the afternoon and evening." - Alan Cox

___
systemd-devel mailing list
systemd-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/systemd-devel


Re: [systemd-devel] Restarting a service as user instead as root

2018-08-13 Thread Cecil Westerhof
2018-08-13 11:28 GMT+02:00 Cecil Westerhof :

> I have a service that is run as a different user as root. But only root
> can restart the service. Is there a way to make 'systemctl restart' work
> for the user that runs the service?
>

Thanks for the answers. At the moment it is not very important, but I like
to be prepared when it 'suddenly' becomes important.

I think I go for the sudo solution. Was thinking about that already, but
was wondering if I overlooked something.

-- 
Cecil Westerhof
___
systemd-devel mailing list
systemd-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/systemd-devel


Re: [systemd-devel] Restarting a service as user instead as root

2018-08-13 Thread Michael Chapman
On Mon, 13 Aug 2018, Cecil Westerhof wrote:
> I have a service that is run as a different user as root. But only root can
> restart the service. Is there a way to make 'systemctl restart' work for
> the user that runs the service?

You could simply add some Sudo rules allowing the user to perform that 
command.

Alternatively, you can write a polkit rule to describe the permissions. 
For example, the following would give permission for a particular 
user to restart a particular service:

polkit.addRule(function(action, subject) {
if (action.id == "org.freedesktop.systemd1.manage-units" &&
action.lookup("unit") == "example.service" &&
action.lookup("verb") == "restart" &&
subject.user == "username") {
return polkit.Result.YES;
}
});

See the AUTHORIZATION RULES section of the polkit(8) manpage for further 
details.
___
systemd-devel mailing list
systemd-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/systemd-devel


Re: [systemd-devel] Restarting a service as user instead as root

2018-08-13 Thread Silvio Knizek
Am Montag, den 13.08.2018, 11:28 +0200 schrieb Cecil Westerhof:
> I have a service that is run as a different user as root. But only
> root can
> restart the service. Is there a way to make 'systemctl restart' work
> for
> the user that runs the service?

Hi,

you can either define a sudo-rule or you use policykit (polkit) for
this. See 
https://wiki.archlinux.org/index.php/Polkit#Allow_management_of_individual_systemd_units_by_regular_users
 for an example. Keep in mind that the polkit feature depends on your
available systemd version.

BR

___
systemd-devel mailing list
systemd-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/systemd-devel


Re: [systemd-devel] Restarting a service as user instead as root

2018-08-13 Thread Reindl Harald


Am 13.08.2018 um 11:28 schrieb Cecil Westerhof:
> I have a service that is run as a different user as root. But only root
> can restart the service. Is there a way to make 'systemctl restart' work
> for the user that runs the service?

not for system services

just because a service binary drops privileges to a different user is no
indication that this user is allowed to control the service itself - for
security the opposite is true
___
systemd-devel mailing list
systemd-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/systemd-devel


[systemd-devel] Restarting a service as user instead as root

2018-08-13 Thread Cecil Westerhof
I have a service that is run as a different user as root. But only root can
restart the service. Is there a way to make 'systemctl restart' work for
the user that runs the service?

-- 
Cecil Westerhof
___
systemd-devel mailing list
systemd-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/systemd-devel


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

2018-08-13 Thread Jérémy Rosen

There are two types of systemd instances
* system instance (PID1) which controls the machine as a whole
* user instances that are started when the user logs in.

You seem to have a system service (started by the system session). A 
system service can't (easily) access the user bus.
The session bus is started by the user instance when the user login. If 
the user hasn't logged in yet, the bus isn't started.
Moreover, the user bus is found via an environment variable, which is 
not set for system services (even when User= is used)


What are you trying to do exactly ? should your service be a session 
service ?


Regards
Jeremy


On 13/08/2018 09:17, Deepan Muthusamy wrote:

I have an application which has to communicate with session dbus. If I start my 
application binary manually or start using Init.d, it is connecting to session 
d-bus.

But if I start my application through systemd, it is failing to start.  I tried 
to start using systemctl start my-service-name, this time also it is failing.


And also I go through the answer given by keithel in 
https://serverfault.com/questions/892465/starting-systemd-services-sharing-a-session-d-bus-on-headless-system
 .

Still Iam facing the same error.


The .service fail is as follows:


[Unit]
Requires= dbus.socket
After= dbus.socket

[Service]
Type=dbus
BusName=org.client
ExecStart=/usr/local/bin/myExe
TimeoutSec=300
WatchdogSec=20

[Install]
WantedBy=basic.target


Operating system:
Ubuntu 16.04 (64-bit)









DEEPAN MUTHUSAMY,
TATA CONSULTANCY SERVICE,
mobile no: +91 8012309210
=-=-=
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@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/systemd-devel


--
SMILE 

20 rue des Jardins
92600 Asnières-sur-Seine


*Jérémy ROSEN*
Architecte technique
Responsable de l'expertise Smile-ECS

email jeremy.ro...@smile.fr 
phone +33141402967
url http://www.smile.eu

Twitter  Facebook 
 LinkedIn 
 Github 




Découvrez l’univers Smile, rendez-vous sur smile.eu 



eco Pour la planète, n'imprimez ce mail que si c'est nécessaire
___
systemd-devel mailing list
systemd-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/systemd-devel


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

2018-08-13 Thread Deepan Muthusamy

I have an application which has to communicate with session dbus. If I start my 
application binary manually or start using Init.d, it is connecting to session 
d-bus.

But if I start my application through systemd, it is failing to start.  I tried 
to start using systemctl start my-service-name, this time also it is failing.


And also I go through the answer given by keithel in 
https://serverfault.com/questions/892465/starting-systemd-services-sharing-a-session-d-bus-on-headless-system
 .

Still Iam facing the same error.


The .service fail is as follows:


[Unit]
Requires= dbus.socket
After= dbus.socket

[Service]
Type=dbus
BusName=org.client
ExecStart=/usr/local/bin/myExe
TimeoutSec=300
WatchdogSec=20

[Install]
WantedBy=basic.target


Operating system:
Ubuntu 16.04 (64-bit)









DEEPAN MUTHUSAMY,
TATA CONSULTANCY SERVICE,
mobile no: +91 8012309210
=-=-=
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@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/systemd-devel