I can run steamosctl get-default-desktop-session in a terminal, but the same command in a Bash script reports no such file or directory. The script has a Bash shebang and set -x. Running steamosctl help from it works.
Do I need to quote the argument because it contains several hyphens, or should I be looking elsewhere?
Kettle.2Go:
Sourcing ~/.bashrc is another possible experiment, but it isn't a general fix. Some .bashrc files return early in noninteractive shells, and services shouldn't have to depend on interactive shell setup.