Skip to content

Instantly share code, notes, and snippets.

@ZhiguoLong
Last active January 6, 2018 14:19
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ZhiguoLong/95b969f5ce3f25042875 to your computer and use it in GitHub Desktop.
Save ZhiguoLong/95b969f5ce3f25042875 to your computer and use it in GitHub Desktop.
Crouton instructions

Simplified and Pipelined Installation Instruction

  1. Enter crosh by CTRL+ALT+T and typing shell to enter shell environment.

  2. The following will install usual targets.

    sudo sh ~/Downloads/crouton -r trusty -a amd64 -t unity-desktop,kde-desktop,xiwi,chrome,xorg -e
    
  3. Install Chinese Simplified support. First enter chroot by sudo enter-chroot -n trusty.

    sudo apt-get install language-pack-zh-hans
    sudo apt-get install language-pack-gnome-zh-hans
    sudo apt-get install language-pack-kde-zh-hans
    sudo apt-get install libreoffice-l10n-zh-cn
    sudo update-locale LANG="en_US.UTF-8" LANGUAGE="en:en"
    
  4. Fix autocomplete

    sudo apt-get install bash-completion
    
    • uncomment completion stuff from /etc/bash.bashrc
    • comment out completion stuff from ~/.bashrc
  5. Install i3wm.

    sudo echo "deb http://debian.sur5r.net/i3/ $(lsb_release -c -s) universe" >> /etc/apt/sources.list
    sudo apt-get update
    sudo apt-get --allow-unauthenticated install sur5r-keyring
    sudo apt-get update
    sudo apt-get install i3 i3status i3lock
    echo "exec i3" > ~/.xinitrc
    

    Add alias starti3='sudo enter-chroot -n trusty xinit' to your /home/chronos/user/.bashrc (in chromeOS shell).

    Check out these files for i3 configuration:

    Note that before using those files, you need to install scrot and imagemagick (e.g., by using apt-get).

  6. Install Dropbox.

    cd ~ && wget -O - "https://www.dropbox.com/download?plat=lnx.x86_64" | tar xzf -
    ~/.dropbox-dist/dropboxd
    
  7. Install Zotero

    • Download from here
    • Extract to a desired position
    • Add that path into PATH by adding PATH="/path/to/zotero:$PATH" (Note there is no forward slash after zotero)
  8. Install TiddlyDesktop

    • Download from here (I prefer v0.0.3)

    • Extract to a desired position

    • Add that path into PATH by adding PATH="/path/to/tiddlydesktop:$PATH"

    • In case of "nothing happens" (From: https://github.com/Jermolene/TiddlyDesktop):

      1. Install the package "bless" sudo apt-get install bless
      2. Load bless
      3. open nw file
      4. Search for "udev.so.0" and replace with "udev.so.1" -- set both fields to text
      5. save.
  9. Install TexLive Full after installing ubuntu

    sudo apt-get install texlive-full
    

Configure other settings and have fun!

Later maintenance

  1. Update

    sudo sh ~/Downloads/crouton -u -n trusty -e
    
  2. Backup

    sudo edit-chroot -b nameofchroot
    
  3. Restore

    sudo edit-chroot -r nameofchroot
    
  4. Delete

    cd /usr/local/chroots && sudo delete-chroot -y * && rm -rf /usr/local/bin
    

Crouton instructions

Example installing trusty unity-desktop

 sudo sh ~/Downloads/crouton -r trusty -a amd64 -t unity-desktop -e

run sh ~/Downloads/crouton to see the meaning of the options

usual targets: unity-desktop kde-desktop xiwi chrome

Update installed chroots

sudo sh ~/Downloads/crouton -u -n trusty -e

Backup installed chroots

Use sudo edit-chroot -b nameofchroot (in a crosh terminal shell) to back up your chroot, and sudo edit-chroot -r nameofchroot to restore it. edit-chroot will warn you if you’re clobbering a chroot by restoring, in which case you need to run sudo edit-chroot -rr nameofchroot (two r’s to confirm that you want to clobber it). See https://github.com/dnschneid/crouton/wiki/Backups for more details.

How do I remove crouton? (I want to make a fresh install)

From: dnschneid/crouton#10

Yep. It's probably easiest to let crouton do the checking for you, through:

cd /usr/local/chroots && sudo delete-chroot -y * && rm -rf /usr/local/bin

but if you're curious, you can confirm there are no lingering bind mounts via

mount | grep '/usr/local/chroots/'

Use/Disable Xiwi

You can set the default method back to xorg by updating with the xorg target explicitly, after which you can still use xiwi via -X (e.g.: sudo startxfce4 -X xiwi).

Running individual applications in windows and tabs

With xiwi installed, you do not need a desktop environment. You can launch apps on an individual basis in a Chromium OS window or tab.

Enter your chroot to get a command line: sudo enter-chroot Launch your app via the xiwi command: xiwi app Use xiwi -T app to launch in a tab, or xiwi -F app to launch full-screen. You can combine those into a single command sudo enter-chroot xiwi -T app. You can silence output and run the command in the background via sudo enter-chroot -b xiwi -T app.

For more details, see https://github.com/dnschneid/crouton/wiki/crouton-in-a-Chromium-OS-window-(xiwi)

Language Support

This is really important to correctly display chinese!

From: https://github.com/dnschneid/crouton/wiki/Languages

  1. Install language packs:
  2. Base language packs:
sudo apt-get install language-pack-{language-code}

For Chinese Simplified, {language-code} would be zh-hans! (Unlike zh_CN used in locale.)

  1. GNOME language pack (GNOME shell, Cinnamon, and Unity):
sudo apt-get install language-pack-gnome-{language-code}
  1. KDE language pack (KDE):
sudo apt-get install language-pack-kde-{language-code}
  1. Libreoffice
sudo apt-get install libreoffice-l10n-{language-code}

Here {language-code} would be zh-cn! (Unlike zh-hans used previously.)

  1. Change the default language:
sudo update-locale LANG="{locale}" LANGUAGE="{language-code}:en"

Example: (when you want to use Simplified Chinese as default language) sudo update-locale LANG="zh_CN.UTF-8" LANGUAGE="zh:en"

Example: (when you want to use English-US as default language) sudo update-locale LANG="en_US.UTF-8" LANGUAGE="en:en"

Restart to take effect!

Fix autocomplete

From: http://ubuntuforums.org/showthread.php?t=1865538

sudo apt-get install bash-completion
  • uncomment completion stuff from /etc/bash.bashrc
  • comment out completion stuff from ~/.bashrc

Crouton Command Cheat Sheet

See https://github.com/dnschneid/crouton/wiki/Crouton-Command-Cheat-Sheet

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment