Posted
by
Unknown Lameron Tuesday March 06, 2012 @03:01PM
from the x11-will-never-die dept.

New submitter mkwan writes "The open-source X Server for Android has hit beta and is now available for download through the Android Market. On Australian networks at least, smartphones are assigned publicly-accessible IP addresses, so it should be possible to display many Linux applications on an Android smartphone simply by setting the DISPLAY environment variable to the phone's IP address followed by :0"
The source is available under the MIT license (or Apache; the project page and story disagree) over at Google Code. It doesn't support all of the X protocol and there's no Xlib implementation (i.e. no X11 apps on the device yet except via the NDK if you're lucky), but it is a reimplementation of the X server in Java for Android. You can run remote applications at least.

Are you really that in the dark? Ssh can't do X. It can *forward* X11, but using ssh, I would have access to only a command line and text based applications. With an Android Xserver, I can display any app on my Android tablet that is running on my desktop machine, and do it efficiently (unlike vnc). I could even use XDMCP and login to a full session on a remote machine.

And later, this can open the door to porting Linux/BSD GUI applications (and wind

I don't know why *you* would. But I have lots of useful things I do remotely with X. I have some management stuff that is much easier to do with a GUI. I can remotely even remotely run my mail client. Certainly, it is not for everyone, though (or even most people).

Don't be so judgmental! Actually, there is absolutely nothing "wrong" with the way I do it.... it is exactly what I need and want. I have to log into that server several times a day when I am not at work, anyway, to maintain it and I have been running Claws remotely for many years. It is fast and efficient.

How about browing web pages on intranets? Text-mode web browsers suck. I love the UI of links2, and can't imagine why nobody else is copying the keyboard shortcuts it uses. However, I can't even get past the login prompt on most web pages. I love being able to pop out my Android slider wherever I am and SSH in and do real work, but not being able to get in to the company Wiki, where all my notes are, or fire up the Nagios web interface and just see what

Trying to run a desktop app on a smartphone screen isn't going to work very well. If what you need is access to an internal network, tunnelling into it with ssh works a lot better. You can use the native applications as if you were on that network.

If you have a mobile broadband device such as a tablet, netbook, notebook, USB card, connection card or Mobile Hotspot device, effective beginning with your next bill following notification, your on-network monthly data allowance will no longer include unlimited 4G.

You run it only when needed... He specifically said "same reason as SSH". That is, access a remote system to do some actions...You sure can still call (unless you are on CDMA...) and play games...You must also know that when the server is idle, it consumes neither data nor battery...

The BadImplementation error is because there's no ICCCM-compliant window manager running.

Are you sure? I thought any window at any nesting level could have arbitrary properties (indexed by atoms). It sounds like the XGetProperty call is unimplemented. If that's the case, then running an ICCCM WM is impossible.

I expect the developers of this put each "window" on it's own screen, or set a number pf screens, and let the windows play around in there.

Nope. It's just a plain X server. No window manager. On my Motorola DROID (original) I was able to run xterm. I used connect bot to ssh to my Debian box, set the DISPLAY environment variable to the IP address (WiFi) of my phone and ran xterm. The X Server app acts like any other app in switching back to it and the xterm just sat there in the top left of the screen. Touching and swiping just move the mouse cursor. There's no window manager, so you have to move the cursor over the app you want to have focus (

Non-iPhone phones are just now starting to get 720p displays in the 4" formfactor, and 4.0 ICS devices support USB and Bluetooth HID prehiprials. Provided you have the eyes for it (or reading glasses, at least) you shouldn't have too much trouble emulating the 1998 desktop experience on a phone

It's an X server, not a webserver. What it does is allow apps designed for X to run on your phone. It doesn't even need to touch the network.

X Windows consider the screen to be what is being "served", so an X server is on the device with the screen. It allows X apps to be run on local or remote machines. If someone has compiled an X app to run inside an Android phone, then you might be able to access it now.

Quite. X is just a remote graphics framework. The app could be created with a tablet in mind. It doesn't have to be a conventional desktop app. You can treat the phone as a peripheral for your TV or or PC without dealing with the nonsense of IR transmitters.

Have you ever seen a North Korean parade or other choreographed event? They seem to be the most ridiculous over the top displays of patriotism on the planet. North Korea is almost the very definition of extreme patriotism.

Or are you one of those that think patriotism is something that only applies to Americans?

Maybe we can run a Linux desktop environment. And then add some common apps that are used among many POSIX-compliant operating systems. And then get rid of all the stuff that requires Google services, and add a compiler so we can run whatever we want.

We could call this flavor of Android the Generally Normal User-environment Linux, or GNU/Linux for short.

An IM client such as pidgin that I can trust to not passing my messages to some third server would be awesome. All the current Android IM options feel kind of dubious somehow, I am using Meebo because it's at least familiar-sounding and used them in the past without getting loads of spam or something. I'd love pidgin...even Finch would do.

I know libpurple has been ported, but nobody has stepped forward to write an interface to it (or an OTR plugin)

It's actually very useful. For a long time now, it was possible to run full fledged Linux distros such as Ubuntu in a chroot inside Android (note, this also neatly works around the Xlib problem - chroot has its own userspace libraries for everything). This, in turn, lets you run things like LibreOffice on your Android tablet - particularly handy when you have a BT keyboard, or own an Asus Transformer or Lenovo Thinkpad tablet.

The catch was that you then had to use a VNC client to work with graphics apps, wh

I'm doing this now with my Ubuntu chroot. I usually use androidVNC to show the graphical applications but I'm messing around with this xserver. So far, for the things that work with it it is much better than using a vnc client. The only problem is there are a lot of applications that don't work. Sadly, almost nothing works.

Neat, but not especially hard. There have been several X11 implementations. I remember one written in Java about 10 years ago (maybe this is a port of that one?). There are several C implementations, suck as kdrive. Implementing X is not hard for the core protocol. Most of the complexity in X.org is in the drivers. Beyond that, there are all of the extensions.

Of course that assumes that everything is going via ssh, which is probably a fair assumption for nearly anything that isn't on the same local network. If the point is to get it on a phone/tablet then it's fair to assume that it's not on a local network and those

I miss the insecure days of trolling my co-workers with an app that made their mouse move one pixel in a random direction (was great on one guy who used hot edges to switch desktops and the mouse got stuck in the corner constantly switching desktops). Alternatively my office mate had a pop up window come up that would stay a few pixels away from their cursor. The scary part was the SA that was half through ordering replacement hardware before we came clean...

>I hope that nobody would actually consider a remote X session without tunnelling over ssh...

It depends on your network and environment. If you are on a local, secure, wired, switched network, it doesn't matter that much if the X11 traffic is not encrypted. And without encryption, it will be much simpler, faster, and more efficient.

But yes, if you plan on doing this over WiFi or the Internet, then I would strongly recommend running it through ssh or some other encrypted transport.

That is also true...(as long as you can take the even more CPU hit on both sides... which is not a good thing on a multiuser application server) but I was speaking only about encryption, not compression.

Also note that most implementations of ssh have compression off by default- it must be requested (-C). And compression can actually *hurt* performance on a fast/local network, because it will increase latency/jerkines

While that may be true I have noticed a performance increase when users have switched from telnet and X transport to ssh with everything on port 22 - however that is with 2GHz+ machines at both ends and compression turned on. Even fairly old MS Windows implementations of X that only allow sessions to start natively with telnet seem to get a speed improvement by using PuTTy to handle the transport.That is with applications that typically bring up two full screen windows at a time with a lot of 2D graphics d

I suppose this should be interesting, but mostly it strikes me as dumb. Mostly as a result of Google having reinvented the wheel by creating an entirely new and no more efficient or effective rendering and windowing subsystem for Android, then having the rest of the open source community chase along behind them. I suppose that's not terribly surprising, seeing as how Android was proprietary out of the gate until Google bought them.

In other news, I'll hope that my N900 holds out and that another device, probably one from Samsung running Tizen, comes along before it fails.

Their rendering and window subsystem has already proven to be laggy and inefficient unless you throw overwhelming hardware at it. Why even continue do it in Java and on Mobile!? There's neither memory, cpu/gpu, nor battery, to feed that mess properly.

Even Windows Phone moved their rendering engine to native. Why not a proper port of Wayland (or just switch to Qt) instead?

Because Wayland has no support yet. Because millions of machines already support and use X11 applications. Because X11 works just fine.

As for running X on a "mobile"- phones are already more powerful than machines that ran X just fine a decade ago. And modern Android tablets and phones have plenty of memory and CPU to do it... even in Java.

There is absolutely nothing crazy about wanting to run X on a mobile device. Having more options is a wonderful thing. Now- I will agree that trying to do it in Java

Well, as I understand it, embedded SoC vendors only provide basic drivers for the linux framebuffer and apis to access stuff like embedded opengl. So historically Google was forced to kludge software based rendering.

Linaro and TI, through its Beagleboard/Pandaboard communities may have developed suitable drivers to power X11 on the OMAP-based Maemo devices such as N9 but have other vendors like Qualcomm, Nvidia, Samsung, etc?

So the scenario for accelerated X11 and Android seamlessly integrated on the same d

Received mine in December 2009, port has suffered more heart-stopping yanks and twists than I care to count and it's held strong. Still plan on reworking the solder joints when I get a chance though. And yeah, dropped it a couple times but all that happens is dust gets knocked loose.

Doesn't seem to be the solder connections from the usb connector that are the problem on mine - it's something to do with the connector itself. My original Nokia charger doesn't work anymore, my wife's HTC charger does - it has more prominent tiny tabs on the micro USB plug which seems to make the difference. I'm dreading the day that that stops working. I've got a spare battery and I can swap them, but that requires powering down, of course.

Hopefully this will enable the implementation of the NX technology ( http://en.wikipedia.org/wiki/NX_technology [wikipedia.org] ) on Android, since using the X protocol directly over the public Internet is terribly slow.

We have Chrome remote desktop [google.com], which allows accessing other machine's desktops using any chrome browser, and we now have Chrome for Android [google.com]. I have to think that eventually these two things will work together to give remote desktop client abilities to Android phones.

I have my VNC server set to only accept connections from localhost (and it's firewalled, too), so that only connections which are forwarded and encrypted via SSH wind up being accepted. This way I get secure remote access, the VNC protocol tends to be less bandwidth-intensive than raw X, and it preserves my session in case I get disconnected.

Don't get me wrong, an X server on Android is a cool technical achievement, but existing SSH and VNC clients for Android are a more practical and secure way of accessing your workstations/servers on the go.

X Protocol does not use more bandwidth than VNC. If anything, the opposite is (typically) true.

However, there are more round trips when starting an application when using X Protocol as compared to VNC. Latency is the performance killer for X Protocol, not bandwidth. This means applications may/will launch faster on VNC. NX (based on dxpc) short-circuits some X protocol requests, avoiding the latency issue. Typically, NX (FreeNX) performs as well as VNC.

the VNC protocol tends to be less bandwidth-intensive than raw X, and it preserves my session in case I get disconnected.

Now that we have X11 on Android, there's no reason an NX client can't (FINALLY) be ported to Android. NX completely blows away VNC on bandwidth, as well as responsiveness, redraw times, etc. It also preserves sessions like VNC, and has many features VNC lacks. Also, SSH is fundamentally built-in to NX, so you don't need to set up any port forwarding yourself.

I have been suffering with using androidVNC to do all of my x server duties on Android and it's been a long hard wrong but finally it would seem I have suffered long enought. THIS IS FUCKING AWESOOOOOOME!!!!

It would appear my enthusiasm was a bit premature. This thing needs work. It crashes on everything but the most rudimentary of applications but it does at least work. I have a feeling that there's going to be a lot of enthusiasm for this though. Great things to come.

While pure, unadulterated X11 might not be the thing you'd want to run on your phone or tablet because of the chatty network protocol, there are some X11 derivatives which can make this fly. Have a look at the x2go [x2go.org] project for an example of what I mean. Having X11 on Android means the x2go app is only a short development cycle away, and that is good news for those of us who like to move around while still needing access to something which only wants to run a gui.

I'm curious - what does Android (and WebOS) use in place of X as their Windowing system? For desktops, I understand that X is the default, although there are ongoing attempts to bring Wayland into the picture. Also, for Plasma Active - the Spark tablet that was discussed here some weeks ago, does that sit on X, or something else?

The other thing about setting the phone's display to DISPLAY ____:0, are they now using IPv6 addresses? If not, what do they do if it is IPv4 and NATed? Do they do DISPLAY 10.