Slashdot is powered by your submissions, so send in your scoop

 



Forgot your password?
typodupeerror
×
Android X

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.
This discussion has been archived. No new comments can be posted.

X Server Now Available For Android

Comments Filter:
  • Sounds funky but (Score:4, Informative)

    by mSparks43 ( 757109 ) on Tuesday March 06, 2012 @02:04PM (#39264885) Journal

    Why?

    • Re:Sounds funky but (Score:4, Informative)

      by ByOhTek ( 1181381 ) on Tuesday March 06, 2012 @02:09PM (#39264963) Journal

      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.

      • by Rix ( 54095 )

        What can you do with X that you can't do with ssh?

        • > 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

          • 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?

            • 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).

              • by Rix ( 54095 )

                If your solution for delivering mail is to run a remote client, you're really doing it wrong.

                • 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.

                  • by Rix ( 54095 )

                    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.

        • What can you do with X that you can't do with ssh?

          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

          • by Rix ( 54095 )

            These are all things that would be better done with a local app, perhaps via a ssh tunnel.

            • These are all things that would be better done with a local app, perhaps via a ssh tunnel.

              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.

              • by Rix ( 54095 )

                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.

    • by Anonymous Coward

      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)

        by jedidiah ( 1196 ) on Tuesday March 06, 2012 @02:24PM (#39265167) Homepage

        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.

    • To run the most patriotic of text editors, vim. After all, we know that XEmacs is for communists. :P
      • by Tubal-Cain ( 1289912 ) on Tuesday March 06, 2012 @02:17PM (#39265069) Journal
        How dare you defile vim with X11!
      • Why is the North Korea of text editors, the most patriotic?

        • 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?

      • To run the most patriotic of text editors, vim.

        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.

        • ... 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.

          • Pfst....Not if you know what you're doing. Back in my day we didn't have that fancy vt100 and we liked it.

            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

    • by GameboyRMH ( 1153867 ) <gameboyrmh@@@gmail...com> on Tuesday March 06, 2012 @02:19PM (#39265111) Journal

      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.

    • Suppose these people had devoted their time to producing something useful.

    • by dmesg0 ( 1342071 )

      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...

    • 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

    • x2x. Use your phone/tablet as a remote mouse/keyboard for your workstation.
    • by zoloto ( 586738 )
      More importantly, why are they still pushing this java crap? It should have died out long ago!
      • 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.

  • You can also install a Linux of your choice in a loopback file on your phone and chroot in. You could use x11vnc for graphics before, but as you can imagine it's a bit inefficient.
    • 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.
  • by Anonymous Coward on Tuesday March 06, 2012 @02:08PM (#39264943)

    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.

    • 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.

      • 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.
    • A lot of stuff is done using "ssh -Y" and letting ssh decide whether you are allowed in or not. From the man page of openssh:

      -Y Enables trusted X11 forwarding. Trusted X11 forwardings are not subjected to the X11 SECURITY extension controls.

      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)

    by fuzzyfuzzyfungus ( 1223518 ) on Tuesday March 06, 2012 @02:08PM (#39264945) Journal
    I hope that nobody would actually consider a remote X session without tunnelling over ssh...
    • 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...

      • by Trogre ( 513942 )

        It's a crime. A crime that comments like this haven't been modded up to +5. What's wrong with /. these days?

    • >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.

      • by dbIII ( 701233 )

        And without encryption, it will be much simpler, faster, and more efficient.

        Some X11 data compresses quite well so in some cases ssh actually improves performance.

        • >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

          • by dbIII ( 701233 )
            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
  • by Microlith ( 54737 ) on Tuesday March 06, 2012 @02:15PM (#39265049)

    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.

    • If only Maemo could run on a Droid 4 I wouldn't have to worry so much about my N900...

    • Actually, X11 has been tried before on mobiles and was often found lacking. Android's rendering and windowing is just better than X11.

      • by Anonymous Coward

        Works just fine on the N900, N9 or Spark though. :)

      • Works fine on Ubuntu for Android.

      • 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?

      • >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?)

    • 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

  • by Guillermito ( 187510 ) on Tuesday March 06, 2012 @02:18PM (#39265089) Homepage

    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.

    • by bgarcia ( 33222 )
      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.
  • by spoonboy42 ( 146048 ) on Tuesday March 06, 2012 @02:28PM (#39265235)

    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.

    • 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

    • 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.

      Hell, I sometimes watch vid

  • Not sure if the author is talking about running port 6000 on a public IP but that's scary if so.

  • 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.
  • Is like getting lots of free apps at once. I think lots of people don't know that you can just display the one application that you need to run a not the whole screen.
  • 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'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!

  • 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.

  • So I looked and I see two, x-servers: https://play.google.com/store/apps/details?id=com.theqvd.android.x# [google.com] and https://play.google.com/store/apps/details?id=au.com.darkside.XServer# [google.com]. Am I missing something? Is there a major difference?

I cannot conceive that anybody will require multiplications at the rate of 40,000 or even 4,000 per hour ... -- F. H. Wales (1936)

Working...