Last July I bought a Samsung Chromebook Pro for my wife, as she uses google docs/sheets for work and web browser for entertainment – exactly what Chromebook provides. This Chromebook is light-weight (2.4 lbs), thin (0.5”), equipped with touch screen, has about 7 hours battery time for video streaming, and even has a built-in stylus for writing. It is a powerful machine (Intel Core m3 processor, 4G RAM, 32G flash storage), an overkill for just Youtube streaming and web browsing.
(Un)fortunately she was not amused thus the toy is mine. To set up a coding environment, I found a few options at the time:
- wipe out the ChromeOS and install some Linux distro (welcome to the 90s)
- turn on the so-called developer mode (this action voids the warranty and exposes yourself to the risk of accidentally wiping out the hard drive at boot up by pressing the space key) and then
- keep the ChromeOS and
I didn’t like any of them and reluctantly opted for the ssh option. It makes the Chromebook useless without fast internet connection.
Fortunately, I discovered an Android app called Termux. It is a Linux terminal emulator that runs on both Android phones and some Chromebooks (see a full list of them here). It enables the following tools in a bash environment without internet connection:
They are basically all I need for coding. It is such a game changer that now I can do real work on this Chromebook. I even find it more preferable than my MacBook Pro since it is easier to carry around and has a battery time of over 10 hours for coding.
To instal termux, you can visit this link:
There are a few must-have extensions
termux-setup-storage: it creates a folder called
storageat your home folder which provides access to the Chromebook file systems (downloads, music, pictures, etc)
pkg install termux-exec: for better support for bash
pkg install diffutils: for
pkg install python-dev: needed for
LDFLAGS=" -lm -lcompiler_rt" pip install numpy
pkg install pkg-config: somehow this is needed for
pip install matplotlib, otherwise it complains that
freetypeis not present (although it is)
pkg install libffi-dev: for Jekyll
pkg install libxslt-dev libxml2-dev: for pandas-datareader
matplotlib to work properly, you also need to create a config file at
~/.config/matplotlib/matplotlibrc with the following content:
backend : agg
You may wonder why I bother installing
matplotlib in bash.
jupyter notebook --ip='0.0.0.0', you can see the plots directly in the Chrome browser.
To install scipy, the easiest way is to use the its-pointless repo. All the community repositories can be seen from this link.
To install latex fonts and templates from various publishers, run
tlmgr install collection-publishers tlmgr install times textcase
Termux also supports multiple sessions (like the old Linux tty1, tty2, etc). The shortcuts are
ctrl+alt+c: create a new session
ctrl+alt+n: go to next session
ctrl+alt+p: go to previous session
ctrl+alt+[1-9]: go to the numbered session
More of these shortcuts can be found in the termux keyboard page. I notice that by clicking and holding at the left edge of the screen, a drawer is activated to view all the sessions.
For more information in setting things up, check out this blog post by Kenneth White:
In case you want to install a real Linux distro on the Chromebook, checkout this post by Miguel Grinberg
The general complaints I have for this Samsung Chromebook Pro are
- The keyboard sucks: the keys are somewhat small and the layout is too crowded. Although I gradually get used to the layout, now the left ctrl key gets stuck sometimes due to over use. On the other hand the right alt and ctrl keys are almost never used.
- It’s too easy to hit the power button accidentally.
It cannot connect to my company’s VPN.(There is an Android app called VpnCilla that does the trick. It costs $4.99. Also remember to enable
- There is no out-of-box way to display the date in the status bar. One has to move the mouse over the clock to see the date. I don’t know why ChromeOS is like this …
The complaints I have for termux include
Pasting into the vim doesn’t work although pasting into shell works by long press. My current workaround is to either use(Paste is
echo <content> >> <file>or paste into nano.
ctrl+alt+v, works inside vim too, goodbye nano, goodbye long press)
- Access to
http://localhostis not granted. My current workaround is to host web apps at
0.0.0.0and access the termux’s IP
100.115.92.2to test out.
- Python multiprocessing module doesn’t work. As a result, flake8 doesn’t work and I have to use (the inferior) pyflakes instead.
After six months, I gave up Termux and switched to Crouton and Chromebrew. See my new post here.