browsh
browsh copied to clipboard
Building and using without sudo privileges?
Hello,
On the remote servers that I have access to, I do not have sudo privileges. Is it possible to build and use browsh without it?
Thank you.
In theory yes, but I think it could be hard. If you're building from scratch, then I think it's hard to install Golang without sudo. But I think you should be able to just download the prebuilt static binary at https://www.brow.sh/downloads ? You'll also need to manually install Firefox though, because I assume you don't have access to the package manager?
In this case, I am using an Ubuntu server with "shared hosting" service. Actually, the apt*
commands seem to work; I don't know if they can be used to install packages to an arbitrary prefix though.
Certainly, that's something I could look into if you don't already know.
I wanna write a script to do this, which I'll contribute to the repo if I succeed.
Running uname -m
yields x86_64
. Which binary version is appropriate?
Thanks
Ok Ubuntu, so you can use dpkg
then. I wonder if something like this will work:
First download the Browsh .deb
at https://github.com/browsh-org/browsh/releases/download/v1.6.4/browsh_1.6.4_linux_amd64.deb
Then install it with something like dpkg -i browsh_1.6.4_linux_amd64.deb --force-not-root --root=$HOME
All you need to do then is install Firefox, I'm not sure of the best way to do that without root, but I'm sure its possible. I wonder if Firefox has X11 dependencies on a headless server?? 🤔
Yes, X server appears to be installed. So, this is where I've gotten so far. Not sure your dpkg
suggestion gave me permissions error, but it did. I wound up going with dpkg --vextract browsh_1.6.4_linux_amd64.deb ./
That said, I've hit a brick wall. Both ~/firefox/firefox
and ~/firefox/firefox-bin --headless
yield "Segmentation fault".
I'll poke around liberachat for clues.
#!/usr/bin/env bash
unset CDPATH
cd ~/build || exit
curl -L -O https://github.com/browsh-org/browsh/releases/download/v1.6.4/browsh_1.6.4_linux_amd64.deb
dpkg --vextract browsh_1.6.4_linux_amd64.deb ./
mv ./usr/local/bin/browsh ~/my-prefix/bin
mkdir -p ~/firefox
curl https://ftp.mozilla.org/pub/firefox/releases/90.0/linux-x86_64/en-US/firefox-90.0.tar.bz2 | tar xjf - -C ~/
Sounds hopeful. I'd assume the Firefox segfault is a dependency issue, a mismatch with glibc or X11