Hi, Maxim Cournoyer writes: >>>>>> - (sleep 1) ;give seatd/logind some time to start >>>>>> up >>>>> >>>>> That's a suspicious line which already existed. It looks >>>>> fragile. >>>>> Is >>>>> it really necessary? >>>> >>>> Unfortunately, there is no good/easy way to conditionally >>>> depend >>>> on elogind or seatd. greetd-service-type and agreety greeter >>>> do not >>>> require >>>> seat, only sway based greeters may/will want it. >>> >>> I meant perhaps waiting 1 second here is no longer necessary? >>> 1 s >>> is >>> not much at all. Perhaps added during debug/development of >>> the >>> service >>> and forgotten? I'd trying taking it out and see. >> >> Unfortunately, if you take it out, you will end up with race >> condition >> when sometimes it works sometimes not. Technically, "sleep 1" >> may >> cause race as well, but for years I didn't have any issue with >> it. > > OK. What do other systems do? Surely, there are better > technical means > to achieve this than sleeping for one second? > >> To try it, you have to configure seatd, greetd, and sway based >> greeter. Then just reboot/restart host until race. >> >> One possible is to provide additional greetd configuration that >> will expose the shepherd requirements. But I think it might >> will complicate configuration dramatically for end user. > > Perhaps there could be a shepherd-requirements field attached to > the > greeter configurations with a sane default value capturing the > Shepherd > requirements, abstracting the complexity to most users while > leaving it > configurable? Adding extra-shepherd-requirement configuration field in v6.