Run X-Windows within Android via X11 Hack

Before you gohead: iMAndroid is not responsible for any damage caused to your Android device. This information is for educational purposes only. Credit to Ghostwalker from Androidfanatic.

This will enable you to Run X-Windows with a GUI – Gnome, Ice etc.


Here are the instructions from

LXDE is an energy saving and extremely fast and performing desktop solution. It works well with computers on the low end of the performance spectrum such as new generation netbooks and other small mobile computers

While IceWM, performance-wise runs the fastest – LXDE is also pretty good, and just plain ‘prettier!

I have included options for either Desktop in the instructions below.

Prerequistes; Debian Shell instructions here:

Also if your ‘debian.img’ file is a little small you may want to resize it – instructions here:

You need three basic packages:

From the Android OS:
Download VNCviewer for Android from our repo here:

or from google here:

Now copy the .apk file to your sdcard and then run ‘Apps installer’ from the Market to install that.

From the terminal, boot your debian shell and then type:

apt-get install tightvncserver (return)

apt-get install lxde (return)

or if you want a really basic desktop use IceWM:

apt-get install icewm (return)

Now you need to setup your vncserver

at the prompt type:

export USER=root
vncserver (return)

This will create an x-windows session and a startup file
in the /root/.vnc/ directory. Vncserver will also ask you to set up two passwrds. You will need the first password to log in, but just say no to the second password.
The next thing to do is to kill the session you just started: vncserver -kill :1

This is so you can edit the startup file to set it up correctly.

go to /root/.vnc


nano xstartup

comment out the line for xsession:


add these two lines:

icewm &

or if you decided to go for IceWM instead:

icewm &

save the file (trackball then ‘o’, and exit nano (trackball then ‘x’.

Then restart an x windows session by vncserver ( you should kill it after you are done with x-windows later on).

This next bit does some housekeeping and sets up the VNC service each time you boot your debian shell – saves messing about everytime!

Now back inside your debian prompt you need to edit your /root/.bashrc file

cd /root
nano .bashrc

Add the following near the top of the file:

export USER=root
cd /
rm -r -f tmp
mkdir tmp
cd /
vncserver -geometry 480×320

(this sets your resolution – you can change this if you will be connecting via your computer).

save the file (trackball then ‘o’, and exit nano (trackball then ‘x’.

Type ‘exit’ to exit the Debian shell.

reboot the phone.

Once rebooted go into Terminal and boot yor Debian shell.

Press the HOME button to revert back to the Android OS while leaving your Debian shell running.

Open androidVNC from your android programs menu.

Connect to ‘localhost’ port ‘5901’ and enter your password.

Viola, you now have XWindows running on your phone. Obviously you can connect to your phone’s new desktop GUI with a VNC viewer from your computer too jsut enter it’s ip address instead of localhost.

To make the cursor work with your finger:

Press the MENU button on your device and select 1:1 then just press the trackball ONCE!

Now whenever you want a proper x-windows Desktop GUI right there on your phone, just run the debian shell with ‘bootdeb’ and it sets up your vncserver. Then just press home to leave it running and get back to your android menu, where you can choose to VNC directly onto it.

Cool eh?

When you are finished just exit androidVNC, if you want to get back to your Debian shell, HOLD DOWN the home key to bring up your running processes and switch to it.

What the heck, you could even install GNOME or KDE but it may be a little slow! I can’t be arsed to try it, but if you can, be sure to let us know how it goes.

Spread the word
  • Facebook
  • Google Bookmarks
  • Live
  • StumbleUpon
  • TwitThis
  • Reddit
  • Digg
  • Suggest to Techmeme via Twitter

No related posts.

10 comments for “Run X-Windows within Android via X11 Hack

  1. Pingback: metin2 hack
  2. October 21, 2014 at 9:17 am

    wonderful insight. Really enjoyed skimming through
    this blog. Keep up the good work and to everyone keep on learning!

  3. October 23, 2014 at 10:57 am

    I do not even know the way I ended up right here, but I thought this put up used to be great.
    I do not realize who you might be however certainly you
    are going to a famous blogger if you are not already.

  4. January 16, 2015 at 6:11 am

    Hi there! Your website is running slowly if you ask
    me, this kind of took sort of a moment in order to reload, I do not know
    whether or not it’s just me or maybe your webpage then again google worked fine for me.
    Nevertheless, I need to thank you very much for attaching
    amazing blog post. Everybody who actually came to this page really should have observed this informative article seriously handy.
    This is definitely great what you actually have done and wish
    to discover more amazing articles by you.
    I have got your site bookmarked to check out new stuff you

  5. February 1, 2015 at 3:06 am

    Hello there Your current web site runs up really slow to me, I don’t know who’s
    problem is that although flickr starts up extremely good.
    Nevertheless, Thank you for placing such a
    fantastic article. I’m guessing it has already been beneficial to plenty of people .
    This one is undoubtedly great everything that you have
    concluded and want to check out more posts by you. After viewing your
    blog post, I have book-marked your web site.

  6. March 4, 2015 at 6:02 am

    Hey Your main web page loads up honestly slow for my situation, I not really know
    who’s problem is that however , wikipedia opens up really immediate.
    Anyway, Thank you for writing a remarkably amazing blog
    post. I’m guessing it has already been useful
    to a lot of people . I’m hoping I will be able to find more remarkable content and I should really complement by
    saying you have carried out wonderful writing. To
    get additional understanding from posts you post, I actually
    have saved the site.

  7. May 16, 2015 at 9:02 am

    Hi there! Your site is loading slow , that went on sort of a minute or so in order to load up, I
    actually have no idea whether it’s just simply me or perhaps your web site however twitter worked for me.
    On the other hand thanks for writing great blog post.
    Nearly everybody who visited this great site should have observed this article extremely useful.
    This is great everything that you have done in this
    article and wish to check out nice articles from your website.

    To get more information by content that you post, I have saved to my bookmarks this site.

  8. July 13, 2015 at 6:01 am

    Hello there! Your website is loading slowly , this kind of went on just like a minute or so to load
    up, I actually have no idea whether or not it’s just me or maybe your blog then again twitter worked fine for me.
    Nevertheless, Thank you for creating a remarkably beautiful article.

    I assume it really has already been useful to many people .
    This is definitely fantastic everything that you have concluded on this site and would like
    to discover more nice posts by you. I now have you saved to my bookmarks
    to check new stuff you post.

Leave a Reply

Your email address will not be published. Required fields are marked *