How to Add a Web-browser to GNURoot + XSDL.

In This earlier posting – out of several – I had explained, that I’ve installed the Android apps “GNURoot Debian” and “XSDL” to my old Samsung Galaxy Tab S (first generation). The purpose is, to install Linux software on that tablet, without requiring that I root it. This uses the Android variant of ‘chroot’, which is actually also called ‘proot’, and is quick and painless.

However, there are certain things which a ch-rooted Linux system cannot do. One of them is to start services to run in the background. Another is, to access hardware, as doing the latter would require access to the host’s ‘/dev’ folder, not the local, ch-root’s ‘/dev’ folder. Finally, because XSDL is acting as my X-server, when GNURoot’s guest-software tries to connect to one, there will be no hardware-acceleration, because this X-server is really just an Android app, and does not really correspond to a display device.

This last detail can be quite challenging, because in today’s world, even many Linux applications require, direct-rendering, and will not function properly, if left just to use X-server protocol, à la legacy-Unix. One such application is any serious Web-browser.

This does not result from any malfunction of either Android app, because it just follows from the logic, of what the apps are being asked to do.

But we’d like to have a Web-browser installed, and will find that “Firefox”, “Arora” etc., all fail over this issue. This initially leaves us in an untenable situation, because even if we were not to use our Linux guest-system for Web-browsing – because there is a ‘real’ Web-browser installed on the (Android) host-system – the happenstance can take place, by which a Web-document needs to be viewed anyway – let’s say, because we want to click on an HTML-file, that constitutes the online documentation for some Linux-application.

What can we do?

Under Debian / Jessie, there exists a package named ‘netsurf-gtk’. This is an ultra-light-weight Web-browser, that nevertheless succeeds at rendering basic HTML, that has been compiled to run under the ‘armhf’ platform, which our packages need to be, in order to be installable as binaries, and ‘netsurf’ does not require direct-rendering.

I’ve installed it, and the result is as below:

screenshot_2018-03-01-09-17-25

Now, there are two caveats with this:

  1. Netsurf complains that it cannot access shared memory.
  2. This does not make Netsurf the default browser, because the assumption made by Debian maintainers is, that the user would like to have a more-serious browser as his default browser.

Issue (1) above should not be remedied. There does exist a preloadable shared library, that makes Android shared memory available to GNURoot, but it breaks the ability of a file-association to execute a binary directly, and, this plug-in does not work reliably. It really only needs to be used, if we want the fast playback of videos, say at 30FPS.

Issue (2) above can be resolved. We can create a symlink to ‘/usr/bin/netsurf’, and place it in the directory ‘/usr/local/bin’, and the name of that symlink should be ‘x-www-browser’. The reason not to put this symlink directly into ‘/usr/bin’, is the fact that the package-manager will use that location, in order to set up package-installed ‘Alternatives’, and so for the user to place anything there most-probably creates a conflict.

 

ln -s /usr/bin/netsurf /usr/local/bin/x-www-browser

 

BTW, On that tablet, GNURoot is currently consuming 4.23GB of storage, which is therefore also close to the size of my Linux guest-system.

 

Dirk

 

Print Friendly, PDF & Email

2 thoughts on “How to Add a Web-browser to GNURoot + XSDL.”

  1. i read some of you blog and thanks for the info. Im really enjoying the software but im having trouble adjusting the window size on the debian desktop. How can i correct this problem, it’s making navigating somewhat difficult.

    Thanks
    netjumperus
    email: netjumperus@outlook.com

    1. This is generally a bit tricky, since we’re not really using a mouse. I needed to change the default-settings of the XSDL virtual X-server, so that instead of registering to single-tap or double-tap, as left-clicks, XSDL now uses ‘tap-hold’ to register ‘holding down the left mouse key’.

      Because after all, the problem you’re describing seems to be, that you need to drag a part of a window, but can only seem to click it? So, as XSDL starts up, it gives us a brief few seconds to change its settings. And after having chosen that, we can change the mouse-behavior. You’ll find that even after you’ve customized your mouse, the emulation from the touch-screen will remain a bit quirky.

      Dirk

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>