tuzig / webexec

WebRTC server for executing command over pseudo tty and piping it’s stdin & out over data channels
https://terminal7.dev
MIT License
34 stars 5 forks source link

issues found on openmediavault 4.1.36 (yes, it's old) #73

Closed udif closed 2 years ago

udif commented 2 years ago
  1. no sudo, and the install log didn't hint I need to run it on a tmpdir somewhere under /tmp
  2. don't assume envsubst is installed. I needed to install the gettext-base package. it might be simpler to simply pipe through sed if all you need is one instance of $USER in a known place.

but now it runs, and it's amazing! I need to test it on my tablet too.

daonb commented 2 years ago

Glad you like it and thanks for the detailed issue.

log didn't hint I need to run it on a tmpdir somewhere under /tmp

It doesn't need to run under /tmp as we're using mktemp to create a temp dir to store all temporary files. Wait, your system doewn't have mktemp either, right?

udif commented 2 years ago

Let me clarify - I didn't imply you need to do something manually wih /tmp to install terminal7.

What I meant is that part of the install script create a temp directory using mktemp and then runs replace_n_launch.sh within that dir.
When webexec.sh failed on one of my machines, that lacks a preconfigured sudo, I wanted to complete the install manually, but it wasn't obvious to me at first sight that the failing part (sudo nohup bash replace_n_launch.sh $USER $HOME) needs to be run inside a /tmp directory that was already created and cd'ed into earlier.

daonb commented 2 years ago

@udif there's a PR awaiting your review: #75

udif commented 2 years ago

I took a look at #75 and will comment there specifically. I do feel the need to correct one thing - I was a bit careless in my description 🤦‍♂️ : It's not that OMV 4.1.36 does not have sudo - it's based on armbian, itself based on debian, so it definiely has sudo.

The problem was that when I added my user I never bothered giving it sudo capabilities, so the failure was not due to missing sudo command but rather due to missing sudo privileges. In both cases the immediate solution would be the same was the same (run su instead), but detecting the general availability of sudo would have not helped here. And yes, the proper solution is to add sudo (already done).