Ubuntu For Android: A Lose-Lose

Ubuntu for Android has been the talk of the town for the last few days. What is purports to do is bring a Linux desktop experience to you from a phones docking station. It looks like they’re seriously pushing it for the motorola atrix. Reason being the motorola has HDMI out (something standard on androids nowadays) but it also is one of the few phones with a keyboard and dock. Sounds great, right?

Well, no actually.

For the power user, it’s a lose-lose because the power user probably has a linux desktop. There’s really zero incentive to run ubuntu in the background except to eat your battery and storage because you can’t access it while your phone isn’t docked. For the people that do actually use this sort of device, they probably already own a tablet or a laptop. More on the point, there’s two ports of openoffice to the droid, and there’s google’s own office offering along with document storage in the cloud. The services are already there for android without having to switch out from android to another OS.

The second glaring problem for power users is that you can’t install another Linux on the phone. Say my preference is RedHat’s desktop (which is actually the defacto linux desktop in business). What do I do with a phone with ubuntu installed on it? Not a lot, clearly. What if I want to load another OS on it? Too bad. What if I want to run a second android OS on the phone? Too bad.

That last bit is really important. The way the Android OS is engineered there’s a setting for the screen size (pixel density) to determine which apps run in which modes or which apps are compatible for a given device. What I would do if I were Motorola is instead of entertaining Ubuntu on the phone (which really doesn’t bring any value to the device) I would run a second android on the phone and leverage googles sharing services. The first android would be configured for battery savings (no HW acceleration) and the second android would be configured for speed (all HW acceleration). Dock it and you bring up the second android, which looks just like the first except all the settings are geared towards making it a tablet or desktop.

What about the casual users? Casual users will first notice a several GB partition missing from their phones which supposedly have 16GB of storage. Unlike the dual android setup above, each OS in this ubuntu-phone shit sandwich needs it’s own resources. Secondly they’re going to notice the apps don’t run correctly without pixel density being set correctly. Games, which you would reasonably expect to work nicely and look better on a PC screen simply aren’t going to work because their UI isn’t geared towards a keyboard and mouse. Finally why ubuntu at all? Casual users want either a Windows PC or a Mac. They won’t understand why the resources (documents, spreadsheets, etc) aren’t available in both. Ubuntu can use google’s cloud storage, but Android can’t use Ubuntu-One, which makes the biggest sellingpoint of an ubuntu tablet a liability instead of a bonus.

Finally, why a 2.x series android OS?

Ubuntu needs to stay the hell off my phone.

ITPro on Linux, Slackware and BSD

Normally I ignore the trade rags. There’s been a bunch of Linux-come-lately publicans which were really nothing more than advertising. Even Linux Journal was briefly on my shit-list. Of course, if you itemized your taxes this year, you’ll know why packing a sheaf of advertisements into a “magazine” is appealing to advertisers and consumers are generally apathetic. IT Pro recently rose above the level of crap put forward by most of these and had a fairly decent article on the hows and whys of Linux versus BSD. If you’re curious as to how much of an accidental hero Linux is, this is it. Frankly Linux should never have been and it was only because Torvalds was doing more with less that it stuck around. That and it showcases the power of advertising. Frankly there never would have been a Linux or a BSD had AT&T and IBM and everyone else did the whole Microsoft thing before Microsoft. UNIX was supposed to work on POSIX and a series of standards, and it never did. There was always lockout, but the advertising for The Next UNIX always said “Cheaper, and STILL WORKS!” Cheaper maybe, still working never. Linux answered the call for something you could make work and still be cheap (free), and were it not for the accidental oversight of BSD’s fanbase missing the math co-processor requirement there wouldn’t have ever been a Linux in the first place. Keep in mind the Linux kernel has been paying for it ever since – BSD is usually faster by a factor of two, but BSD also has an ungodly complicated kernel linking system (compared to Linux) and it’s heavilly wedded to the hardware. The GNU/HURD project which was supposed to be a marriage to Linux to the BSD (“mach”) kernel never got off the ground simply due to differing ideas about how userland is supposed to talk to the kernel. Best intentions and all that. The spiritual successor to HURD is Gentoo.

IT PRO also did a story on Slackware. Slack has a special place in my (and a lot of people’s) heart by being the first commercial Linux distribution in English that didn’t suck. SLS always was a mess of bad assumptions, slackware was supposed to be SLS without the associated preconfigured crap. SLS never quite got it right, it was somewhere between BSD and Yggdrasil with the latter getting automatic configuration done correctly for most hardware. Unfortunately 1995 saw people trying to buy hardware to run Linux, Linux didn’t have the critical mass to go the other way with nVidia and ATI tailoring their drivers to run on Linux, so Yggs went the way of the buffalo.

Slack breifly made headlines by skipping a version number in the SuSE/Redhat pissing contest of “Linux 7, 8, 9, etc”. Slack simply opted to skip numbers to get ahead, it was an epic troll. Unfortunately the article points out that slack dropped packages which were too complicated to configure (something constantly plaguing the GNOME community, I personally wish I could just march them into the ovens) and really this is the reasoning behind slack. It either is stable and builds or it’s not stable and doesn’t build so it gets cut. Contrast this to GNOME where the build scripts are straight out of BSD’s ports system and contains all sorts of strange build hacks if you want an illustration of the problem. It touches on something much deeper though – most Linux distros use XOrg instead of X11, and slack seriously missed the boat by staying on X11 for a long time. Granted, there’s some really cool stuff out there in X11 missing from XOrg, but you probably won’t miss it if you’ve never rolled-your-own from source. By contrast, most distributions don’t have looking glass or enlightenment because they require esoteric hardware access and the X11 framework. E only recently updated, but there’s a point to using X11 or XOrg and I think a lot of Linux newbies miss their obligations in understanding what is what and why it’s there in a particular distribution.

There’s a quote which I think is a good ending – “Use Ubuntu Linux and learn Ubuntu. Use Slackware and learn Linux”.

X and sudo

For some strange reason, ubuntu is really misbehaved when it comes to preserving environment variables. The normal fix to running X applications over sudo is to edit /etc/sudoers and make sure that DISPLAY and XAUTHORITY are in the preserved variables list. Log out, log in, it’ll work.

Ubuntu, for whatever stupid reason, absolutely refuses to preserve these variables. Granted here at work we run novell’s SuSE and I too run SuSE. When the Ubuntu guys (both of them) have a problem, it’s sometimes hard to troubleshoot especially when I have to say “It works for me”.

Here’s the deal. If you’re having problems making X applications work over sudo, either allow people to sudo bash to open a root shell they can work in or script the following:

xauth merge /home/USERNAME/.Xauthority ; /sbin/yast2

Obviously substitute username for the user having the problem and /sbin/yast2 is whatever you’re trying to run in X as root.

You guessed it, $USER doesn’t work because Ubuntu doesn’t export $XAUTHORITY or $DISPLAY either.