Chrooted UbuntuThis is a featured page

An Ubuntu can be installed in a chroot, and accessed through a VNC client.

Why do this?

  • You run Android and Ubuntu at the same time. Just press Home and you're back in Android.
  • WiFi works out of the box - Ubuntu just picks up Android's connections.
  • It's relatively stable. Also, this is a well-understood technique - people did it with many phones.

Why not do this?

  • The graphics performance is abysmal. You view Ubuntu through a VNC client, and with 1024x600 it's really slow.
  • Sound doesn't work out of the box (but you can listen to music through the Android player while working in Ubuntu)
  • Many keys don't work: ctrl, alt, pgup, pgdn, tab (tab emits an X event however, just the wrong one). Esc works.
  • Right and middle clicks don't work too. You have to go through VNC client menus to send a right click.
  • Chromium doesn't work out of the box.

HOWTO

Prerequisites - root, busybox

1. On the desktop, mount the AC100 storage. Make sure you have exec and suid mount options. Then run 'debootstrap--arch=armel maverick <directory>' into a directory, say 'ubuntu'. Unmount.

2. On AC100:
$ su
# export PATH=/bin:/usr/bin:/sbin:/usr/sbin:$PATH
# export USER=root
# export HOME=/root
# export TERM=xterm
# busybox mount -o remount,exec,suid /storage
# cd /storage/ubuntu
# busybox mount -o bind /proc proc
# busybox mount -o bind /sys sys
# busybox mount -o bind /dev dev
# busybox mount -o bind /dev/pts dev/pts
# busybox chroot . bash
root@localhost:/#

That's the Ubuntu shell!

3. apt-get install lots of stuff. I feel ubuntu-desktop is too fat, but opinions vary. In the very least, we need tightvncserver and some window manager.

4. Set your timezone with dpkg-reconfigure tzdata.

5. Create a user with adduser username. You must also create a group with numeric ID 3003 and add yourself to it, otherwise vncserver's sockets will be blocked! So,
addgroup --gid 3003 sockets
usermod -G sockets -a username

6. Su to the user and create a file ~/.Xsession. Write there a list of stuff you want to run for a session, like a window manager. Here's an example:
xterm &
tint2 &
openbox

7. Run vncpasswd to set a vnc password, then run vncserver -geometry 1024x600. It will tell you the VNC display number, most likely :1.

8. Install android-vnc-client and connect to 127.0.0.1:5901 (actually, 5900 + the VNC display number).

Enjoy!


No user avatar
AndrewGryaznov
Latest page update: made by AndrewGryaznov , Jun 4 2011, 11:00 AM EDT (about this update About This Update AndrewGryaznov Edited by AndrewGryaznov

2 words added
1 word deleted

view changes

- complete history)
Keyword tags: chroot debian ubuntu vnc
More Info: links to this page
Started By Thread Subject Replies Last Post
AndrewGryaznov doesn't work 1 Aug 15 2011, 7:51 AM EDT by zedrok
Thread started: Jun 4 2011, 8:35 AM EDT  Watch
- Do you mean your /storage is formatted as ext3?
for vfat it seems that virtual loopback device will be required
1  out of 1 found this valuable. Do you?    
Keyword tags: None
Show Last Reply
Showing 1 of 1 threads for this page

Related Content

  (what's this?Related ContentThanks to keyword tags, links to related pages and threads are added to the bottom of your pages. Up to 15 links are shown, determined by matching tags and by how recently the content was updated; keeping the most current at the top. Share your feedback on Wetpaint Central.)