X Server Now Available For Android 131
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.
Sounds funky but (Score:4, Informative)
Why?
Re:Sounds funky but (Score:4, Informative)
Same reason as SSH - it's a convenient platform. It'd be nice, if I needed to do something work related (or access something on my home machine) to have an available X session.
Why? (Score:3)
What can you do with X that you can't do with ssh?
Re: (Score:2)
> What can you do with X that you can't do with ssh?
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
Again, why? (Score:2)
What can you accomplish with X11 that you can't do better with ssh?
If you want to run a full desktop linux stack on an android device, that's another thing (and it's been done), but why would I want to remote manage a machine over X?
Re: (Score:2)
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).
Re: (Score:2)
If your solution for delivering mail is to run a remote client, you're really doing it wrong.
Re: (Score:2)
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.
Re: (Score:2)
I don't mean to be judgemental, it's just... It's like reading your neighbours paper with a telescope. Sure, it works, but there's a better way. Like an IMAP server.
Re: (Score:2)
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
Re: (Score:2)
These are all things that would be better done with a local app, perhaps via a ssh tunnel.
Re: (Score:2)
WTF is a local SSH tunnel?
Anyhow, I have no idea what you're disagreeing with... How would you suggest running these GUI apps over an SSH tunnel without this X11 port to Android?
There are simply NO NATIVE ANDROID APPS that can do what I've listed. X11 is strictly required. Before this port of X11, there were NO OPTIONS AT ALL, so I'm very happy to see it coming along.
Re: (Score:2)
There are lots of native email and instant messaging apps.
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.
Re: (Score:2)
Re: (Score:1)
Re: (Score:2)
I don't get it. You mean that sprint doesn't have data caps. But it does! There are dta caps on all US companies now.
I'd better take a closer look at my Sprint bill, then. Having trouble finding that.
Re: (Score:2)
Sprint data cap doesn't apply to smart phones yet.
Re: (Score:2)
Hit 20GB for a couple months in a row and let me know how that works out for ya.
Re: (Score:1)
Perhaps GP was referring to this cap Sprint instituted around October or November of 2011 [arstechnica.com] on tablets, hot spots, and tethered mobile phones. Still unlimited data for untethered phones (I think).
From the announcement on Sprint's website [sprint.com]:
Data usage limits when using 3G/4G Mobile broadband devices
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.
Re: (Score:2)
I don't get it. You mean that sprint doesn't have data caps. But it does! There are dta caps on all US companies now.
MetroPCS doesn't have data caps, even for 4g.
Re: (Score:2)
Don't they (like TMO) slow you down over a certain amount though?
They claim they do not. I don't generally trust salespeople, but I've never had a problem. Use a Samsung galaxy indulge for wireless tethering all the time.
Re: (Score:1)
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...
Re:Sounds funky but (Score:5, Informative)
No, you probably CAN'T play games. Really, I just played around with it. Close to useless.
For example, nedit won't start. Emacs won't start. You CAN start an xterm, and then have access to all terminal goodness, but there are SSH clients for Android that will do just as well.
The feat if truly impressive, but not enough of "X" is implemented to make it much more than a toy.
When you try to run something serious, this is what you get:
X Error: BadImplementation (server does not implement operation) 17
Major opcode: 20 (X_GetProperty)
Resource id: 0x0
X Error: BadLength (poly request too large or internal Xlib length error) 16
Major opcode: 72 (X_PutImage)
Resource id: 0x0
Cool concept, but it needs more work to be truly usable for anything beyond "xeyes" or "xclock."
Re: (Score:3)
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.
Re: (Score:2)
Heh, I hadn't even thought about the phone aspect - low rez, yuck. I was mostly thinking about tablets, but even in the case of a phone:
Some of us don't have data caps. Even then, many phones can use WiFi... Which mitigates your throughput complaint.
Battery life could be an issue, varies by phone/tablet.
Both of my previous android phones allowed me to make calls while using apps. My current phone is WP7, so it isn't relevant to the conversation.
Play games while using X, or play games that use X? Guessing bo
Re: (Score:2)
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 (
Re: (Score:2)
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
Re: (Score:2)
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.
Re: (Score:2)
If I understand the summary correctly, it allows apps designed for X to use your phone as the display.
Re: (Score:3)
If I understand the summary correctly, it allows apps designed for X to use your phone as the display.
Which is actually a lot better, if you think about it. It lets you have an app 'running' on your Android device anywhere, but with the performance of your 8-core 4GHz x86 PC at home.
Re: (Score:2)
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.
Re: (Score:1)
So I can launch Rhythmbox on my HTPC, display the GUI on my phone, and have a decent audio remote on my phone, just like that.
Re:Sounds funky but (Score:4, Informative)
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.
Run any app you like. Skip the nonsense with walled gardens.
Re: (Score:2)
Re:Sounds funky but (Score:5, Funny)
Re: (Score:3)
Why is the North Korea of text editors, the most patriotic?
Re: (Score:2)
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?
Re: (Score:2)
Read the post that was in reply to again. Note why I would mention a communist state...
Re: (Score:3)
Bah, real vi doesn't use X ... it just requires a console.
You guys and your "almost vi" with your namby pamby file menus and clicky buttons.
Re: (Score:2)
... it just requires a console.
Pfst....Not if you know what you're doing. Back in my day we didn't have that fancy vt100 and we liked it.
Re: (Score:2)
Maybe we're using the term "console" differently ... I guess I simply meant a command prompt. But, I guess that's probably technically incorrect.
My first year of university I had to use a line editor over a 300 baud modem ... which was remarkably not much different than a VT-52 at 1200 baud which you'd get in the labs. :-P
However, I still love to see some poor schmuck that needs Emacs with all of their
Re: (Score:2)
there was no emacs, and he wasn't allowed to install it
Good times indeed.
Re:Sounds funky but (Score:5, Funny)
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.
Re: (Score:2)
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)
Re: (Score:2)
>
I know libpurple has been ported, but nobody has stepped forward to write an interface to it (or an OTR plugin)
I've been intending to do just that for so long now, but never have the time. Alas...
Re: (Score:2)
I'd love you forever.
Re: (Score:2)
Re: (Score:2)
That is great. Oh, and good luck with that job!
Re: (Score:2)
I rewrote the pidgin-otr plugin to use plain libpurple a few months ago. It will work on anything that libpurple works on, including finch. You can read about it here
http://lists.cypherpunks.ca/pipermail/otr-dev/2011-December/001226.html [cypherpunks.ca]
and grab the code here
https://gitorious.org/purple-otr#more [gitorious.org]
There's already a package for it in Arch Linux.
http://aur.archlinux.org/packages.php?ID=55511 [archlinux.org]
I second that. (Score:1)
Suppose these people had devoted their time to producing something useful.
Re: (Score:2)
Re: (Score:2)
I'm pretty sure my gTablet would handle a USB floppy drive just fine. However, I've never touched one.
Re: (Score:2)
Connect your phone to an external screen, keyboard and mouse, configure XDMCP - and you've got yourself a nice X terminal.
NCD used to charge thousands of $ for them back in 199x...
Re: (Score:2)
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
Re: (Score:2)
Re: (Score:2)
Re: (Score:2)
Um, dalvik isn't Java(TM) - the whole point of Larry Ellison's lawsuit.
Blame Google, rather than Oracle for any laggy performance. In fact, benchmarks comparing Hotspot to Dalvik (froyo) some time ago showed Google had some catching up to do.
Re: (Score:2)
Exactly what I was thinking. NX client for Android! I would soooooo love for that to happen.
chroot (Score:2)
Re: (Score:2)
Crap. The WORST SECURITY thing to tell people. (Score:5, Insightful)
Doing what the article says requires you to use "xhost +" as the magic cookie requirements will not have been met.
Second, even with the magic cookie, all transmissions to/from the X server are unencrypted - which means your magic cookie (the password to the X server) is passed in cleartext for anyone to see.
Having an X server on android is usefull, but also get ssh. That will securely route the X protocol (with encryption) from a remote (to the android display) system and with proper display.
Re:Crap. The WORST SECURITY thing to tell people. (Score:4, Interesting)
Well, the article implies that he hasn't implemented xhost security yet so it's kind of a moot point right now :)
Note this is not X.org, but a new implementation of an X11 server in Java. Which is pretty neat if you ask me.
Re: (Score:2)
Re: (Score:2)
Re: (Score:2)
You don't need xauth remotely now anyway. (Score:2)
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
SSH, I hope? (Score:5, Insightful)
Re: (Score:2)
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...
Re: (Score:2)
It's a crime. A crime that comments like this haven't been modded up to +5. What's wrong with /. these days?
Re: (Score:2)
>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.
Re: (Score:2)
Some X11 data compresses quite well so in some cases ssh actually improves performance.
Re: (Score:2)
>Some X11 data compresses quite well so in some cases ssh actually improves performance.
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
Re: (Score:2)
That is with applications that typically bring up two full screen windows at a time with a lot of 2D graphics d
Reinveting the Wheel, Backwards (Score:3, Insightful)
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.
Re: (Score:3)
If only Maemo could run on a Droid 4 I wouldn't have to worry so much about my N900...
Re: (Score:3)
Actually, X11 has been tried before on mobiles and was often found lacking. Android's rendering and windowing is just better than X11.
Re: (Score:1)
Works just fine on the N900, N9 or Spark though. :)
Re: (Score:2)
Works fine on Ubuntu for Android.
Re: (Score:2)
Actually, X11 has been tried before on mobiles and was often found lacking
Really? You see, I had OpenBSD with X11 on a Zaurus a few years back and it worked very well indeed. Have you actually had any experience wiht mobile X11?
Re: (Score:2)
OpenMoko, OLPC. Both had (and I believe still have) issues with memory usage and partial redraws.
Re: (Score:2)
>Actually, X11 has been tried before on mobiles and was often found lacking. Android's rendering and windowing is just better than X11.
[citation needed]
(Or are you just talking out of your bunghole, user 1,698,922?)
Re: (Score:2)
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?
Re: (Score:2)
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
Re: (Score:2)
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
Re: (Score:2)
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.
Re: (Score:2)
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.
NX (Score:3)
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.
Re: (Score:3)
More Practical Suggestion (Score:3)
I already use my Android phone to do some light remote work. I use ConnectBot http://code.google.com/p/connectbot/ [google.com] to SSH into a remote workstation. For graphical apps, I set up port forwarding for VNC (there's a menu option for it in connectbot) and use AndroidVNC http://code.google.com/p/android-vnc-viewer/ [google.com]
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.
VNC vs X (Score:2)
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.
With the "usual" X Servers in use these days, typically
Re: (Score:2)
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.
Hell, I sometimes watch vid
Nice work, but lets remember X session security (Score:2)
Not sure if the author is talking about running port 6000 on a public IP but that's scary if so.
I have been waiting on this for so long (Score:2)
Re: (Score:2)
I am so happy. (Score:2)
x2go next step? (Score:2)
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.
As an N900 owner . . . (Score:2)
I'd like to say, congratulations! Android has very nearly caught up with where Maemo was when it was released in 2009. Also, suck it Wayland!
What do they use NOW? (Score:2)
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.
Already on market? (Score:2)
more like... (Score:3)
Millions of androids were oblivious... ... and continued doing what they were previously doing.
It's a niche tool, but for those of us who are in that niche, it's nice to see it available.