Chrooting to provide a desktop environment on a mobile device is not
a new concept, but it is still with it's challenges. This post is about
the various successes and challenges I've had so far on the road to
making it practical for me.
I've had to restrict the scope of this video to keep the length
reasonable. Therefore I have moved some of the topics to the next
This episode is about making it practical for me. It is not about
whether any particular tool is good or bad, but rather finding the
solutions that makes it practical for me.
An image based chroot is very convenient since you don't have to
worry about partitioning.
This was an effective work-around for devices that aren't easy to use mount -o loop.
This looks like it will be a very good solution for many people. It
sorts out many details like the display and desktop environment, with
options to mess around with DPI and much more.
I had a lot of trouble with performance, and on many devices, never
actually getting to the desktop. I suspect these issues are caused by
not having enough RAM. Evey device I tried has 1GB.
This has worked really well for me. It gave me almost everything I
needed, without root, and without getting in the way.
I say almost everything, because I need /dev/fd (a symlink to
/proc/self/fd), which is not present by default on the version of
Android that I have. I needed to make this symlink myself in a terminal,
and writing to /dev required root. If someone knows a non-root way of
doing this, I'd love to hear of it.
My understanding is that this is the wheezy image described above,
plus automatically starting a VNC X server every time you load the
terminal. In my brief testing I found myself regularly creating extra X
sessions accidentally, each on their own port with their own lock files.
It probably wouldn't take a lot of tuning to get this working in a more
No root needed. - Needed for my purposes.
A new X session via VNC is launched every time a new terminal is opened.
I reeeeeeally want to give this another go. Running Gentoo on a phone
feels like all the best kinds of dirty, geeky awesome.
I struck several problems while trying to run Gentoo. Several of them I was able to solve with symlinks in /dev. But eventually I ran out of time and the image is sitting there waiting for me to try again.
This was really cool. I always intended this to be for on-call use in
the sun. Very early on I replaced the SIM card so it was my own money
paying for the internet connection, but a couple of things got in the
way of me using this device seriously
I never gained trust in the privacy of the device.
The keyboard is not good for typing on
This phone had so much potential, and I probably would have continued
using it much longer if I hadn't accidentally bought the Motorola soon
after. The only real issues I had were the keyboard feel, and the
limitation with mounting images.
Keyboard well featured, but uncomfortable after a short time.
OLED screen is gorgeos for console work!
Keyboard is gorgeos to type on, but underfeatured.
Kernel/mount limitations preventing mount -o loop.
I really like this phone. The only reason I stopped using it was because the 1GB RAM just wasn't enough when running apps like Whatsapp along side other apps.
I. LOVE. THIS. PHONE. The thing letting it down is the hardware (it
was modest even when it was released). I'm actually looking for a way to
get back into Sailfish, but on decent specs. In the mean time I'm using
it as my on-call phone.
On topic! This phone is awesome for running a chroot because you have
native access to everything you need without the need to hack, or work
around stuff. If the hardware limitations are ok for you, I strongly
recommend sailfish. There are a few Sailfish phones on the market and
several community ports to various devices, so I strongly recommend
those if there's anything that meets your requirements.
So why did I leave this phone? Keyboard! The on-screen keyboard
didn't gel-well with me (Although a co-worker found it to be fine for
him.), and using the keyboard over bluetooth was incredibly unreliable
to the degree of failing every minute or so.
It also has 1GB or RAM, so didn't perform well with Whatsapp running
the official client. There is a native client that ran well, but that
eventually got blocked.
I don't have much of an opinion on this. It's a tablet, so doesn't
meet my requirements, but the big screen was great for experimenting
With the exception of the Cell radio, I'd recommend this phone in
every way for chrooting. The problem with the Cell radio is reliability.
It regularly looses reception for 20 minutes at a time, even when in an
area where other phones and it would normally have strong reception. I'm
making progress in improving this, so will post back if I have something
Easy to root.
Forking a process is slow.
Disk access is moderate.
Reliable Bluetooth support
Unreliable Cell Radio.
This gets an honourable mention because it was very tempting, mostly
because of the slide out keyboard combined with mid-range specs (they
were reasonable for a short time on release). I never bought this phone
because it was locked down to a high degree, meaning that it was going
to be difficult or impossible to do what I wanted to do on it.
It turns out that I have a lot to say about this, so it's become its
I'm using an iClever (because if you have to say it, it must be
true!) branded fold out keyboard. The only challenges with this this
particular one is that it's not full size, which leads to typos, and
it's got a non-standard layout to get the size down, which leads to
many typos. It works well, and is my most frequent
These are the keyboards that form part of the case of the phone. I
modified an iPhone one to fit the phone I had at the time.
I found these did not offer any convenience/performance/efficiency benefit. The challenges were
This was never as practical as I so much wanted it to be, but it looks so fricken cool! I've actually spent the last hour using it again. It will not become my main choice, but from time to time, I expect I'll pull it out to have a quick play/show off.
The main challenges with it are that there is no tactile feedback,
and you have to be incredibly precise to hit the right key, and even
then it often gets it wrong. Double letters are often not picked
USB keyboard works well, although I haven't found a small one worth noting as far as portability and still being able to type on it goes.
Works well for an on screen keyboard. Excellent for those moments
when a physical keyboard is not viable. Full featured.
Does what it does well, but not convenient or full featured enough
for console work.
gBoard in google play.
Not full featured. Lacks
Keys like ~ are at least 1, if not 2 taps away.
Gestures don't work in the VNC clients that I've tried.
I haven't had any interest in hooking up a physical mouse yet; I'm
finding the touch screen plenty good enough.
I'm literally running tightvncserver, and running the window manager in that.
Right now I'm using IceWM. It's fast, and the interface works well
for a really large scrolling desktop inside VNC.
Choosing the right VNC client makes a massive difference to your experience using a mobile device as a desktop. This is what handles what constitutes a click, double click, right click, scroll, zooming in on that thing that's hard to read, or panning over the desktop to the next task waiting for your attention. Getting this right makes everything feel natural and manageable. Getting this wrong turns a simple task into one of frustration and will ultimately limit your interest in pursuing a mobile desktop.
Even if you follow recipes for everything else, please take the time
to experiment with which client is best for you as this will change
everything. Here's what worked for me:
This gelled so, so well with me. All of the gestures felt natural.
The timings were right. It ran fast.
Unfortunately, with a recent update, they have moved to being more of a centralised/remote service. So now all connections [at least begin by] going through their centralised service, which is useless if you don't have an internet connection at that moment. This is great for remote assistance, but useless for sysadmining and a lot of the interesting possibles that VNC and RDP make possible.
This is my current favourite VNC client. The gestures are almost as
good as RealVNC, but more importantly, it works without requiring an
AndroidVNC hasn't gelled quite as well with me yet, and it doesn't
perform as well as the other two. However it is open source and the
source code is quite extensible. I'll quite likely be providing some
updates to this in the future.
A small screen doesn't have to be a problem. For example, for a while
I was using a Sony
Xperia Mini Pro, which has a 3" screen, which was just fine for hand
held work. At that size, ergonomics quickly fall down when used.at a
desktop viewing distance.
At the moment I'm using a 5.7" screen. But even with this I still
zoom into the desktop, which is fine for looking at one thing at a time.
I then pan around the desktop to find the different tasks I'm working
on. I find this very good for positional association.
At this point, the trade off becomes
((readability vs how much you can see at once) vs what can fit in your pocket).
I recommend a matte screen protector. It will help your eyes relax,
and stop you needing to contort yourself on various angles to see
different details on the screen.
If your device doesn't stand by itself, it's worth getting a stand, and it may even be worth getting one even if your device does stand itself. It will help with putting the device in a position where you can
A physical makes a massive difference to your experience. It is the
difference between the mobile device being a viable desktop replacement,
to not being a viable desktop replacement.
As time has been going on, I've been regularly testing whether I'm
still better off than taking a laptop with me. So far the balance is
still very much in favour of using the phone.
Things I'm considering are
This is one of the big pluses for using a phone in place of a laptop.
A standard USB power bank can charge it; For every day usage, there's no
need to buy multiple power adapters, or carry one with you; A power bank
of equivalent size will keep you going for many trips, and is likely to
be lighter, especially once you take the cables into account.
I've had a good run in choosing them so far. I suggest doing a google
for "Power bank comparison" if you're looking for inspiration.
Sometimes your OS will clean up stuff it thinks is not actively being
used to give you a better experience. I don't have precise information
to hand on how these choices are made, but I'm pretty certain it will
come down to scarcity of resources; particularly RAM, which is one of
the reasons I was keen to have a lot of it on the device I ended up
using for this.
One of the consequences of the OS doing this is that sometimes your desktop may not be there any more when you come back to it. A reboot is another cause of this. This has not happened to me many times. In fact, I'm sufficiently confident in my setup that I have once or twice left work unsaved for a few days. I don't recommend that, because no matter how well you have things running, leaving work unsaved is asking for trouble.
A well written application will gracefully handle a gentle kill
signal, and you should not loose any work. In reality this won't be high
on the priorities for all applications so YMMV.
In the days where the NSA has it's fingers in so many pies, Russian
hackers potentially infliuenced the 2016 US presidential election,
spyware and randomware are a thing, you need to gain a level of
confidence appropriate to the work you intend to be doing. I've done
enough research and my own checking to be comfortable with my decisions,
but I certainly haven't read every line of code.
If you use Google Authenticator or a similar token app to be an extra
factor of authentication (Ie the thing you have), and you're logging in
to something using that token on the device that gives you that token,
you may as well not have the token at all, because someone just needs to
get your device at the moment that your password manager is unlocked,
and they have every piece of authentication they need to be you.
This also goes for people running a token generator in their browser
or command line as well.
I often have trouble articulating why I find this so cool. There's
the convenience of having almost as much as a full desktop always with
me. The nostalgia that I now have more power in my pocket than I had
available in several rooms of top-notch computers as a kid.
The argument ender is that I have a patchey internet connection for about 40% of my commute, and none for the rest of it. Being able to seamlessly keep working regardless of what the connection is doing is marvelous!
The big advantage of a remote server is that it can have persistent
connections to things regardless of the state of your mobile connection.
Meaning you can be have apt-get downloading and installing stuff while
you go through a tunnel.
Other than that, assuming you want to pay for it, you can scale a
remote server well beyond what is possible in a phone right now.
Lost device != data/privacy loss.
Can be started on the fly if an internet connection is available.
On-going cost of the remote machine.
Fast backend internet connection. Your device just needs enough to display the desktop.
External sessions can be maintained regardless of the state of
connection on your device.
For now, I'm thinking that I will have my work stuff (on-call) on a
remote server. Since some of my on-call work involves connecting to
things and having reliable connections is really useful. And I will
generally stay in one place if I get called.
But for personal stuff, local makes more sense because I can
seamlessly keep working regardless of whether I'm in a tunnel.
I'm going into more detail about this in a coming episode. But here
are some considerations
Do take some time to experiment to find what is good for you.
I suggest doing your own research to see what the current
recommendations/best practices are since they may have changed since I
last looked. Things to search for are
Some things to consider are
I had to restrict the contents of this post to keep it to a reasonable length. So I will cover the details I missed in subsequent posts. At the time of writing this, there are currently 3 followups to come. By the time they come out, there may be more. I've put a lot of time into this. If it's useful to you, or someone else; send them a link to this page.
It has been liberating to be able to continue my hobbies on my
commute, but not have to carry several KGs. It's taken some time to get
it right, and it will continue to evolve. But it was totally worth
Above: Imported image from the old system
Above: Imported image from the old system
Above: Imported image from the old system