Costini: Linux on Chromebook

I bought a new bargain Chromebook today – the Lenovo C330 for $179 – which has a touch screen and can run both android apps and Linux apps via Crostini. The somewhat built in Linux is running fine under the Dev Channel – it runs Debian GNU/Linux 9 (stretch) on its arm64 architecture. And – so far – so good.

At this link, are instructions to install a Linux Software Center and first searched for Eclipse.

Hmmmm. How about Code::Blocks? It’s there! And it installed! But when clicking “launch”- it didn’t seem to at first. Back to the terminal. In /usr/bin – there it is. Can I just run ./codeblocks?

But then I went back to my launcher – this time it worked and simply asked for the selection of the C compiler and proceeded to launch. Ok! 
Screenshot 2018-11-11 at 11.53.05 AM
Ok! But what about running apache2 and php7? Running sudo apt-get install php installed both but I could not figure out how to make it actually run until I found this page: It instructed me that my linux container has its own ip address and commands that got apache to run without  messing directly with config files. The default file is /var/www/html/index.html. Hmmm… not sure how to edit that in Codeblocks! So let’s install gedit from the Software Center (that worked fine) and try sudo gedit index.html… Nope, that didn’t work. Trying to run it from the launcher does in fact run it and allows you to open /var/www/html/index.html but it’s readonly. So I’m currently just using sudo nano to edit. Git came installed with Crostini, and I had no problem using sudo git clone… to install one of my repositories in /var/www and include it in the index.php file. Ultimately, I want this to mimic the new Google App Engine standard php 7 environment which limits you to a single router index.php file. Here are instructions for doing this with .htaccess – – although I expect this could be done better with apache2 configuration file settings. More to come – I’m sure there must be a way to securely run codeblocks in root.  

Then I discovered that I don’t really need Crostini at all! Termux is an android play store app that basically does the same thing – an encapsulated linux environment. Here is a very useful article on coding in Termux.

Published by John Coonrod

Executive Vice President, The Hunger Project

%d bloggers like this: