There is a program X written in rust, which is run by the root user via sudo X run or doas X run. It is located in /usr/bin/ with the following permissions:
-rwxr-xr-x 1 root root 3714208 Oct 10 12:31 X
Okay, now we create a file /etc/dinit.d/X with the following contents:
type = process
command = /usr/bin/X run
logfile = /var/log/dinit/X.log
Startup:
~ ❯ doas dinitctl start X
Service 'X' started.
~ ❯ doas dinitctl status X
Service: X
State: STOPPED (terminated; unknown reason)
In /var/log/dinit/X.log there is only this:
thread 'main' panicked at src/daemon.rs:450:67:
called `Result::unwrap()` on an `Err` value: Os { code: 25, kind: Uncategorized, message: "Inappropriate ioctl for device" }
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
Where do I add this "RUST_BACKTRACE=1" and what do I do next?