As the title of this posting suggests.
I used the Android app “UserLAnd“, which does not require root. The most recent versions of this app offer a VNC Server, which emulates an X-Server within the Linux system. And the implementation of VNC is ‘TightVNC’. Plus, the latest versions of this app offer a
built-in VNC Viewer, that I find makes the most, out of the tiny icons that display on the high-res screen, as well as out of the fact that often, users will want to operate the GUI with their fingers, along with the physical keyboard that my Pixel C pairs with (:7) …
The setup of this Linux Guest System is much easier than my earlier experience was because the basic Linux distribution, the desktop manager, and certain apps can all be installed just by tapping on a few icons. And then, using the ‘sudo apt-get’ command-line, additional Debian packages can be installed.
There is an interesting side effect to this project: When I give the command:
$ cat /etc/debian_version
I obtain the result ‘10.0‘. This would mean that the Linux version which I’m getting, is the new Debian / Buster, which none of my PCs nor my Laptop are even running. However, the repositories that I’m subscribed to are labelled ‘stable’. The CPU is an ‘arm64′. And the desktop manager I chose was ‘LXDE’. I installed a full productivity suite, including LaTeX. But, I found that three Linux applications did not run:
- LyX – The graphical, WYSIWYM LaTeX Editor (:2).
- Synaptic – A GUI for apt-get that makes it particularly easy to browse package-repositories, before selecting which packages to install.
Latexdraw‘ (:1) (:6).
Everything else I tried seems to work, including “LibreOffice”, “GIMP”, “InkScape”, “Firefox ESR”. On my own, without the aid of simple GUI-buttons, I was also able to install and run “Texmaker”, “Dia”, “Xfig”, “OpenClipArt”, “Maxima” and “wxMaxima”, the Computer Algebra System and its Graphics Front-End. Getting that last item to work properly actually required that I install the package ‘fonts-jsmath’.
The Linux Guest System is currently taking up 5.37GB of my internal storage, and I finally also found out how to share files between the Guest System and the Host System. Within the Guest System, if on the Host System the root of the user folders is ‘/root/<sdcard>’, then this Host System root is mounted at ‘/host-rootfs/<sdcard>’ (within the Guest System). This means that I can open a path directly to this folder in the file-manager ‘PCManFM’, and bookmark it. (:3)
(Updated 9/07/2019, 17h40 … )
(As of 8/29/2019 : )
There is a type of malfunction which can take place with this system, which stems from the fact that a nearly complete X-Server is being emulated by a real VNC Server, but that the graphics are being looped back internally, to a VNC Viewer. When we resize windows, as long as the setup does not have OpenGL, which this setup does not have, the default behaviour is to redraw the window many times. When the window is large to begin with, which might have been a reason to resize it, this can overload the connection between the VNC Server and the Viewer, so that the connection is lost.
A workaround to that problem is, to edit the files:
Within which there is a tag-pair named <drawContents>… If the interceding value is changed from ‘yes’ to ‘no’ in both files, and the session closed and reopened, the result will be that the windows can be resized, but that redrawing their contents will be deferred until the user has finished dragging them to their new size. This can reduce the frequency of VNC Connection overloads.
The problem with ‘LyX’ seems to be, that in the directory ‘/usr/share/lyx’, the program can’t recognize the existence of the file named ‘chkconfig.ltx’. The directory is navigable, and the file is contained within, but even if LyX is told via an environment variable to use that directory as its “system directory”, it complains that the found directory doesn’t contain the file.
AFAICT, This is happening because in my ch-rooted environment, all the files effectively have the same (bogus, Android-originated) userid, and LyX will seem to insist that certain files must be owned by root. I do not have root. And I do not know if or when this problem will be solved, because it only seems to exist when running Linux in a jail (or, with the ARM-64 build).
(Update 9/03/2019, 13h40 : )
I think I’ve found out why LyX will not work.
According to much digging, I’ve learned that For recent builds of Debian, what the developers of LyX were stating the intent of doing, was to create a chroot themselves, for LyX to run converters in, because there was too much perceived danger from the complex ways in which LyX is extensible, in addition to the fact that its converters end up becoming able to do almost anything.
If the devs did eventually implement their chroot, then to mount the System Directory – aka the Library Directory – into this chroot would be an important step to allowing the converters to run there. Mounting the LyX User Directory, as well as a location of Temporary Files, as well as the System Font Directory, would be important next steps.
Unfortunately, it’s neither possible to create a chroot within a chroot, nor to perform a regular mount, from within a chroot, unless one can also become ‘root’. Therefore, directly after LyX gives the command to mount the System Directory, LyX would find that there is nothing at the mount-point, thus making this directory seem empty.
Further, when one gives the command ‘su’ or ‘sudo’ from within ‘UserLAnd’, doing so changes the behaviour of Linux, but not the UID of any process.
(Update 8/31/2019, 16h50 : )
I should remark that the way in which the
built-in VNC Viewer of this Android app works, under Android 8, is very practical. Initially, the screen-resolution under Android, also gets inserted as the resolution of the VNC Server. This can be awkward for Linux, because it can cause the icons and the Panel to appear too small to tap on, on the Android screen. But what this VNC Viewer solution offers, is that the user can Pinch-Zoom the entire Linux desktop as he or she wishes, to make parts of it large enough, for direct use with built-in Android interfaces, including the on-screen keyboard and the tapping of the screen, in a number of different ways, in order to emulate Right-Click, Middle-Click, Left-Button-Drag, and Scroll-Within-Application-Window…
Further, even though I did purchase the magnetically attached keyboard that was paired with the Pixel C Tablet by Google, readers will note that this KB lacks certain keys, that would be essential for the full use of Linux. In the past, in order to compensate for that, I actually needed to purchase and install the 3rd-part Android Input Method named ‘Hackers Keyboard’, which came with its own perils.
In the design of the VNC Viewer
that ships with ‘UserLAnd’, when the Keyboard icon at the top of the screen is tapped, regardless of whether or not a physical KB is being used, an additional bar appears that offers some of the additional keys, that Linux-use requires, but that most Android Keyboards don’t offer.
Conspicuously missing, however, is the ‘Vertical Bar symbol’ that gets used to indicate a Linux Pipe from within a Terminal Window.
And, contrarily to what the first screen-shot suggests, I’d say that although they are installable, “Sound & Video” Linux applications won’t work, because the only interface with the Android Host System is through a VNC Server, that doesn’t offer to redirect sound, at least in any way I could find.
(More Screen-Shots Added 8/31/2019, 18h05 : )
Caveat: LibreOffice Writer crashes when exiting, therefore be sure to save your documents first (:4) (:5)…
Caveats: In the demo above, I discovered that neither ‘Maxima’ nor ‘wxMaxima’ could load LISP modules, unless the meta-package ‘gcl’ was installed via ‘sudo apt-get’. However, once I had done so, I was also able to export the plots shown, first as a .TEX File, and then to a PDF File, via additional ‘texlive’ packages.
And, when I attempted to output (other) 3D Implicit Plots (not shown) to a series of PNG Files, I obtained an error message which I have yet to troubleshoot, but which may simply have been due to a refusal on the part of Android, to allocate scarce RAM to the Guest Application in question.
(Update 8/31/2019, 19h15 : )
When I set the number of (x), (y) and (z) voxels of the attempted, 3D Implicit-Function Plots from (40) to (10), and reduced the size of the generated PNG Files from [600,600] to [400,400], the error messages went away. And, even though the example of the ‘Ellipsoid’ was the first in the actual wxMaxima File shown, all 3 graphics output beautifully, including the ‘Hyperboloid’ actually shown as the demonstrative result:
Apparently, computing a total of 64,000 voxels is not okay, but computing a mere 1,000 voxels works just fine.
(Update 9/01/2019, 12h00 : )
I think that I should point something out, about the way in which ‘/host-rootfs/<sdcard>’ works. The programmers of ‘UserLAnd’ decided, that in setting up their chroot-ed environment, they should mount the root of the Android File System to ‘/host-rootfs’. What this does is, to create a directory which is not itself navigable from within the Guest System. The reason for this is the fact, that Android does not allow users to browse the root of the file system, unless those users have root (which UserLAnd does not give them). Thus, the user needs to know that a sub-directory of Android’s root directory is navigable, and needs to know what the name of that sub-directory is, so that he can point ‘PCManFM’ directly at that sub-directory. And if he has guessed its name correctly, he is then able to navigate this User-Space sub-directory, to the degree with which Android already allowed him to do so (without the involvement of UserLAnd).
For that reason, File Chooser and Directory Chooser Dialogues won’t be able to use this mount-point, unless they also display a bookmark, pointing to the sub-directory. This is because by default, File Choosers and Directory Choosers require that the user navigate from a parent-directory first, to a subsequent child-directory. And as I just wrote, Android does not allow its root directory to be navigated by the user.
(Update 9/01/2019, 22h15 : )
Actually, I found that LibreOffice would crash, even if I just hovered over the toolbars with the mouse cursor. Therefore, some type of solution was needed, to make it usable. The solution I chose was to install the following:
$ sudo apt-get install libreoffice-gtk2
(Update 9/02/2019, 12h00 : )
Offering another observation. A general fact which needs to be understood about this type of configuration is, that the only reason it will work, is the fact that the Debian maintainers have cross-compiled many of their packages, that would usually run on the ‘i386′ or the ‘amd64′ CPU, to run on the ‘arm64′ architecture in the case of recent tablets and phones, or on a specific 32-bit, ARM CPU architecture, two variants of which are referred to as ‘armel’ and ‘armhf’. Thus, the package-manager can download the binaries from those alternative streams of the repositories, because the maintainers put them there, and the maintainers did so, without any real guarantee that the binaries will work, other than the fact that they cross-compiled them.
Well, installing ‘gcl’ as I recommended above, will pull in many dependencies, including the Debian package ‘libc6-dev:arm64′. This is a package which would normally get used, by a person who wants to custom-compile software, written in C or in C++, to run on his own machine. The tiny little problem with this is the fact that for some unknown reason, the libraries contained in ‘libc6-dev:arm64′ were not compiled to the required architecture. This results in spurious error messages when running certain library linking tools, as well as sometimes, when running ‘apt-get’, stating that the library in question, ‘libc.so’, has the ‘wrong ELF binding’.
After studying this problem recently, I’ve come to the conclusion that this error is not serious, because it only makes the development version of the library useless, not the run-time version. But, in order to get rid of annoying error-messages, it may be best to:
$ sudo apt-get remove libc6-dev libc6-dev-bin $ sudo apt-get install libc6-dev-bin
Now, the Debian package that would perform the tasks which this removed package would otherwise have performed, would be named ‘libc6-dev-arm64′ (in case the Android device in question is a 64-bit device). But that package is not even in the repositories! What this really just proves is, that ‘arm64′ support has been provided purely by cross-compiling so far, and to confirm that, the package ‘libc6-dev-arm64-cross’ is in fact in the repositories.
However, ‘libc6-dev-arm64-cross’ does not act as a drop-in replacement for the other Debian package, because in order to use it, highly specialized command-lines need to be given, that tell the compiler that we want to cross-compile. Most source bundles which we can download, do not result in the required command-lines. And so for the moment, I cannot simply custom-compile anything on that Pixel C.
(Update 9/02/2019, 17h40 : )
When I install LibreOffice from the repositories, there is a series of packages available, that have a naming like this:
Installing a non-default instance of these packages normally allows me to select, which theme the application-suite is supposed to have, on one of my Plasma 5 desktops. But on my Android 8, ARM-64 -based Tablet, within the Guest System that is a Debian / Linux system, attempting to install any one of those packages results in the message saying:
'<package-name> has no installation candidate.'
In this case, because of which CPU I’m running Debian on, I’d estimate that this message is displayed because the package maintainers have not yet cross-compiled the required Qt5 libraries. In addition, neither of the following two packages was installed:
Given this past reality, the result was that LibreOffice had no installed way to implement any of its GUI-buttons. These packages don’t just decide what the GUI-buttons – i.e., the icons in the toolbars – look like, but also define functions – i.e., subroutines – that need to be called whenever a GUI-button is hovered over or clicked. There was no function to call. And this is why the application-window would just disappear, or the application otherwise crash, when I hovered over the toolbar.
However, some package maintainer had the foresight to make sure, that at least one GUI-library would be compiled for this flavour of Linux, and that happened to be ‘Gtk 2′. When I installed the appropriate package, for which there was an installation candidate, doing so decided that both the appearance of the toolbar and its behaviour would be decided by Gtk 2. This put an end to the malfunctions.
Now, on the Google Pixel C’s Linux Guest System, I also have applications installed that use ‘Gtk 3′ and work. But by itself, this does not prove that all of Gtk 3 works 100% reliably. Gtk 3 is more complex than Gtk 2, for which reason I’m not as sure of its stability.
(Update 9/02/2019, 20h25 : )
The ‘tightvnc’ server emulates an X-Server, but fails to emulate the ‘XKEYBOARD’ extension which an X-Server would normally have. For that reason, it’s impossible to create key-bindings, such as to set the Compose Key. This is something which the devs of the UserLAnd app have no control over, and it also prevents ‘randr’ from being supported.
Further, by default, when the user hovers over the Toolbar Icons belonging to ‘LibreOffice’, what’s supposed to display in the little bubble, is the Keyboard Shortcut, equivalent to whichever Toolbar Icon. Well as I just stated, there is none, for which reason the string ‘???’ will often appear within the bubble.
The UserLAnd devs can suggest to some users, to install ‘tigervnc’ on the Linux side, replacing ‘tightvnc’. But then, this would also require that some configuration-scripts be edited to launch ‘tigervnc’ instead, and that’s just too much surgery for me to embark on, especially if I have no guarantee that ‘tigervnc’ has also been cross-compiled by the Debian package maintainers, to run on an ‘arm64′ CPU. I just know that ‘tightvnc’ has been compiled so.
(Update 9/03/2019, 7h45 : )
In the past, whenever I tried to run ‘LatexDraw’, what did not follow was a crash of the application, but rather, for the VNC Viewer’s connection to the VNC Server to be interrupted. But lately, I’ve been able to run LatexDraw without any problems. I think that a main reason, for why I can use this Linux application now, may be the fact that I’ve reduced the size of the virtual desktop to 1600×1200 pixels.
(Update 9/03/2019, 15h45 : )
One step which I took before launching ‘UserLAnd’ for the first time was, to have ‘VNC Viewer‘ installed and initialized on my Android tablet.
What this means is, UserLAnd may have been launching this VNC Viewer externally during my entire experience, the same way any Android app can choose to have a URI opened by another app.
(Added, gratuitous screen-shot, 9/03/2019, 22h30 : )
(Update 9/07/2019, 17h40 : )
Performing a ‘dist-upgrade’ via ‘apt-get’:
Please view This Posting as relevant.