Running Linux on Chromebook using Crouton
Long before it became an actually built in option as it is now, it was only possible to retrofit a full scale Ubuntu installation on Chromebooks. These are my notes on installation gotchas for a complete developer environment on Ubuntu, including Zsh, Oh My Zsh, and Dropbox - all running via chroot
Chromium OS. There are now better ways of accomplishing the same thing, but back then (just a few months ago) it was the only reliable way.
Crouton is a sorta acronym for open source project Chromium OS Universal Chroot Environment.
crouton is a set of scripts that bundle up into an easy-to-use, Chromium OS-centric chroot generator.
Crouton has a major shortcoming for security minded users, and as such, (in my view and the view of crouton devs themselves,) folks would do well to take advantage of new improved security features in Chromium OS.
The devs recommend Crostini:
Crostini is an official project within Chromium OS to bring the Linux shell and apps to the platform in verified mode with clean integration, multi-layered security, and all the polish you expect from Chromium OS proper.
That said, pressing on:
Install Crouton
via crosh
after turning on Chromebook’s Developer Mode.
-
Update a chroot:
sudo sh ~/Downloads/crouton -u -n xenial
-
Mount a chroot and enter the ‘shell’:
sudo enter-chroot
-
Start Xfce via the
startxfce4
host command:sudo startxfce4
Linuxbook Mods
-
Install Sublime Text 3 -
sudo apt-get install sublime
-
Install git -
sudo apt-get install git-all
-
Install rbenv -
wget -q https://github.com/rbenv/rbenv-installer/raw/master/bin/rbenv-installer -O- | bash
addrbenv
toPATH
$echo 'export PATH="$HOME/.rbenv/bin:$PATH"' >> ~/.bashrc
rbenv init
add to .bashrc:eval "$(rbenv init -)"
finally
rbenv rehash` -
locale issues launching Sublime Text “On Linux, please reference your distribution’s docs for information on properly setting the
LANG
andLC_CTYPE
environmental variables. As a temporary work-around, you can launch Sublime Text from the Terminal with q:LANG=en_US.UTF-8 LC_CTYPE=en_US.UTF-8 sublime_text” locale issue - Set up a clean UTF8 environment Solution: This generally means you haven’t properly set up locales on your Linux box.sudo locale-gen en_US en_US.UTF-8
sudo locale-gen
by itself did not work- would result in fail in next commandsudo dpkg-reconfigure locales
(See alsoman locale-gen
.) -
ruby
- usingrbenv
- installing 2.5.1 set as globalrbenv global 2.5.1
rbenv rehash
- Rehash rbenv shims (run this after installing executables) ERROR: Ruby install aborted due to missing extensions - Try runningapt-get install -y libssl-dev libreadline-dev zlib1g-dev
to fetch missing dependencies. Colors in terminal DID NOT DO - in favor of just cloning repos -
Installing Dropbox getting Permissions Error node - npm, Install Node Js Linux sass
bundle install
on jekyll blog directory -
An error occurred while installing eventmachine (1.2.7), and Bundler cannot continue. Make sure that
gem install eventmachine -v '1.2.7' --source 'https://rubygems.org/'
succeeds before bundling. SOLUTION: Prependingbundle exec
to your command may solve this. -
Installed GCC, restarted, and was able to both
bundle install
andbundle exec jekyll serve
-
Installing ZSH via
apt-get
, making default shell Zsh -
then install
oh-my-zsh
-
Set Locale
export LC_ALL=en_US.UTF-8
export LANG=en_US.UTF-8
export LANGUAGE=en_US.UTF-8
Dropbox
Ended up simply installing 64 bit deb package from site.
Add Dropbox’s repository key
sudo apt-key adv --keyserver pgp.mit.edu --recv-keys 5044912E
Add Dropbox’s repository
sudo add-apt-repository "deb http://linux.dropbox.com/ubuntu $(lsb_release -sc) main"
`
Update and install Dropbox
sudo apt-get update && sudo apt-get install nautilus-dropbox
For Ubuntu 12.10:
Add repository key sudo apt-key adv --keyserver pgp.mit.edu --recv-keys 5044912E
Add repository sudo add-apt-repository "deb http://linux.dropbox.com/ubuntu precise main"
Update your system and install Dropbox
sudo apt-get update && sudo apt-get install dropbox
When prompted click Next, then click Start Dropbox to continue.
Zsh + Oh My Zsh
chsh -s $(which zsh)
echo $0
to test which shell currently running
Can’t Make Zsh The Default Shell
Solve empty nvmrc
file nvm issues 1113
RIGHT ALT keys (AltGr) on EXTD keyboard
For Deutsch keyboard.
Commonly used:
ALT + q = ä (+ SHIFT Ä)
ALT + p = ö (+ SHIFT Ö)
ALT + y = ü (+ SHIFT Ü)
ALT + s = ß
ALT + SHIFT + U + 1E9E = ẞ (capital ß)
ALT + z = æ (+ SHIFT Æ)
ALT + 5 = €
ALT + SHIFT + c = ¢
ALT + SHIFT + 5 = £
Misc:
ALT + r = ë (+ SHIFT Ë)
ALT + j = ï (+ SHIFT Ï)
ALT + n = ñ (+ SHIFT Ñ)
ALT + w = å (+ SHIFT Å)