4 Linux desktop in an old Android tablet
Guillem Borrell Nogueras edited this page 1 year ago

I bought a cheap tablet some years ago, a Samsung Galaxy Tab A (2016). It's very modest in terms of performance: 8 cores (although only 4 of them are actually useful), and 2 GB of RAM, but it's still fine for watching movies and keep my daughter entertained. It becomes even more useful if I can eventually do some work with it, which means installing some development tools in it.

I used to run some linux applications with Termux, but all my attempts to update the application were unsuccessful. Termux used to be available in the Playstore, but now I have to install F-droid, and enable a good amount of additional permissons just for an unsuccessful install attempt. The issue with Termux is that it's a monolith, and it either installs or not.

UserLAnd, is a relatively tiny application that allows to run multiple linux distributions and applications in Android. You can easily find it in the Playstore. It's simpler and it provides more features than Termux, like running a full destop linux distro on Android. That's exactly what I tried, but I was unsuccessful too (this is what happens when you try to install stuff in a table that's more than 5 years old), so I went the hacker way. The terminal installs successfully, and from this to a desktop, you only have to get VNC to work.

Getting tigervnc to work was not trivial either. For some reason, the Ubuntu binary is not able to load the right runtime, and the server has to be invoked with the following command:

LD_PRELOAD=/lib/arm-linux-gnueabihf/libgcc_s.so.1 vncserver

And we have a desktop!

The desktop runs the awesome window manager, and the midori browser. And this is pretty much the best you can get. If you try to install Firefox on a 2GB tablet you'll crash any tab you open.

Finally, you need a VNC client. I tend to use the Android version of the RealVNC client, that has copy-paste support, and it's able to reset the server's screen size. It also maps the screen touch to a cursor very nicely. It's not free (as in freedom), but it's clearly the best tool for the job. You only have to point the client to localhost:5901, and that's it.

Update

I decided to scrap the ubuntu environment for a debian one, and that's much better. The trick to run the vnc server is not needed anymore, and fancier terminals like Terminology run withtout issues. Packages are slightly older, but they're fine.

The first necessary step, however, is to install Python from source.

These are the commands to set up the system

MATHLIB="m" pip install numpy