browsh icon indicating copy to clipboard operation
browsh copied to clipboard

Termux Proot

Open Lucas-mother3 opened this issue 2 years ago • 14 comments

So I was tinkering around browsh inside proot and saw this. Screenshot_20220329_033413

Now you might say, it's just your config, well here's the problem. I used Android 9 (generic UI), running Void Linux via Proot. The question is, why do the browser need ps aux?

Also, if that's possible, I would like to ask about the ssh server too.

Lucas-mother3 avatar Mar 28 '22 19:03 Lucas-mother3

That's just my lack of sophistication! All that ps aux is doing is trying to see if an existing Firefox process is running. I'm sure there are safer more portable ways of achieving that.

The SSH server is here: https://github.com/browsh-org/baas/tree/master/ssh-server 🤓

tombh avatar Mar 28 '22 21:03 tombh

That's just my lack of sophistication! All that ps aux is doing is trying to see if an existing Firefox process is running. I'm sure there are safer more portable ways of achieving that.

The SSH server is here: https://github.com/browsh-org/baas/tree/master/ssh-server 🤓

cool but why browsh needs firefox in the processes?

Lucas-mother3 avatar Mar 29 '22 05:03 Lucas-mother3

By the way, I could recommend running a debug Android environment, install Termux from F-Droid or GitHub, install distros via proot-distro, and test browsh inside the environment.

On the other hand, Chroot in rooted Androids should run Browsh just fine.

In addition to that, how could I run the ssh server myself?

Lucas-mother3 avatar Mar 29 '22 09:03 Lucas-mother3

The docs explain why Firefox is used: https://www.brow.sh/docs/introduction/#design

The idea is that you run Browsh on a remote server with good CPU and internet, then connect to that with a normal SSH client or Mosh, which both already work on Android.

tombh avatar Mar 29 '22 10:03 tombh

I wanted to try browsh myself within an install. I used Void Linux inside the Proot environment and ps aux doesn't work because of the latest SELinux policies introduced in later versions of Android. Yes I could root my android but I don't have a computer right now and it's pretty complicated.

I tried the ssh server but it's temporarily down. I just wanted to explore text browsers for kicks.

Lucas-mother3 avatar Mar 29 '22 11:03 Lucas-mother3

Ah yes, if you don't have a computer (desktop or remote VPS) then using Browsh is going to be hard 😕 Sorry the public SSH service is down, it just got too expensive to maintain.

tombh avatar Mar 29 '22 12:03 tombh

I wanted some fixes and improvements so it can work on Termux Proot. I think there's an alternative to ps aux somewhere but I'm not sure.

Lucas-mother3 avatar Mar 29 '22 18:03 Lucas-mother3

But I'm pretty certain that even if you can make that change there is not Android version of Firefox that is compatible with Browsh. You're trying to use Browsh in a way that it was never designed for 😕

tombh avatar Mar 29 '22 18:03 tombh

But I'm pretty certain that even if you can make that change there is not Android version of Firefox that is compatible with Browsh. You're trying to use Browsh in a way that it was never designed for 😕

I knew that there's a Firefox browser for Android, I can also run Firefox within Android (with some changes)

I know it's kinda possible, I recommend talking to the Termux guys in their discord server.

Lucas-mother3 avatar Mar 29 '22 19:03 Lucas-mother3

I'll add a few statements, but if there's a way to just run a rendering engine without relying on Firefox, then running it on android is certainly possible, for example, using either GTK HTML/Webkit rendering libraries, KDE HTML/Webkit rendering libraries or fork Gecko or something

Lucas-mother3 avatar Mar 29 '22 20:03 Lucas-mother3

Sure, it's certainly possible, but it's completely contrary to how Browsh was designed to work. Firefox and Browsh should run on a remote server, then you SSH or Mosh into that server from Android. So I don't ever plan to implement what you're proposing, I'm sorry.

tombh avatar Mar 29 '22 20:03 tombh

Sure, it's certainly possible, but it's completely contrary to how Browsh was designed to work. Firefox and Browsh should run on a remote server, then you SSH or Mosh into that server from Android. So I don't ever plan to implement what you're proposing, I'm sorry.

Surely tho. How do I host a ssh server then if I could find a viable yet cheap remote VPS or something?

Here's a suggestion, why not use the same technique as tigervnc

You dump which PID is firefox then dump it into a directory (example: /home/user/.browsh/browsh.pid), hopefully knowing the browsh service that firefox is already in the background

Lucas-mother3 avatar Mar 29 '22 21:03 Lucas-mother3

How do I contact with you tho

Lucas-mother3 avatar Apr 01 '22 11:04 Lucas-mother3

@Lucas-mother3 For a cheap host, try https://replit.com/ You can use https://npmjs.com/package/ws-tcp-bridge on both the server and client to send data, and Dropbear should work on Replit with minimal configuration.

hello-smile6 avatar May 12 '22 22:05 hello-smile6