[Guide] How to install Ubuntu Linux on your phone [1.0 Coming Soon]

What Kernels did you get Ubuntu to run on?


  • Total voters
    25
Status
Not open for further replies.
Search This thread

donnyevo4g

Senior Member
Jun 25, 2010
179
32
West Caldwell
CAN SOMEONE PLEASE HELP ME i need to no how to wipe this out and start over from fresh cause i obv did somthing wrong along the way cause someone helped me get a password prompt and now im not even getting that and still cant get on to vnc still connection failed this is not the first time i put ubuntu on a android so im far from a noob but i need help thank you
 

EarlyMon

Senior Member
Jun 23, 2010
1,685
1,297
Now to download eclipse and make android apps on an android. Lol


lma0

Speaking of RTFM - I've been exiting with just vncserver -kill :(usually 1), and then verifying all Xtightvnc are stopped, then exiting the looping vm.

So - I just threw a ps at my adb shell - because I am having to pull the battery to get things up.

I had a big stack of lxsessions, Xtightvncs, etc. Total mess.

Might want to check that.
 

EarlyMon

Senior Member
Jun 23, 2010
1,685
1,297
CAN SOMEONE PLEASE HELP ME i need to no how to wipe this out and start over from fresh cause i obv did somthing wrong along the way cause someone helped me get a password prompt and now im not even getting that and still cant get on to vnc still connection failed this is not the first time i put ubuntu on a android so im far from a noob but i need help thank you

When you first installed, you ran a script, /sdcard/ubuntu/ubuntu.sh

That script seems to always clean up after itself first, then install. In other words, it starts with clearing things out, then it gets to this interesting bit:

Code:
clear
rm  /system/bin/fsrw
rm  /system/bin/bootubuntu
rm  /system/bin/unionfs
rm  /system/bin/mountonly

cp -f fsrw /system/bin
cp -f bootubuntu /system/bin
cp -f unionfs /system/bin
cp -f mountonly /system/bin

As you can see, it first removes what might have been there from a previous install.

Based on that, I'd blow away the /sdcard/ubuntu folder, then regrab and re-do.

When you get to ubuntu.sh, it ought pre-clean for you and you won't know the difference.

Besides - it's the stuff inside /sdcard/ubuntu that seems to have gotten hosed anyways, yes?

I believe you'll find that if you go straight to /root from adb shell, you'll find no files there, including hidden ones - so your local setup is pretty clean.

I'm presuming that you didn't make a nandroid from just before the installation - while that's all desirable, I can't see you get screwed just letting ubuntu.sh handle it for you after you reload ubuntu on your card from scratch.

Hope this helps!
 

donnyevo4g

Senior Member
Jun 25, 2010
179
32
West Caldwell
that didnt work it all failed when i ran the code idk what else to do this is bull**** not u guys but that i cant get this to work i almost wanna get a new phone lol
 

EarlyMon

Senior Member
Jun 23, 2010
1,685
1,297
that didnt work it all failed when i ran the code idk what else to do this is bull**** not u guys but that i cant get this to work i almost wanna get a new phone lol

You erased /sdcard/ubuntu and started the installation process again and it failed?

Failed how? No change in result at all??

I could be off-base, but I thought I was shooting you square on this one. :confused:
 
Last edited:

danaff37

Senior Member
Mar 14, 2010
2,959
900
Nashville, TN
lma0

Speaking of RTFM - I've been exiting with just vncserver -kill :(usually 1), and then verifying all Xtightvnc are stopped, then exiting the looping vm.

So - I just threw a ps at my adb shell - because I am having to pull the battery to get things up.

I had a big stack of lxsessions, Xtightvncs, etc. Total mess.

Might want to check that.

Yes I've always killed the vnc's as well, but have noticed that often times the loop can't properly close due to resources being busy. Something is sticking.


And donny, I would copy over a fresh ubuntu img as well and start over with that.

Sent from my PG86100 using XDA App
 

evilvoice

Senior Member
May 4, 2008
923
569
Conyers GA
EarlyMon, in getting multiple clients, is there a way to do this with lxde and not icewm? Also, what does multiple clients get me? Are you saying you can only run one program at a time in the vnc? or would this allow me to connect to the server with the phone, laptop, desktop, whatever all at the same time? Just wondering if this is a change I need to make.

Also, I believe you said it, but I wanted to agree with you that this whole thing can be done from Terminal Emulator on the android phone - no need for a pc at all.
 

unodish

Member
Nov 14, 2007
29
0
Ubuntu works fine until I do a reboot/shutdown. When rebooting phone, is there a way to start Ubuntu and Tightvncserver? I'm getting connection error with AndroidVNC after reboot of phone. Maybe I'm missing a step in the installation process, thanks in advance for your support.
 

danaff37

Senior Member
Mar 14, 2010
2,959
900
Nashville, TN
Ubuntu works fine until I do a reboot/shutdown. When rebooting phone, is there a way to start Ubuntu and Tightvncserver? I'm getting connection error with AndroidVNC after reboot of phone. Maybe I'm missing a step in the installation process, thanks in advance for your support.

You'll have to restart it each time. But you can do it from terminal, you don't need a pc. And you could put the vnc server line in your bashrc file so you don't have to run it again

Sent from my PG86100 using XDA App
 
  • Like
Reactions: EarlyMon

EarlyMon

Senior Member
Jun 23, 2010
1,685
1,297
EarlyMon, in getting multiple clients, is there a way to do this with lxde and not icewm? Also, what does multiple clients get me? Are you saying you can only run one program at a time in the vnc? or would this allow me to connect to the server with the phone, laptop, desktop, whatever all at the same time? Just wondering if this is a change I need to make.

Also, I believe you said it, but I wanted to agree with you that this whole thing can be done from Terminal Emulator on the android phone - no need for a pc at all.

Sorry for the unclear wording. :eek:

I'm getting a related question at Android Forums, so I'll lay out the whole deal here. Hopefully, this will cover the space for everyone.

1. Clients

You can mange to get two vnc clients running - one on your phone and one on a laptop, for example - but the way this is configured, you'll see the same thing in each - they will mirror each other. Because of the limited resources, I wouldn't try to fix this, but it's something you can tinker with.

But the word client only means something in terms of the server being discussed. So, let's call a vnc client/server running setup a "vnc session" and move on to desktop clients:

When I complained of missing multiple clients, I was not configured properly - in my vnc session I could launch a terminal client or a web client on my desktop, but not both. danaff37 squared me away.


2. Desktops and Window Managers

The default X11 desktop is a gray field where you can see your mouse move and that's it, nothing more. Most people are sunk if that's all they get, so it's best to configure X11 startup to configure a richer, more useful desktop.

The first thing you need is a window manager, it's not really optional. You have two choices that are easy to get to, and others if you can find and install them. The easy ones are:

  • X Window Manager
  • IceWM

You need more than a plain gray field with nothing you can interact with, so there are two things you can do:

  • Just declare an X startup that launches at least one useful client, like an X terminal, and that's all you'll see on your plain gray field, and then elaborate from there
  • Go with a more modern desktop that you're probably used to or can adapt to easily

You want the way described in the second bullet. Again, there are two choices that are easy to get to, and others if you can find and install them. The easy ones are:

  • GNOME
  • LXDE

GNOME comes with the ubuntu.img distribution here. It's what most people are used to, but it comes at a price - it uses more resources and the touchscreen keyboard won't work.

LXDE - the Lightweight X11 Desktop Enviroment - you have to install separately. It's not as rich and pretty as GNOME, but everything works, including most touchscreen keyboards. It's stable, it's been around since 2003 and it very much reminds me of the KDE 1.0 or 2.0 desktop, circa 1998~2000 (as best I can remember - that was a ways back ;)).

While the Evo 3D packs a lot of silicon for a phone, it's not so much compared to a modern laptop, and so because I like things working and know I can trust a lighter desktop, I went with LXDE.

How to install LXDE:

  • apt-get install lxde

This will include a basic IceWM and is really all you need.

If you would like the full IceWM and be able to go town on that - including being able to just run the plain, single-screen, gray X desktop with just some X clients floating on it, then by all means install the full IceWM (but I won't be advising on that configuration, I've not run one of those since something like '93 or '94, so Google is your friend on that). That said, here's your full IceWM install:

  • apt-get install icewm

But like I said, I didn't bother with that.


3. How to Configure

So, I changed my startup file so that it's a usable template, as self-explanatory as I know how to make it. This is on the Ubuntu side, get to the right area after running bootubuntu.

Here is /root/.vnc/xstart -

Code:
#!/bin/sh

xrdb $HOME/.Xresources
xsetroot -solid grey

# Here's the holdover that will just launch an X terminal on your plain
# X desktop, it came commented out, just avoid it, but leave it for maybe.
#x-terminal-emulator -geometry 80x24+10+10 -ls -title "$VNCDESKTOP Desktop" &

# I don't think using IceWM with GNOME is a good idea, but you can use
# either one with LXDE.
# Chose your window manager by uncommenting only one of the following lines.

#x-window-manager &

icewm &

# Chose your desktop, the first will launch GNOME, the second, LXDE.
# Uncomment only one.

#/etc/X11/Xsession

startlxde &

I like to be able to just have my vnc server start by running the bootubuntu command from Terminal Emulator. (Note my screen shot of this on Android Forums shows a cd to /sdcard/ubuntu, I hadn't realized at the time that was unnecessary due to it being installed under /system.)

I added some lines to my .bashrc file. This is on the Ubuntu side, get to the right area after running bootubuntu.

.bashrc is long enough and I expect people to know how to manage that. Here is the top and only the top of my /root/.bashrc -

Code:
# ~/.bashrc: executed by bash(1) for non-login shells.
# see /usr/share/doc/bash/examples/startup-files (in the package bash-doc)
# for examples

# If not running interactively, don't do anything
[ -z "$PS1" ] && return

export USER=root
cd /
rm -r -f tmp
mkdir tmp
cd /
vncserver -geometry 960x540

# don't put duplicate lines in the history. See bash(1) for more options
#export HISTCONTROL=ignoredups

<rest of stock .bashrc follows from here>

As you can see, I simply added:

Code:
export USER=root
cd /
rm -r -f tmp
mkdir tmp
cd /
vncserver -geometry 960x540

I'm not going to be responsible for other .bashrc changes, sorry.

I've mentioned earlier in the thread why I chose the native resolution over 1200x800 - and I still recommend that whatever you chose, you're best to consider something with a 16x9 ratio. No disrespect at all to the instructions - I would not be here without StrumerJohn - but his recommendation comes from the original days before we had qHD displays. Besides, he mentioned in the OP that chosing resolution was optional to your needs.


4. Installation

If you already grokked what the OP install steps were doing when you read them, you can interject the above steps where appropriate.

Otherwise, just play it safe and do all of this after you have the OP's stuff working and happy for you.

~~~~~~~~

Note to StrumerJohn - if you think this is in any way worthy, suggest you just quote this or reference it in your original instructions. That way, you retain the righteousness and I'll retain the support for this stuff - but, do as you see fit, after all, it's Open. ;)

PS, if anyone cares and if you've missed it, I have my screen shots and a relationship diagram beginning at this post over on AF -

http://androidforums.com/evo-3d-all-things-root/387978-ubuntu-linux-3vo.html#post3040572

~~~~~~~~~

PPS - Guess I just can't pass up showing what an old BSD guy living in the desert uses for wallpaper. ;)

wallpapered-lxde.jpg
 
Last edited:

EarlyMon

Senior Member
Jun 23, 2010
1,685
1,297
has anyone used this to compile an AOSP build on their phone???

would that be possible??

I _think_ this would be constrained by available space. That said, it's an interesting question and I don't know the build requirements.

BTW and FWIW - the distribution includes gcc.
 

duffkiligan

Member
May 25, 2008
47
6
Code:
sh-3.2# sh ubuntu.sh
sh ubuntu.sh
modprobe: chdir(2.6.35.10-silverneedle+): No such file or directory
?[H?[Jrm failed for -f, No such file or directory
rm failed for -f, No such file or directory
rm failed for -f, No such file or directory
rm failed for -f, No such file or directory
rm failed for -f, No such file or directory
mkdir failed for /data/local/mnt, File exists
?[H?[JUnable to chmod bootubuntu: Operation not permitted
?[H?[J
Ubuntu Chroot Bootloader v0.1
Ubuntu Bootloader is now installed!
This process does NOT damage Android OS!

Original Installer by Charan Singh
Modified for Ubuntu Chroot by Max Lee at AndroLinux.com ,G2Hacks.com and NexusOn
eHacks.net

To enter the Ubuntu Linux console just type 'bootubuntu'
sh-3.2#

This is what I'm getting when I run ubuntu.sh.

Nothing installed on SDCARD, busybox installed through app, netarchys kernel.

Any ideas?
 

EarlyMon

Senior Member
Jun 23, 2010
1,685
1,297
Expanding the image

Ok - I've been wanting to up the size of the ubuntu.img - and here's what I found on how to built it -

http://androlinux.com/android-ubuntu-development/how-to-build-chroot-arm-ubuntu-images-for-android/

Guess I'm going to pop open a virtual machine on a spare PC, install a sandboxed Ubuntu, see if I can decompose ubuntu.img (so as to retain the changes I have), then simply re-assemble into a larger ubuntu.img file.

If anyone's done this and has any tricks to share, please lay 'em on me! :)

Otherwise, I'll keep you all posted - sure wish I'd found this yesterday when I had the time to goof off more! :p

PS - Left questions at the dev's site asking for tips.
 
Last edited:

evilvoice

Senior Member
May 4, 2008
923
569
Conyers GA
That is one sick wallpaper!

Good job on clearing all that up and giving clear and precise directions to fine tune the experience.

What I meant by the final part of my post is I did all of StrummerJohns instuctions on getting ubuntu to install with just my phone - no pc required. I also did it with Synergy nightly, which is not the Silverneedle Test5 kernel.

To people having issues, download the busybox installer from market and run it. This will give you the ability to be sure busybox is installed. If you get an error while running the app, busybox is included in the rom, but not properly installed (I had this issue with a previous version of Synergy, but they fixed it with an update) - if you have this issue, you need to let the rom developer know so they can fix it (not only for this, but for other issues that may arise from not having it installed to the correct location, or installed properly).

The only problem I have with the instructions is the part that says to unmount the sdcard. Maybe he meant unmount, then mount again...but either way, there is no way to access the sdcard from adb shell, or terminal emulator with it unmounted.
 
  • Like
Reactions: EarlyMon

EarlyMon

Senior Member
Jun 23, 2010
1,685
1,297
Hey, thanks! :)

Yeah - I did about half of it through the wire, the rest I got bored and finished installing via Terminal Emulator myself. ;)

I think he was speaking speaking descriptively rather in command terms on the whole unmount thing. If you play the install out in your mind, you can see where that's describing the whole Android thing where you choose on the front panel to connect for Charging or as Disk Drive. Remember, the instructions go back to the Nexus One port for this, so the descriptions are simply notional.

I think the only point for by-wire installations with adb shell and times to attach or unattach the SD card as disk drive (mount/unmount) is that the SD card isn't dual-ported to allow modifying from within the shell while mounted to a PC.

TL/DR version: umount is a command, unmount is a descriptive task for the human.

~~~~~~

So.

I've spent the better part of the night tracking down how to do a clean exit of this beast.

Ha! :D

It really depends on what was run, and unfortunately, we don't have the processes flowing from a single parent to exploit just killing the parent and having the children processes die off.

By careful application of kill -9, I was finally able to get things to where the losetup -d command at the end of bootubuntu passed successfully - but use the Ubuntu session another way - no soap - I haven't found a way to script the shutdown.

I'm not ready to give up just yet, tho.
 
Last edited:
Status
Not open for further replies.

Top Liked Posts

  • There are no posts matching your filters.
  • 26

    Sorry guys this no longer works...
    Ubuntu removed alot of the files needed to run it on a phone off of their website which is why you are getting the errors on the script to try and install it.
    Recapped:
    Here's what I mean the website the script is going to to get the files no longer exists...
    Heres an example to see for yourself: http://ports.ubuntu.com/ubuntu-ports/pool/universe/t/tightvnc/tightvncserver_1.3.9-4_armel.deb

    I will try and find a new link to plug in but for now it DOES NOT WORK!

    Thank you for your patience on the thread,
    StrumerJohn










    ==== How to Install Ubuntu Linux on your HTC EVO 3D / Sensation 4G ====

    Table of Contents

    Post 1
    1: Disclaimer
    2: Pre Requirements
    3: PC Guide to push to phone
    4: MAC Guide to push to phone
    5: Additional Scripts
    6: Credits
    Post 2
    1: FAQs
    2: Recognitions
    Post 3
    1: News and Updates
    2: Additional Notices
    -Disclaimer-
    This has been tested on my phone and runs perfectly fine, I am not responsible for you breaking, bricking, or dropping your phone on the floor and causing the USB cable to fall out and blow up your device.




    Pre Requirements:

    A rooted HTC EVO 3D or Sensation 4G
    A S-off'd HTC EVO 3D or Sensation 4G

    netarchy's kernel (Silverneedle Test5)
    Android SDK
    The USB drivers for your phone. (x32) (x64)
    A microSD Card
    2.3 GB Free of space on your microSD card
    Know how to read to directions


    The intense Procedure:

    1. Download this version of Ubuntu. [Download #1] [Download #2]

    2. Unzip the Ubuntu folder to your desktop and if you want, delete the compressed one you downloaded.

    3. On your phone go to Settings > Applications > Development and turn on USB debugging.

    4. Plug in your USB cable (from your computer to your phone) and mount your (mirco)SD card.

    5. Move or copy over the unzipped / normal Ubuntu folder. This will take a long time unless you have a class10 microSD card.

    6. After moving / copying that file over, tell your phone to unmount the (micro)SD card / Set the phone to Charge Only mode.

    7. Now on your computer, go to where you have Android SDK installed. (Example on my computer: E:\Program Files (X86)\Android\android-sdk )

    8. When in the main SDK folder, hold shift and right click a blank area and then click on "open command window here". It should of opened the command line window with the directory of your SDK already put in. If not type cd "C:\Your directory or location of your SDK"

    9. Now type "cd platform-tools"

    9.5. (Optional) "type adb devices" and check if the computer recognizes your phone. If not you need to reinstall your drivers from the download link above in the requirements.

    10. Type "adb shell"

    11. Type "su" so we have superuser permissions

    12. Type "cd /sdcard" so the directory is changed to the (micro)SD card

    13. Type "cd ubuntu" so the directory is changed to the Ubuntu File

    14. Type "sh ubuntu.sh" so we can install Ubuntu

    15. Type "bootubuntu" to start up Ubuntu. Next time you enter Ubuntu, you just need to type "bootubuntu" from your /sdcard/ubuntu directory, there is no need to run ubuntu.sh again.

    16. If you got "root@localhost" in the command line, you have sucessfully installed Ubuntu. If not make sure you installed netarchy's kernel. If it still does not install correctly please try a different ROM, I have only tested this on SteelROM 1.1. *AFTER INSTALLING ANY ROM, YOU NEED TO REINTALL THE KERNEL.*

    17. Now type "apt-get update" to update Ubuntu to the latest version. Then "apt-get upgrade" to apply the update.

    18. Type "apt-get install tightvncserver" to install the vncserver. (Your telling your phone to read off it self pretty much.)

    19. Type "export USER=root" To make yourself a user / the user

    20. Type "vncserver -geometry 1024×800" to set the screen resolution you want to display on your phone. Remember you can always zoom in by pinching, so you don't need to make this that much smaller. You should also get prompted to set a password, do so. You will need to remember this password to log in.

    21. Download the AndroidVNC Viewer off the Market here.

    22. Open the viewer, and put in a nickname, your PASSWORD FROM ABOVE, and for the IP Address put: 127.0.0.1 :D for the port put 5901. THEN SCROLL DOWN and make the COLOR FORMAT 24-bit colors (4bpp).
    And finally, hit Connect to launch Ubuntu on your phone!

    For Mac users:



    Finder -> Applications -> Utilities (folder) -> Terminal

    When you cd to where your adb is located, cd is lowercase as are most all unix commands.

    If you're unsure where to go, get to adb in your Finder, right-click, get info, the pop-up will show you the path. Note in unix that the folders (subdirectories) are separated by / and not by \ like in Windows.

    Once you're there, the only trick you need to know is to tell unix that adb is located where you are, so you change the adb shell command like this:

    ./adb shell

    That's about it, all other instructions once you're inside the phone shell are the same.

    OBTW - after the unzip of the initial file from the OP, just drag and drop the whole ubuntu folder to your NO NAME drive (normal sd card formatting doesn't get a name at the factory, so by now you know that your sd card mounts like that anyways I'd suppose - just put it here in case).

    Additional Scripts

    Danaff37's

    That's the script catted out.

    I posted a different script a few pages back that I think will help you guys. I modified it so we should have no trouble with apps in sd.. I finally got a bigger sdcard so I can test this stuff and this script works great. Please guys try this script. If you download it in phone it will change the name and add a bin on it I think, so rename it accordingly and make sure it gets into /system/bin with the right permissions (755 or rwxr-xr-x), then run it

    http://db.tt/gin57Gd


    Sent from my PG86100 using XDA App



    Credits:
    Ubuntu Modded and Guide by: Me
    Mac Guide Written by: EarlyMon
    danaff37's Script by : danaff37 (of course)
    Original dev of Ubuntu: Zedomax

    If you have any problems beside the slow downloads because of the blown up servers, let me know below. Also I tried to type this fast, so if there is any typo's or broken links let me know too! Thanks!

    Also feel free to hit the Thanks button or Donate for more Guides :)
    6
    FAQS

    FAQS

    Do I need to have everything in the android-sdk downloaded and installed?
    No, you just need to have the base sdk.

    When I tell the command prompt to adb devices, my phone does not show up!!
    Make sure you have installed the proper drivers for your phone and for your correct operating system

    I'm not getting "root@localhost" when I type / copy-&-paste "bootubuntu"
    Well, this could be for a various amount of reasons, first make sure you have a rooted HTC EVO 3D/Sensation. And by root, I mean a full root, not just a temp root or S-off. If you still do not get "root@localhost", flash your device (or go though your data folder and delete all the ubuntu files, then delete the ubuntu file off of your sd card and clear your caches.), and retry the above steps. If the problem still persists, then please PM me with your exact problem.

    I'm having issues within the VNC, and I get an error message when I hit "connect".
    Make sure you typed your password correctly, the passwords are case sensitive. If you still cannot get in, make sure your IP Adress is set to "127.0.0.1" and your Port(s) are "5901".

    The colors on my screen look all weird and disorientated, how do I fix this?
    Close Ubuntu, and re-open the VNC application, then scroll down to "Color Format" and tap on "24-bit color (4 bpp)".

    The on-screen keyboard does not work and I get a different letter or character for whatever character I type!
    The on-screen keyboard will work now, if you install LXDE.

    I'm not good with reading text! I need a video demonstration!
    For a video head here: http://www.youtube.com/watch?v=YbunTRzEQCI

    How do I close Ubuntu?
    Two options here:
    1.Logout of the server and go to your homescreen and push menu, then go to settings, then Applications, then Running Services and close any remaining open part of the server program. The service may re-open later, do not close it though. It won't use up a noticable amount of RAM, just enough to make sure the application opens quick again.
    2. Logout of the server and use your favorite task killer to close the server process. The service may re-open later, do not close it though. It won't use up a noticable amount of RAM, just enough to make sure the application opens quick again.


    FAQS should be in order chronologically (until the end of them).​

    I would like to give a huge thanks to EarlyMon, for helping out lost members. This thread would not be as peaceful if it were not for him.
    And it seems I have forgotten to list another VERY helpful person here, danaff37. I am really grateful to both of these two for all of the help and work they have done to aid others.



    Am I missing a question that you are pretty sure is asked ALOT (lol)? Then PM me please and I'll get it up here ASAP!
    6
    Upcoming Change log for final release:
    (StrumerJohn's Zedomax Ubuntu Mod)
    Made a launchable .exe for easier updating and installing of Ubuntu
    Default mode LXDE for fixed keyboard
    Pushes Server application to your phone
    Fixed a few problems that caused people to have an error in installing
    Server application updated
    Fixed port issues for log in errors

    News update 11/13/11
    Bad news and Good News:
    Ubuntu was successfully updated
    Update brakes keyboard
    Update breaks Apps2SD
    Update takes up less space (1GB instead of 2GB)
    Update ONLY works on MIUI so far
    Updated script to add work around for those facing issues
    Computer .exe only working on x64 Windows 7 computers ;-;
    Thank you for those of you testing! :) Might make this open Beta...!

    Version as of 12/12/11
    Alpha Build 1.0

    What Doesn't Work so far:
    Boots to latest version only to lock up phone (Unless you are running MIUI)
    Keyboard borked
    Doesn't work on ICS
    Audio Broken
    Apps Saved on SD

    What works:
    Everything else
    3
    EarlyMon, in getting multiple clients, is there a way to do this with lxde and not icewm? Also, what does multiple clients get me? Are you saying you can only run one program at a time in the vnc? or would this allow me to connect to the server with the phone, laptop, desktop, whatever all at the same time? Just wondering if this is a change I need to make.

    Also, I believe you said it, but I wanted to agree with you that this whole thing can be done from Terminal Emulator on the android phone - no need for a pc at all.

    Sorry for the unclear wording. :eek:

    I'm getting a related question at Android Forums, so I'll lay out the whole deal here. Hopefully, this will cover the space for everyone.

    1. Clients

    You can mange to get two vnc clients running - one on your phone and one on a laptop, for example - but the way this is configured, you'll see the same thing in each - they will mirror each other. Because of the limited resources, I wouldn't try to fix this, but it's something you can tinker with.

    But the word client only means something in terms of the server being discussed. So, let's call a vnc client/server running setup a "vnc session" and move on to desktop clients:

    When I complained of missing multiple clients, I was not configured properly - in my vnc session I could launch a terminal client or a web client on my desktop, but not both. danaff37 squared me away.


    2. Desktops and Window Managers

    The default X11 desktop is a gray field where you can see your mouse move and that's it, nothing more. Most people are sunk if that's all they get, so it's best to configure X11 startup to configure a richer, more useful desktop.

    The first thing you need is a window manager, it's not really optional. You have two choices that are easy to get to, and others if you can find and install them. The easy ones are:

    • X Window Manager
    • IceWM

    You need more than a plain gray field with nothing you can interact with, so there are two things you can do:

    • Just declare an X startup that launches at least one useful client, like an X terminal, and that's all you'll see on your plain gray field, and then elaborate from there
    • Go with a more modern desktop that you're probably used to or can adapt to easily

    You want the way described in the second bullet. Again, there are two choices that are easy to get to, and others if you can find and install them. The easy ones are:

    • GNOME
    • LXDE

    GNOME comes with the ubuntu.img distribution here. It's what most people are used to, but it comes at a price - it uses more resources and the touchscreen keyboard won't work.

    LXDE - the Lightweight X11 Desktop Enviroment - you have to install separately. It's not as rich and pretty as GNOME, but everything works, including most touchscreen keyboards. It's stable, it's been around since 2003 and it very much reminds me of the KDE 1.0 or 2.0 desktop, circa 1998~2000 (as best I can remember - that was a ways back ;)).

    While the Evo 3D packs a lot of silicon for a phone, it's not so much compared to a modern laptop, and so because I like things working and know I can trust a lighter desktop, I went with LXDE.

    How to install LXDE:

    • apt-get install lxde

    This will include a basic IceWM and is really all you need.

    If you would like the full IceWM and be able to go town on that - including being able to just run the plain, single-screen, gray X desktop with just some X clients floating on it, then by all means install the full IceWM (but I won't be advising on that configuration, I've not run one of those since something like '93 or '94, so Google is your friend on that). That said, here's your full IceWM install:

    • apt-get install icewm

    But like I said, I didn't bother with that.


    3. How to Configure

    So, I changed my startup file so that it's a usable template, as self-explanatory as I know how to make it. This is on the Ubuntu side, get to the right area after running bootubuntu.

    Here is /root/.vnc/xstart -

    Code:
    #!/bin/sh
    
    xrdb $HOME/.Xresources
    xsetroot -solid grey
    
    # Here's the holdover that will just launch an X terminal on your plain
    # X desktop, it came commented out, just avoid it, but leave it for maybe.
    #x-terminal-emulator -geometry 80x24+10+10 -ls -title "$VNCDESKTOP Desktop" &
    
    # I don't think using IceWM with GNOME is a good idea, but you can use
    # either one with LXDE.
    # Chose your window manager by uncommenting only one of the following lines.
    
    #x-window-manager &
    
    icewm &
    
    # Chose your desktop, the first will launch GNOME, the second, LXDE.
    # Uncomment only one.
    
    #/etc/X11/Xsession
    
    startlxde &

    I like to be able to just have my vnc server start by running the bootubuntu command from Terminal Emulator. (Note my screen shot of this on Android Forums shows a cd to /sdcard/ubuntu, I hadn't realized at the time that was unnecessary due to it being installed under /system.)

    I added some lines to my .bashrc file. This is on the Ubuntu side, get to the right area after running bootubuntu.

    .bashrc is long enough and I expect people to know how to manage that. Here is the top and only the top of my /root/.bashrc -

    Code:
    # ~/.bashrc: executed by bash(1) for non-login shells.
    # see /usr/share/doc/bash/examples/startup-files (in the package bash-doc)
    # for examples
    
    # If not running interactively, don't do anything
    [ -z "$PS1" ] && return
    
    export USER=root
    cd /
    rm -r -f tmp
    mkdir tmp
    cd /
    vncserver -geometry 960x540
    
    # don't put duplicate lines in the history. See bash(1) for more options
    #export HISTCONTROL=ignoredups
    
    <rest of stock .bashrc follows from here>

    As you can see, I simply added:

    Code:
    export USER=root
    cd /
    rm -r -f tmp
    mkdir tmp
    cd /
    vncserver -geometry 960x540

    I'm not going to be responsible for other .bashrc changes, sorry.

    I've mentioned earlier in the thread why I chose the native resolution over 1200x800 - and I still recommend that whatever you chose, you're best to consider something with a 16x9 ratio. No disrespect at all to the instructions - I would not be here without StrumerJohn - but his recommendation comes from the original days before we had qHD displays. Besides, he mentioned in the OP that chosing resolution was optional to your needs.


    4. Installation

    If you already grokked what the OP install steps were doing when you read them, you can interject the above steps where appropriate.

    Otherwise, just play it safe and do all of this after you have the OP's stuff working and happy for you.

    ~~~~~~~~

    Note to StrumerJohn - if you think this is in any way worthy, suggest you just quote this or reference it in your original instructions. That way, you retain the righteousness and I'll retain the support for this stuff - but, do as you see fit, after all, it's Open. ;)

    PS, if anyone cares and if you've missed it, I have my screen shots and a relationship diagram beginning at this post over on AF -

    http://androidforums.com/evo-3d-all-things-root/387978-ubuntu-linux-3vo.html#post3040572

    ~~~~~~~~~

    PPS - Guess I just can't pass up showing what an old BSD guy living in the desert uses for wallpaper. ;)

    wallpapered-lxde.jpg
    2
    "Upgrade" Step 17

    Step 17 should be "apt-get update && apt-get upgrade"