Things on Chromebook

I am pleased for the performance and design with my chromebook Acer C720.
I had installed crouton by following the procedure,

  • Enable develop mode -> esc + refresh + power button, then crtl + d.
  • Open crosh window by crtl + alt + t, type shell, run sudo sh -e ./crouton -t xfce the default system installed in your chroot will be ubuntu 12.04 precise. To see the usage of crouton, sh ./crouton -h or sh ./crouton -t list or sh ./crouton -r list
  • Do not use the argument -P which install crouton via proxy, since opengpg verification would be failed by proxy, then process will pause.
  • To enter into ubuntu, just type sudo enter-chroot or sudo startxfce4, switch system by crtl + alt + forward then refresh and crtl + alt + backward
  • Recommend to install crouton integration extension in chrome from web store in google
  • Update ubuntu, sudo sh ./crouton -u -t xiwi,extension,keyboard, target xiwi should be placed at first, then sudo startxfce4 -b, ubuntu will run in a chrome tab, that is amazing. An issue encounterred when install xiwi is missing the dependency xserver-xorg-core, sudo enter-chroot then sudo apt-get install xserver-xorg-core
  • Some things to do after installing ubuntu, such as sudo apt-get purge xcreensaver, install leafpad, VLC etc.

I would like to leverage usb tethering insteads of wifi tethering from my phone. At beginning, I had tried easytether wihch works perfectly with my dual systems, but the lite version only support http, not include https. I have to find another way to surf internet using usb tethering.

  • To run easytether, install easytether lite from google play, in ubuntu, run sudo apt-get install libusb-1.0.0 and sudo dpkg -i easytether_0.7.4-1_i386.deb, it will install the easytether package in your system, type easytether connect, allow the connection in your phone, a new net interface will appear by ip addr

  • Another way to usb tethering, install adb in ubuntu, socks proxy way to surf intenet. Add ppa repository as below,

    1
    2
    3
    4
    5
    6
    7
    sudo apt-get install software-properties-common
    sudo apt-get install python-software-properties # to add apt-add-repository utility
    sudo add-apt-repository ppa:nilarimogard/webupd8
    sudo apt-get update
    sudo apt-get install android-tools-adb
    sudo apt-get install android-tools-fastboot
    sudo apt-get install usbutils # to add lsusb command
  • Install tools to create a virtual interface to let chromeos can connet to an Ethenent
    sudo apt-get install bridge-utils uml-utilities iptables

  • bridge-utils for brctl

  • uml-utilities for tunctl
    Add following rule in file /etc/udev/rules.d/99-android.rules
    SUBSYSTEM=="usb", ATTR{idVendor}=="0fce", ATTR{idProduct}=="61a9", MODE="0666", GROUP="plugdev"
    sudo service udev restart
    Plug my phone to chromebook, type lsusb, my phone can be recognized as Bus 001 Device 005: ID 0fce:61a9 Sony Ericsson Mobile Communications AB.

  • Follow these steps to connect internet with usb tethering

  • run below script
    adb forward tcp:41927 tcp:41927
    adb forward --list

  • At mobile, run AzLink, at ubuntu run openvpn azilink.ovpn

  • Add bridge interface by

    1
    2
    3
    4
    5
    6
    brctl addbr br0
    ifconfig br0 192.168.56.3 netmask 255.255.255.0 up
    iptables -I FORWARD -i tun0 -o br0 -j ACCEPT
    iptables -I FORWARD -i br0 -o tun0 -j ACCEPT
    iptables -t nat -A POSTROUTING -o tun0 -j MASQUERADE
    echo “nameserver 8.8.8.8 8.8.4.4” > /etc/resolv.conf
  • At this time, ubuntu can already connect to internet, but chromeos cannot. You need to setup internet connection at Setting Pannel, you just confirm the setting, nothing need to input, then you will see “Conneted to Ethernet”, chromeos now can surf internet.
    If you find the “The Web page is not available” message suddenly, you may re-configure the file /etc/resolv.conf with nameserver 8.8.8.8 8.8.4.4 or nameserver 192.168.56.1

  • Chinese display

  • Check locales /usr/share/i18n/SUPPORTED, /usr/share/locale, /usr/lib/locale

  • Add zh_CN.UTF-8 in /var/lib/locales/supported.d/local

    • re-gen locale : sudo locale-gen sudo dpkg-reconfigure locales
    • Add environment: add zh_CN.UTF-8 in /etc/environment
    • change default language, just export LANG=en_US.UTF-8 or zh_CN.UTF-8
    • Install zh_TW and zh_HK by sudo apt-get install language-support-fonts-zh-hant
    • Install chinese fonts by sudo apt-get install xfonts-wqy
    • Refer to http://www.davidpai.tw/ubuntu/2011/ubuntu-set-locale/
  • Fix issue of no sound in crouton
    Test sound $ sudo enter-chroot aplay /usr/share/sounds/alsa/Front_Center.wav
    Re-install pulseaudio and alsa-base

    1
    2
    3
    sudo apt-get install mplayer smplayer ubuntu-restricted-extras
    sudo apt-get remove --purge pulseaudio alsa-base
    sudo apt-get install pulseaudio alsa-base
  • Install latest version of git and golang

    add-apt-repository ppa:git-core/ppa
    1
    2
    3
    4
    5
    sudo add-apt-repository ppa:bcandrea/backports
    sudo apt-get update
    sudo apt-get install git
    sudo apt-get install golang
    sudo go get github.com/djimenez/iconv-go // Install chinese encoding package
  • Connect to RPi with adafruit serial cable sudo screen /dev/ttyUSB0 115200

  • Install Android Runtime for Chrome and ARC Welder to launch Android app to play with .

  • Tor on ChromeOS

  • Install apps of Orbot and Proxy Server on android mobile

  • Start Orbot, setup port forward on Proxy Server 127.0.0.1:8080 -> 127.0.0.1:8118 (Orbot service)

  • In crosh, type adb forward tcp:8080 tcp:8080

  • Ensure ChromeOS has a IP (assigned by wifi or bridged), configure the proxy as 127.0.0.1:8080

  • Now it is time to access following urls,
    http://check.torproject.org/
    https://duckduckgo.com/
    https://www.tor2web.org/ http://thehiddenwiki.org/

  • Install tor-browser (it is firefox based) in ubuntu

    1
    2
    3
    4
    5
    6
    7
    sudo vi /etc/apt/apt.conf.d/10proxy (Acquire::http::Proxy "http://192.168.137.1:21/";)
    export http://192.168.137.1:21/
    export http_proxy=http://192.168.137.1:21/
    export https_proxy=http://192.168.137.1:21/
    sudo -E add-apt-repository ppa:webupd8team/tor-browser
    sudo apt-get update
    sudo apt-get install tor-browser
  • If you do not want to surf internet with Tor, just stop Orbot and Proxy Server, start Proxoid

Reference:

http://www.omgchrome.com/an-introduction-to-tor-on-chrome-os/
https://docs.google.com/document/d/1I1lBG1P2GOf3ooNhX-5pyrVF6RnxmpuEw62pi17Tb0I/edit
http://www.ubertechblog.com/2011/07/beginners-guide-to-deep-web-or-darknet.html

Fix issue of “read from TUN/TAP : File descriptor in bad state (code=77)” when run openvpn azilink.ovpn after upgrading chromeos

Run the following command in your shell on ChromeOS (the shell, not crosh)

1
2
sudo stop shill
sudo start shill BLACKLISTED_DEVICES=tun0