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

[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

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

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

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

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

2018-08-13 Thread Deepan Muthusamy
n 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: [syst

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

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 > > > >

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'

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

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 > >

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

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

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

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

[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

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

[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,