Running Chromium OS on Linux

To get it run on Linux we need to first go thought a few steps

First, download the tar file from Sourceforge.

This tar file contains all the necessary files to run contains Chromium OS. Since the flash pepper plugin is not opensource it is not included in the tar file. We will look at how to add it to Chromium later.

Once downloaded and unpacked on to the folder of your choosing you will need to get a set of API keys. Due to Google’s policies and limited number of uses per month the free API’s have, all my chromium builds get compiled without access to Google API’s and hence no Google services.

Getting a set of these for yourself is a fairly trivial mater.

First get yourself to the Google Developers Console and create a project.

newproject

After creating one make sure to select all the apis you will need to use Chromium OS.

Make sure you are a member of chromium-dev@chromium.org (you can just subscribe to chromium-dev and choose not to receive mail). For convenience, the APIs below are only visible to people subscribed to that group.

apis

You should select anything with Chrome on its name, like the ones bellow.

Chrome Remote Desktop API

Chrome Spelling API

Chrome Suggest API

Chrome Sync API

Chrome Translate Element

Google Maps Geolocation API

Safe Browsing API

Speech API

Time Zone API

Google Cloud Messaging for Chrome

Drive API (Optional, enable this for Files.app on Chrome OS and SyncFileSystem API)
Google Now For Chrome API (Optional, enabled to show Google Now cards)

Google+ API

Chrome OS Hardware ID API

Chrome OS Registration API

credetials before

After selecting all of the API’s go to the Credentials tab and click on Create new Client ID button in the OAuth section to create an OAuth 2.0 client ID.

You want “Installed Application” for the APPLICATION TYPE section and you want “Other” for the INSTALLED APPLICATION TYPE section.

OAuth done

Once done you click the red Create New Key button in the Public API Access section and create a new Browser key.
You want to leave the box on the “Create a browser key and configure allowed referers” empty.

(This explanation was adapted from http://www.chromium.org/developers/how-tos/api-keys)

After this you will need to get the GOOGLE_API_KEYGOOGLE_DEFAULT_CLIENT_IDGOOGLE_DEFAULT_CLIENT_SECRET from the credentials page (these are the key’s that you just created).

After you have all these keys, you can start chromium with a few simple commands.

#!/bin/sh
cd <PLACE WHERE DECOMPRESSED YOUR TAR FILE>
export GOOGLE_API_KEY="<INSERT HERE>"
export GOOGLE_DEFAULT_CLIENT_ID="<INSERT HERE>"
export GOOGLE_DEFAULT_CLIENT_SECRET="<INSERT HERE>"
./chrome --login-manager --user-data-dir=$HOME/cros_user

With these line you will able to start chromium os. The option “–user-data-dir=$HOME/cros_user” will allow chromium os to run without disrupt any current chromium installations you might have on your system.

*IF* upon running this you get the following bug:

[30318:30318:0131/185540:FATAL:browser_main_loop.cc(168)] Running without the SUID sandbox! See https://code.google.com/p/chromium/wiki/LinuxSUIDSandboxDevelopment for more information on developing with the sandbox on.
Aborted

you will need to run the following 2 lines.

sudo chown root:root chrome-sandbox
sudo chmod 4755 chrome-sandbox

All my builds come with sandbox included.

To use flash with your Chromium OS, the easiest way it to copy your flash pepper plugin from your Google Chrome installation. (assuming you have it installed…)

go to /opt/google/google-chrome and copy the PepperFlash folder to your Chromium OS folder.

To start using it you will need to add the following options to your chromium os:

./chrome --login-manager --user-data-dir=$HOME/cros_user --ppapi-flash-path=PepperFlash/libpepflashplayer.so --ppapi-flash-version=16.0.0.296

The version number needs to be copied from the 4th line of the manifest.json that is inside of the PepperFlash folder.

Leave a Reply

Your email address will not be published. Required fields are marked *