FORUMS
Remove All Ads from XDA
Honor 7x
Win an Honor 7X!

 View Poll Results: What Kernels did you get Ubuntu to run on?

Silverneedle
 
3 Vote(s)
12.00%
[NOLIGHTS][LEDS]
 
0 Vote(s)
0%
[TEAM XPOSED] [Kernel] modded Stock
 
0 Vote(s)
0%
RCMIX
 
3 Vote(s)
12.00%
Stock 1.13.651.7
 
3 Vote(s)
12.00%
Tiamat
 
2 Vote(s)
8.00%
Bcblend
 
3 Vote(s)
12.00%
mKernel
 
0 Vote(s)
0%
MIUI Kernel
 
1 Vote(s)
4.00%
Other / Not Listed / Custom / My ROM has it's own
 
12 Vote(s)
48.00%

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

980 posts
Thanks Meter: 1,683
 
Thread Closed Email Thread
7th August 2011, 05:02 PM |#91  
Junior Member
Thanks Meter: 0
 
More
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.
 
 
7th August 2011, 05:42 PM |#92  
danaff37's Avatar
Senior Member
Flag Saint Petersburg, FL
Thanks Meter: 902
 
More
Quote:
Originally Posted by unodish

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
The Following User Says Thank You to danaff37 For This Useful Post: [ View ] Gift danaff37 Ad-Free
7th August 2011, 07:35 PM |#93  
EarlyMon's Avatar
Senior Member
Thanks Meter: 887
 
More
Quote:
Originally Posted by evilvoice

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.

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-...ml#post3040572

~~~~~~~~~

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

Click image for larger version

Name:	wallpapered-lxde.jpg
Views:	69
Size:	45.2 KB
ID:	680802
The Following 3 Users Say Thank You to EarlyMon For This Useful Post: [ View ] Gift EarlyMon Ad-Free
7th August 2011, 08:01 PM |#94  
EarlyMon's Avatar
Senior Member
Thanks Meter: 887
 
More
Quote:
Originally Posted by Zarboz

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.
7th August 2011, 09:46 PM |#95  
Member
Thanks Meter: 6
 
More
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?
7th August 2011, 10:18 PM |#96  
EarlyMon's Avatar
Senior Member
Thanks Meter: 887
 
More
Quote:
Originally Posted by duffkiligan


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

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

Any ideas?

I don't know if it matters, but I installed busybox using Stericson's installer - my root prompt is just a plain #.
8th August 2011, 04:45 AM |#97  
EarlyMon's Avatar
Senior Member
Thanks Meter: 887
 
More
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...s-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!

PS - Left questions at the dev's site asking for tips.
8th August 2011, 07:45 AM |#98  
Senior Member
Flag Conyers GA
Thanks Meter: 546
 
More
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.
The Following User Says Thank You to evilvoice For This Useful Post: [ View ] Gift evilvoice Ad-Free
8th August 2011, 08:06 AM |#99  
EarlyMon's Avatar
Senior Member
Thanks Meter: 887
 
More
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!

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.
8th August 2011, 09:48 AM |#100  
Knucklessg1's Avatar
Senior Member
Thanks Meter: 103
 
More
Quote:
Originally Posted by StrumerJohn

Because Ubuntu has some computer applications you can't normally use on your phone. In the browser download Java and check out runescape :P runs like shizzle but once we get new quad phones out I'm sure it would run fine. lol

Could it run.....
Crysis??

Sent from my HTC Sensation 4G using XDA App
8th August 2011, 07:43 PM |#101  
unCoRrUpTeD's Avatar
Senior Member
Flag Fort Worth, TX
Thanks Meter: 248
 
Donate to Me
More
Quote:
Originally Posted by EarlyMon

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

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

Do it from your phone

Code:
adb reboot
adb shell busybox df -h /dev/block/mmcblk1p1 <-----[make sure you have enough free space]
adb shell
cd /sdcard/ubuntu
mv ubuntu.img oldubuntu.img
dd if=/dev/zero of=ubuntu.img bs=1024000 count=XXXX <-----[XXXX is the size in MB you want]
mke2fs ubuntu.img <------[answer "y" if it ask if you want to proceed]
losetup /dev/block/loop1 ubuntu.img
losetup /dev/block/loop2 oldubuntu.img
mkdir ubuntu
mkdir oldubuntu
mount -t ext2 /dev/block/loop1 ubuntu
mount -t ext2 /dev/block/loop2 oldubuntu
cp -a oldubuntu/* ubuntu
umount ubuntu
umount oldubuntu
reboot
Now check and make sure you can access ubuntu
If so then you can delete oldubuntu.img
The Following User Says Thank You to unCoRrUpTeD For This Useful Post: [ View ] Gift unCoRrUpTeD Ad-Free
Thread Closed Subscribe to Thread

Tags
android, htc evo 3d, htc sensation 4g, htc shooter, ubuntu
Previous Thread Next Thread
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes