Android

From LXDE.org
Jump to: navigation, search

It's official: you can run X Window System and your choice of GUI. Here are instructions about running X Window System and more specifically the LXDE Desktop on the G-1.

Prerequistes

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

Base packages installation

From the Android OS: Download VNCviewer for Android from Google Code or Google Play

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

# apt-get install lxde


Or if you want a really basic desktop use IceWM:

# apt-get install icewm


VNC server setup

Now you need to setup your vncserver. At the prompt, type:

# export USER=root

# vncserver


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 passwrods. 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 and 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:

exportUSER=root
cd /
rm -r -f tmp
mkdir tmp
cd /
vncserver -geometry 480x320

(The last line 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 your 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 X Window System running on your phone.

Obviously you can connect to your phone's new desktop GUI with a VNC viewer from your computer too just 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!

LXDE-Android.jpg