Using an Android tablet for actual work
Post date: Jun 28, 2014 8:02:13 PM
Turns out that an Android tablet (actually any phone) can be made into an actually-useful full-fledged Linux workstation, without rooting it.
By actually-useful, I mean something that a power-user will be able to use. By power-user, I mean roughly somebody who does most of his work in the command line and/or editors, but in a graphical environment.
There is no way around the fact that GUI-based tools developed for a desktop system will be unusable on touch interfaces. For one, UI elements are simply too many and too close together.
Command-line tools are quite another story. Lots of scientific and development workflows rely on some form of console or editor, plus an occasional preview - say a plot, or rendered LaTeX output. The key here is the ability to easily switch windows, and that they appear with sensible defaults that don’t force us to rearrange them every time.
A console-based Linux system: GNURoot
GNURoot allows one to install and run essentially any open-source package, pre-built for the arm architecture, courtesy of the Debian or Fedora distributions, via the distributions’ package management (yum or apt-get).
GNURoot provides a text only interface and some bootstrapped distributions, which are run in a sandboxed environment. I am using the Debian wheezy distribution.
The X11 environment
There are several X servers on Google Play (not counting VNC viewers) but none beats XServer XSDL :
- Supports the XKB extension, required by i3 (see later)
- Using touch is cumbersome, but not impossible. Touchpad-style mouse, if unintuitive at first, compensates for the loss of precision in touch
- Stable and compatible with all recent applications
- Sets a high (and customizable) DPI value, so recent applications tend to show large fonts
- Truly full-screen, so no waste of screen space for useless Android buttons
A keyboard
You definitely want a hardware keyboard - either an USB one (they are very cheap), or a Bluetooth one.
Window manager
The keyword here is usability. One wants a system on which it is actually possible to work, not a gimmick.
If you don’t have a wireless mouse, get the i3 tiling window manager . It’s reasonably easy to learn (the introduction video says it all) and comes with sensible defaults.
The reason i3 is a good match for the tablet is that
- windows open mostly where you expect them, maximized so that the scarce screen space is used, and
- you can rearrange them without using the mouse.
I have not checked the usability of a “traditional” WM with an hardware mouse.
Run
- Start the X server
- Start GNURoot
- Run
DISPLAY=:0 i3
- Switch back to the X server, then Alt-enter at will to open shells and whatnot
Some configuration
I would recommend the following
- Install a SSH server, such as dropbear, for ssh-ing in your tablet
- Fix the missing HOME environment variable (e.g. in
/home/.bashrc
) - Set a root password (for ssh)
- If your keyboard has a modifier key recognized by XKB/xev (in my case, a Zzz key), you may want to use that as a modifier for i3, so you free the Alt key for the applications.
- You may want some .Xdefaults to increase xterm’s font size
- For some reason, Debian does not have firefox for arm. Iceweasel is a good replacement. Don’t expect browsing as fast as native Android, though.
- mupdf is the only usably-fast PDF previewer
- R is a sight to behold. You get the whole of it, I mean, any conceivable package, which is downloaded and compiled on the fly.
- Same holds for octave, gnuplot
- Any language, compiler, open-source utility ever conceived is just one apt-get away.
Limitations
- No sound
- No video
- No access to privileged (<1024) ports, so configure sshd appropriately
- Slightly faster battery consumption (when not in sleep)
What still doesn’t work
- Using Android native applications as viewers
- LibreOffice (at least on wheezy)