Discussion:
Not able to start Weston dependent application
(too old to reply)
deepan muthusamy
2018-10-31 07:21:03 UTC
Permalink
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.
Jérémy Rosen
2018-10-31 08:15:42 UTC
Permalink
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 ?
Post by 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
https://lists.freedesktop.org/mailman/listinfo/systemd-devel
--
SMILE <http://www.smile.eu/>

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


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

email ***@smile.fr <mailto:***@smile.fr>
phone +33141402967
url http://www.smile.eu

Twitter <https://twitter.com/GroupeSmile> Facebook
<https://www.facebook.com/smileopensource> LinkedIn
<https://www.linkedin.com/company/smile> Github
<https://github.com/Smile-SA>


Découvrez l’univers Smile, rendez-vous sur smile.eu
<http://smile.eu/?utm_source=signature&utm_medium=email&utm_campaign=signature>

eco Pour la planÚte, n'imprimez ce mail que si c'est nécessaire
deepan muthusamy
2018-10-31 09:56:06 UTC
Permalink
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 ?
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.
_______________________________________________
--
[image: SMILE] <http://www.smile.eu/>
20 rue des Jardins
92600 AsniÚres-sur-Seine
*Jérémy ROSEN*
Architecte technique
Responsable de l'expertise Smile-ECS
[image: phone] +33141402967
[image: url] http://www.smile.eu
[image: Twitter] <https://twitter.com/GroupeSmile> [image: Facebook]
<https://www.facebook.com/smileopensource> [image: LinkedIn]
<https://www.linkedin.com/company/smile> [image: Github]
<https://github.com/Smile-SA>
[image: Découvrez l’univers Smile, rendez-vous sur smile.eu]
<http://smile.eu/?utm_source=signature&utm_medium=email&utm_campaign=signature>
[image: eco] Pour la planÚte, n'imprimez ce mail que si c'est nécessaire
Pekka Paalanen
2018-10-31 10:14:15 UTC
Permalink
On Wed, 31 Oct 2018 15:26:06 +0530
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
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 ?
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.
Jérémy Rosen
2018-10-31 10:32:45 UTC
Permalink
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)
Post by Pekka Paalanen
On Wed, 31 Oct 2018 15:26:06 +0530
Hi Deepan,
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
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 ?
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 <http://www.smile.eu/>

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


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

email ***@smile.fr <mailto:***@smile.fr>
phone +33141402967
url http://www.smile.eu

Twitter <https://twitter.com/GroupeSmile> Facebook
<https://www.facebook.com/smileopensource> LinkedIn
<https://www.linkedin.com/company/smile> Github
<https://github.com/Smile-SA>


Découvrez l’univers Smile, rendez-vous sur smile.eu
<http://smile.eu/?utm_source=signature&utm_medium=email&utm_campaign=signature>

eco Pour la planÚte, n'imprimez ce mail que si c'est nécessaire
Pekka Paalanen
2018-10-31 11:40:08 UTC
Permalink
On Wed, 31 Oct 2018 11:32:45 +0100
Post by 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)
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
Jérémy Rosen
2018-10-31 12:19:17 UTC
Permalink
Post by Pekka Paalanen
On Wed, 31 Oct 2018 11:32:45 +0100
Post by 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)
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)
Post by Pekka Paalanen
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 <http://www.smile.eu/>

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


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

email ***@smile.fr <mailto:***@smile.fr>
phone +33141402967
url http://www.smile.eu

Twitter <https://twitter.com/GroupeSmile> Facebook
<https://www.facebook.com/smileopensource> LinkedIn
<https://www.linkedin.com/company/smile> Github
<https://github.com/Smile-SA>


Découvrez l’univers Smile, rendez-vous sur smile.eu
<http://smile.eu/?utm_source=signature&utm_medium=email&utm_campaign=signature>

eco Pour la planÚte, n'imprimez ce mail que si c'est nécessaire
deepan muthusamy
2018-11-02 11:45:45 UTC
Permalink
Hi,
I followed the steps in
https://gitlab.freedesktop.org/wayland/weston/merge_requests/39/diffs

It's working fine.

Thank you all..
Post by Pekka Paalanen
On Wed, 31 Oct 2018 11:32:45 +0100
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.
--
[image: SMILE] <http://www.smile.eu/>
20 rue des Jardins
92600 AsniÚres-sur-Seine
*Jérémy ROSEN*
Architecte technique
Responsable de l'expertise Smile-ECS
[image: phone] +33141402967
[image: url] http://www.smile.eu
[image: Twitter] <https://twitter.com/GroupeSmile> [image: Facebook]
<https://www.facebook.com/smileopensource> [image: LinkedIn]
<https://www.linkedin.com/company/smile> [image: Github]
<https://github.com/Smile-SA>
[image: Découvrez l’univers Smile, rendez-vous sur smile.eu]
<http://smile.eu/?utm_source=signature&utm_medium=email&utm_campaign=signature>
[image: eco] Pour la planÚte, n'imprimez ce mail que si c'est nécessaire
Lennart Poettering
2018-10-31 10:45:45 UTC
Permalink
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
--
Lennart Poettering, Red Hat
Jérémy Rosen
2018-10-31 10:51:47 UTC
Permalink
Pekka : is the notify plugin already upstreamed ? if yes, loading it and
setting Type=notify might work...
Post by Lennart Poettering
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 <http://www.smile.eu/>

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


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

email ***@smile.fr <mailto:***@smile.fr>
phone +33141402967
url http://www.smile.eu

Twitter <https://twitter.com/GroupeSmile> Facebook
<https://www.facebook.com/smileopensource> LinkedIn
<https://www.linkedin.com/company/smile> Github
<https://github.com/Smile-SA>


Découvrez l’univers Smile, rendez-vous sur smile.eu
<http://smile.eu/?utm_source=signature&utm_medium=email&utm_campaign=signature>

eco Pour la planÚte, n'imprimez ce mail que si c'est nécessaire
Pekka Paalanen
2018-10-31 11:43:06 UTC
Permalink
On Wed, 31 Oct 2018 11:51:47 +0100
Post by Jérémy Rosen
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
Post by Jérémy Rosen
Post by Lennart Poettering
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
Lennart Poettering
2018-10-31 09:09:48 UTC
Permalink
Post by 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.
Does app2 have the right Type= set so that systemd actually knows when
the service is properly started up?

Lennart
--
Lennart Poettering, Red Hat
Continue reading on narkive:
Loading...