Re: [systemd-devel] Not able to start Weston dependent application

2018-10-31 Thread Jérémy Rosen



On 31/10/2018 12:40, Pekka Paalanen wrote:

On Wed, 31 Oct 2018 11:32:45 +0100
Jérémy Rosen  wrote:


socket-activated weston ?

nice :)

Why does weston require logind ? I work in the embedded world and we
usually disable logind entirely (no users in the "human user" meaning of
the term)

That's when you run Weston as a normal user: logind grants access to
DRM and input devices and revokes access as well when appropriate.

Ok, no problem, we can deal with that in lots of ways.

I was afraid there was some more tricky stuff (dependencies on dbus API 
or something like that)


logind is not a hard requirement. That option has usually been
called for by people who don't have systemd at all. I'm not sure Weston
has ever been tested on systemd but without logind. Or maybe it works
and no-one told upstream. :-)

It works and no one told upstream :P

Weston (and wayland in general ) are a boon to the embedded world.

We are regularly asked to do systems with very precise placement for 
different windows coming from different apps


(think of a car, where the map application is usually an html5 
in-browser application, but you can swith to air-conditionning control 
which is a hand-made Qt application, and the the back camera which is a 
separate Qt+Gstreamer application)


In the bad-old days, we would have to play with X and window-managers 
like Awesome to do that (or write our own window manager which is... hell)


Now, we have weston which is very good at dealing with that (thx IVI 
mode) or we can write or own compositor which is almost as easy as 
writing a normal GUI application (qtcompositor, mainly)


A bit offtopic here, sorry about that.

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


Re: [systemd-devel] Not able to start Weston dependent application

2018-10-31 Thread Pekka Paalanen
On Wed, 31 Oct 2018 11:51:47 +0100
Jérémy Rosen  wrote:

> Pekka : is the notify plugin already upstreamed ? if yes, loading it and 
> setting Type=notify might work...

Yes, it's upstream. The only thing not upstream is the documentation on
how to actually use that stuff with systemd units. :-P


Thanks,
pq

> On 31/10/2018 11:45, Lennart Poettering wrote:
> > On Mi, 31.10.18 15:26, deepan muthusamy (deepan.m2...@gmail.com) wrote:
> >  
> >> I added both after and requires.What you meant by security feature?@rosan
> >>
> >> Type I made as simple.@ Lennart  
> > That's not going to work. If you use Type=simple, then system will
> > consider the service to be up as soon as systemd called fork(). Unless
> > weston uses socket activation this is definitely not the point in time
> > where its IPC APIs are usable yet.
> >
> > Lennart
> >  
> 



pgpN6LwBsrLPN.pgp
Description: OpenPGP digital signature
___
systemd-devel mailing list
systemd-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/systemd-devel


Re: [systemd-devel] Not able to start Weston dependent application

2018-10-31 Thread Pekka Paalanen
On Wed, 31 Oct 2018 11:32:45 +0100
Jérémy Rosen  wrote:

> socket-activated weston ?
> 
> nice :)
> 
> Why does weston require logind ? I work in the embedded world and we 
> usually disable logind entirely (no users in the "human user" meaning of 
> the term)

That's when you run Weston as a normal user: logind grants access to
DRM and input devices and revokes access as well when appropriate.

Of course, you can work around that by fiddling with device permissions
or using some other service that sets those up, and there is
weston-launch as well, but logind is really the easy and recommended
way to let it work especially on desktop systems.

logind is not a hard requirement. That option has usually been
called for by people who don't have systemd at all. I'm not sure Weston
has ever been tested on systemd but without logind. Or maybe it works
and no-one told upstream. :-)

Weston actually has three "launchers": one uses logind, one uses
weston-launch (a setuid-root helper), and one uses neither. The last
one is usually used as root for developer testing, I believe.


Thanks,
pq


pgplvdZ9LobqL.pgp
Description: OpenPGP digital signature
___
systemd-devel mailing list
systemd-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/systemd-devel


Re: [systemd-devel] Not able to start Weston dependent application

2018-10-31 Thread Jérémy Rosen
Pekka : is the notify plugin already upstreamed ? if yes, loading it and 
setting Type=notify might work...


On 31/10/2018 11:45, Lennart Poettering wrote:

On Mi, 31.10.18 15:26, deepan muthusamy (deepan.m2...@gmail.com) wrote:


I added both after and requires.What you meant by security feature?@rosan

Type I made as simple.@ Lennart

That's not going to work. If you use Type=simple, then system will
consider the service to be up as soon as systemd called fork(). Unless
weston uses socket activation this is definitely not the point in time
where its IPC APIs are usable yet.

Lennart



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


Re: [systemd-devel] Not able to start Weston dependent application

2018-10-31 Thread Jérémy Rosen

socket-activated weston ?

nice :)

Why does weston require logind ? I work in the embedded world and we 
usually disable logind entirely (no users in the "human user" meaning of 
the term)


On 31/10/2018 11:14, Pekka Paalanen wrote:

On Wed, 31 Oct 2018 15:26:06 +0530
deepan muthusamy  wrote:


I added both after and requires.What you meant by security feature?@rosan

Type I made as simple.@ Lennart

Hi Deepan,

you really should follow the documentation added by this MR:
https://gitlab.freedesktop.org/wayland/weston/merge_requests/39/diffs

Weston with Type=simple cannot be reliable. Instead, you are
intended to use the Weston plugin that integrates explicitly with
systemd. Examples are in that MR.


Thanks,
pq


On Wed, 31 Oct 2018, 1:45 pm Jérémy Rosen,  wrote:


Did you add an "After=" too ? you need both  a Requires= and an After=
Did you activate any security feature that might hide the wayland socket
from app2 ?

On 31/10/2018 08:21, deepan muthusamy wrote:

Hi,
I started app1(this is a UI application) as system service .
I started app2( this is Weston ) also as system service. But in different
tty(tty7).

App1 is depended on app2 to start.
I added that dependency.

App2 is started but app1 not able to find that dependency. Iam getting
error as not able to find weston.

If I start both manually, it's working fine.



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


Re: [systemd-devel] Not able to start Weston dependent application

2018-10-31 Thread deepan muthusamy
I added both after and requires.What you meant by security feature?@rosan

Type I made as simple.@ Lennart

On Wed, 31 Oct 2018, 1:45 pm Jérémy Rosen,  wrote:

> Did you add an "After=" too ? you need both  a Requires= and an After=
> Did you activate any security feature that might hide the wayland socket
> from app2 ?
>
> On 31/10/2018 08:21, deepan muthusamy wrote:
>
> Hi,
> I started app1(this is a UI application) as system service .
> I started app2( this is Weston ) also as system service. But in different
> tty(tty7).
>
> App1 is depended on app2 to start.
> I added that dependency.
>
> App2 is started but app1 not able to find that dependency. Iam getting
> error as not able to find weston.
>
> If I start both manually, it's working fine.
>
>
>
>
> ___
> systemd-devel mailing 
> listsystemd-devel@lists.freedesktop.orghttps://lists.freedesktop.org/mailman/listinfo/systemd-devel
>
>
> --
> [image: SMILE] 
>
> 20 rue des Jardins
> 92600 Asnières-sur-Seine
> *Jérémy ROSEN*
> Architecte technique
> Responsable de l'expertise Smile-ECS
>
> [image: email] jeremy.ro...@smile.fr
> [image: phone] +33141402967
> [image: url] http://www.smile.eu
>
> [image: Twitter]  [image: Facebook]
>  [image: LinkedIn]
>  [image: Github]
> 
>
> [image: Découvrez l’univers Smile, rendez-vous sur smile.eu]
> 
>
> [image: 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


Re: [systemd-devel] Not able to start Weston dependent application

2018-10-31 Thread Lennart Poettering
On Mi, 31.10.18 12:51, deepan muthusamy (deepan.m2...@gmail.com) wrote:

> Hi,
> I started app1(this is a UI application) as system service .
> I started app2( this is Weston ) also as system service. But in different
> tty(tty7).
> 
> App1 is depended on app2 to start.
> I added that dependency.
> 
> App2 is started but app1 not able to find that dependency. Iam getting
> error as not able to find weston.
> 
> If I start both manually, it's working fine.

Does app2 have the right Type= set so that systemd actually knows when
the service is properly started up? 

Lennart

-- 
Lennart Poettering, Red Hat
___
systemd-devel mailing list
systemd-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/systemd-devel


Re: [systemd-devel] Not able to start Weston dependent application

2018-10-31 Thread Jérémy Rosen

Did you add an "After=" too ? you need both  a Requires= and an After=
Did you activate any security feature that might hide the wayland socket 
from app2 ?


On 31/10/2018 08:21, deepan muthusamy wrote:

Hi,
I started app1(this is a UI application) as system service .
I started app2( this is Weston ) also as system service. But in 
different tty(tty7).


App1 is depended on app2 to start.
I added that dependency.

App2 is started but app1 not able to find that dependency. Iam getting 
error as not able to find weston.


If I start both manually, it's working fine.




___
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] Not able to start Weston dependent application

2018-10-31 Thread deepan muthusamy
Hi,
I started app1(this is a UI application) as system service .
I started app2( this is Weston ) also as system service. But in different
tty(tty7).

App1 is depended on app2 to start.
I added that dependency.

App2 is started but app1 not able to find that dependency. Iam getting
error as not able to find weston.

If I start both manually, it's working fine.
___
systemd-devel mailing list
systemd-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/systemd-devel