X11 "Ported" to Android *implements debian shell and VNC

Search This thread

gmaster1440

Member
Dec 7, 2008
7
3
Yep:

lxde3.jpg


It's official you can run X-Windows and your choice of GUI (Gnome, KDE, IceWM etc on an Android device!

Screenshots are below!!

Here are instructions about running X-Windows and more specifically the LXDE Desktop GUI on the G-1.

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: http://www.androidfanatic.com/cms/community-forums.html?func=view&catid=9&id=251

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

http://www.androidfanatic.com/cms/community-forums.html?func=view&catid=9&id=1610

You need three basic packages:

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

http://www.androidfanatic.com/cms/unofficial-app-repo.html?func=fileinfo&id=16

or from google here:

http://code.google.com/p/android-vnc-viewer/

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 (return)
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

type

nano xstartup


comment out the line for xsession:

#/etc/X11/xsession

add these two lines:

icewm &
lxsession

or if you decided to go for IceWM instead:

icewm &
xterm

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 480x320

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

Your videos and photos of your device running X are welcomed. As usual if you like this, use the SHARE button below.
 
Last edited:

alapapa

Senior Member
Dec 18, 2007
456
8
so what does this mean exactly?
just a windows-like gui?
what about my android gui? what happens there?

X11 runs as a daemon (or service) in the background on most *nix machines (android, now included) and windows machines using cygwin, etc.

You can connect to it locally or over the network.

As of yet, there has been no native GUI implementation of the X client on android, but we can now run a VNC server and connect to that (locally on the android phone or over the netowork with a computer, etc) using a VNC client.

So, as-is, this runs independently from your android gui and does not affect it at all.
 

d3rrty1

Member
Jan 12, 2009
36
1
X11 runs as a daemon (or service) in the background on most *nix machines (android, now included) and windows machines using cygwin, etc.

You can connect to it locally or over the network.

As of yet, there has been no native GUI implementation of the X client on android, but we can now run a VNC server and connect to that (locally on the android phone or over the netowork with a computer, etc) using a VNC client.

So, as-is, this runs independently from your android gui and does not affect it at all.

so it's essentially setting up a "fake" vnc while connecting to it at the same time since it is the local network (i.e. your phone)? do i still have full access to all of my apps?
 

d3rrty1

Member
Jan 12, 2009
36
1
Interesting, because this is relatively new public news. Cheers to the spread of knowledge.

that's what i was thinking... i do think d00m meant more along the lines of VNC though... i wasn't asking about VNC, so it is partially my fault for not being clearer... i meant what exactly x11 did/does
 

wergeld

Senior Member
Mar 13, 2007
287
9
I tried to follow along but the instructions to move the busybox.bin to /data/busybox does not work. I read up on the original thread and its instructions to install busybox but it does not work.
I keep getting "/data/busybox is a directory" error msg. Any ideas?

wergeld
 

Party_Grunt

Member
Dec 3, 2008
10
0
Im getting a grey screen in VNC. Anyone know what might be a cause?
Im guessing it has to do with editing those last 2 files. I installed LXDE.
 
Last edited:

d3rrty1

Member
Jan 12, 2009
36
1
I tried to follow along but the instructions to move the busybox.bin to /data/busybox does not work. I read up on the original thread and its instructions to install busybox but it does not work.
I keep getting "/data/busybox is a directory" error msg. Any ideas?

wergeld

if you have any of jf's modified rcXX images, (which you more than likely do..) you already have busy box nd don't need the other one
 

wergeld

Senior Member
Mar 13, 2007
287
9
Okay. Yes I have JF 1.43 running now.
I went ahead with the rest of the install of the debian image.
I then get to the point where it says to type in "bootdeb" and I do that.
Now I get the ASCII penguin YAY!
But then it gets past the
INIT: Debian booting...
Running Linux Kernel
net.ipv4.ip_forward = 1
AutoMounter started
Type EXIT to end session
Make sure you do a proper EXIT for a clean kill of Debian!

chroot: cannot execute /bin/bash: No such file or directory
....extra umount errors for FUN!
Reverted back to Android console
#

Okay, so now what?

wergeld
 

wergeld

Senior Member
Mar 13, 2007
287
9
Okay. Yes I have JF 1.43 running now.
I went ahead with the rest of the install of the debian image.
I then get to the point where it says to type in "bootdeb" and I do that.
Now I get the ASCII penguin YAY!
But then it gets past the
INIT: Debian booting...
Running Linux Kernel
net.ipv4.ip_forward = 1
AutoMounter started
Type EXIT to end session
Make sure you do a proper EXIT for a clean kill of Debian!

chroot: cannot execute /bin/bash: No such file or directory
....extra umount errors for FUN!
Reverted back to Android console
#

Okay, so now what?

wergeld
 

wergeld

Senior Member
Mar 13, 2007
287
9
K, I have 1.43 running.
I now get an error after I type in "bootdeb":
chroot: cannot execute /bin/bash: No such file or directory.
This error occurs after the penguin ASCII art and the starting of the AutoMounter.

Any ideas?

wergeld
 

Party_Grunt

Member
Dec 3, 2008
10
0
Okay. Yes I have JF 1.43 running now.
I went ahead with the rest of the install of the debian image.
I then get to the point where it says to type in "bootdeb" and I do that.
Now I get the ASCII penguin YAY!
But then it gets past the
INIT: Debian booting...
Running Linux Kernel
net.ipv4.ip_forward = 1
AutoMounter started
Type EXIT to end session
Make sure you do a proper EXIT for a clean kill of Debian!

chroot: cannot execute /bin/bash: No such file or directory
....extra umount errors for FUN!
Reverted back to Android console
#

Okay, so now what?

wergeld
Try
modprobe ext2

then type

bootdeb

That worked for me
 

sunamiebob

Member
Feb 6, 2009
5
0
apt-get install error

Whenever I apt-get install any app i get the same "Reading package lists... Error!" "E: Unable to parse packagge file /var/lib....." "E: The package lists or status file could not be parsed or opened."

Any ideas on how to fix?
 

Top Liked Posts

  • There are no posts matching your filters.
  • 3
    Yep:

    lxde3.jpg


    It's official you can run X-Windows and your choice of GUI (Gnome, KDE, IceWM etc on an Android device!

    Screenshots are below!!

    Here are instructions about running X-Windows and more specifically the LXDE Desktop GUI on the G-1.

    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: http://www.androidfanatic.com/cms/community-forums.html?func=view&catid=9&id=251

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

    http://www.androidfanatic.com/cms/community-forums.html?func=view&catid=9&id=1610

    You need three basic packages:

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

    http://www.androidfanatic.com/cms/unofficial-app-repo.html?func=fileinfo&id=16

    or from google here:

    http://code.google.com/p/android-vnc-viewer/

    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 (return)
    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

    type

    nano xstartup


    comment out the line for xsession:

    #/etc/X11/xsession

    add these two lines:

    icewm &
    lxsession

    or if you decided to go for IceWM instead:

    icewm &
    xterm

    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 480x320

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

    Your videos and photos of your device running X are welcomed. As usual if you like this, use the SHARE button below.