This is interesting.
Can please you share some output logs of the different components needed to launch labwc?
I don't know exactly how much you understand about variables, so maybe the explanation below won't help you understand what's going on at all.
Each program launch through the script inherit of the value of the exported variables make at the start of the script. That's why you can see it calling the printenv command.
I don't know exactly by
Variable are not vanished. if you take a look at the /proc/<labwc_pid>/environ
file you should see the environment variables passed to labwc given by the scripts.
Well, let me take an example. I have a script file named exp.sh with the following:
#!/bin/sh
export varexported=fromscript
echo value of varexported: $varexported
now i execute the script then i check the environment variable define in my shell by a printenv.
$ ./exp.sh
$ printenv
The variable varexported doesn't exist. That means that the export variable call only concern future instructions made inside the scripts.
Now i change my ex.sh scripts by the following:
#!/bin/sh
export varexported=$fromoutside
echo value of varexported: $varexported
Then i do an export command before lauching the ex.sh script
$ export fromoutside=itworks
$ ./ex.sh
$ printenv
Here i get the correct replacement of my variable $fromoutside inside the script and get the correct value for varexported variable.
ncmprhnsbl is there some way to check if seatd is setting the seat correctly?
Did you take a look at seatd log?(66 status seatd)
Did you tried to start labwc through a service?