I am setting up a development qube where I need some different $PATHs set for command execution, I modify my $PATH env variable in .profile in my development qube.
However when I run qvm-run development-qube <command> it tells me the command is missing, providing the absolute path to the command works, so does running the command by itself from a terminal inside of the qube so it seems like this is an issue with qvm-run not running in a shell which sources .profile.
Is there a way to set this up as a default? I could run qvm-run development-qube "source .profile && <command>" everytime but that
does not transfer to using the qube manager to run commands
is tiresome and verbose
does not scale well, in all scripts everywhere I would have to do this
Then it works, but like I outlined in the OP it would be really nice if it was possible to exclude the source .profile && part of this and have qvm-run source .profile on default somehow.
So, bash (man bash) and other shells have switches (e.g. --login) that tell them how much interactive user context to invoke. By default very little…but some switches approximate the behavior seen for a user session and would automatically load a profile. Default for non interactive is not to.
If you want that then you’ll need to tell qvm-run to invoke the shell directly, with appropriate flags, to then run a command from that shell. You’ll likely enjoy the fun of multiple quoting levels.