running multipass shell not working
Hi
Thanks, this is a really cool plugin
Maybe Its' a stretch, but I am trying to run a shell command in multipass/ubuntu vm. Multipass: https://multipass.run
From the terminal it is possible tu run shell commands within multipass like:
multipass exec myserver -- pwd
/home/ubuntu
I was trying to add this
multipass exec myserver -- /bin/bash
to the configuration of the shell part of "execute code" plugin, but I get:
"/bin/sh: multipass: command not found!"
Do you know it it is possible, thanks again - great plugin
are you able to run that cmd from shell?
multipass exec myserver -- /bin/bash
it seems like this error is related to multipass
Yes, I can do something like:
multipass exec myserver -- pwd
/home/ubuntu
Do you know if it is possible to do a ssh shell ?
but in this command, you didn't set pwd. could this typo be it perhaps?
multipass exec myserver -- /bin/bash
I was wondering it it would start a bash shell in Obsidian that could be used.
But this it quite a feature stretch, I was/am just curious to see it is possible.
I am curious as I am presenting shell code on different plafroms WSL on Windows and Terminal on MacOs, then I thought maybe I can use Multipass/Ubuntu as the a common VM. Even a Docker container shell would work.
Well, this is still so nice to use, for showing and execute code :-)
Let me know if you have any idea, or if not possible - then I will close this one.
Thanks!
Hi @JCzz I am unsure how multipass works exactly. Is it another kind of shell (like zsh etc)? Or is it a normal program that is executed within a shell?
Hi @twibiral It is more like you would ssh into a shell.
Multipass is a vm manager for quickly spin-up Ubuntu vms. Instead of using multipass cli you could also ssh into the vm.
Again I am sure this is a stretch, but maybe ssh could be a thing to look at ;-)
I just solved a similar issue while I was getting my own environment sorted, run env in your main terminal and within Obsidian, I'll bet that your environment vars aren't being imported correctly.
Check the PATH that is being set in obsidian shell - in my case I went into settings and added the following to get it to use my regular bash configuration:
source ~/.bash_profile
cd ~
I've customized my terminal with a custom bash profile, so you might need to use ~/.bashrc or other, like your regular terminal does.