1

Hi I'm trying to sort of autostart an applocation in Wayland, so that it starts after the sesktop is visible. I can start it manually via ssh via openvt but the problem is it wont start if I add it for instance into a service. It just crashes. Does any one know how to autostart an app like that? I'm using Poky (yocto) 2.1.2 with renesas' meta-renesas bsp 2.19 wayland 1.11 Update: To be more precise it is Yocto's Poky built for Renesas' R-Car with wayland as manager. Poky 2.1.2

Pawel K
  • 766
  • 8
  • 19
  • What kind of init system are you using? Its pretty easy to start a service after another with systemd. You could also just let it restart if it fails. Also i dont know about wayland but with X it was important to the the DISPLAY environment variable in the service file – Fl0v0 Jul 22 '17 at 22:10
  • I did that it starts after weston.service but it crashes. When I start it. It's more a matter of environmemt variables for weston I guess... when I login via uart console it has them e.g. XDG_RUNTIME_DIR when login via ssh it doesnt but then setting it manually and using openvt works I need to check if I used it service... but that will be tommorow – Pawel K Jul 23 '17 at 06:42

2 Answers2

0

As Fl0v0 mentions, it depends on which init system you use.

If you use sysvinit, you have to mention this in your script:

# Required-Start: <wayland service>

On systemd:

a.service
[Unit]
After=b.service

Original sources: sysvinit and systemd

David Bensoussan
  • 2,887
  • 2
  • 38
  • 55
  • I'm doing it like that I start the app as a service I acutally see it starting and crashing I can't debug it though, the part that crashes is proprietary – Pawel K Jul 23 '17 at 08:20
0

So I have finally figured it out what I was doing wrong. Tu put it short I had to use openvt to start the application (and curiously some delay in seconds despite using After=weston.service ) and the applications started successfully.

Pawel K
  • 766
  • 8
  • 19
  • yes it would make send to check weston pid if using weston-launch , I use this in my pinball project – RzR Jan 16 '21 at 01:17