I was lucky enough to attend Google
I/O this year, and the giveaway to
attendees was a Chromebook
Pixel.
While the screen on it is amazing and I do like ChromeOS, it's a bit limited
when it comes to the ability to do any development without an internet
connection. Since I'd like to do that, I started looking around at ways to be
able to do this. Unfortunately for me, the core of most of my development is
Git, and while there is a project to create a
JavaScript Git
implementation, it
isn't ready yet. So for the meantime, I figured that I needed to get a real
command line up and running and install Git locally.
Developer mode
I was overjoyed when I found Poking around your Chrome
OS
device,
a page on the Chromium Wiki that explains how to put your device into developer
mode.
Developer mode security
I want to call this out because it is not obvious: Once you turn on developer mode, anyone can log into your Chromebook as root by switching to virtual terminal 2 (control-alt-forward
, where forward
is the key with a right pointing arrow to the right of esc
) since by default there is no root password. If you don't ever switch to that terminal, you might not know about this, but if you're going to use your Chromebook for more than just a testing device, you should set a password by running chromeos-setdevpasswd
from a terminal, which will allow you to set a password and then disbale root logins (you can use sudo
to run commands as root).
Going beyond developer mode
While developer mode gives you access to a real Linux shell, there is
precious little in the way of userland applications installed in stock Chrome
OS. At that point, it seemed like my only options were to either build a bunch
of applications myself to get a usable system or to replace ChromeOS with
Linux on the Pixel.
Since I actually do like Chrome OS, I decided to go the first route, even
though it would be slow going and pretty hard to do.
Crouton
When I asked at the Chrome Questions area to see if there was at least a
version of GCC I could download so I could build the tools I needed, I was told
about Crouton (Chromium OS Ubuntu Chroot
Environment). It makes it fantastically
easy to get a working install of Linux alongside the standard Chrome OS
install. I downloaded it, followed the instructions in the readme to install an
xfce environment, and watched it fail. It turns out that for some reason, it
had neglected to install the 'core' set of packages, so things weren't working
right. After deleting that chroot, I then ran it with 'core,xfce', and I had
success. (I've filed an issue on Crouton for xfce not properly installing
core.)
UPDATE: Sounds like something else broke on my first install, it apparently didn't even get to the point of installing core
. So you should be able to follow the instructions on the site no problem and just install xfce
or whatever environment you like best. If you do happen to see the problem I saw, please update the bug.
Scaling X11
After everything was successfully installed, I started xfce, and realized that
everything was pretty, but really, really, really small. Given that the Pixel
has what is termed a "retina" screen, I searched for "linux retina", and
stumbled across a blog post on properly confi
guring a Retina Mac Book Pro in
Linux,
which had the magic incantation. The secret is xrandr
, which has an option to
allow you to scale your screen. The only difference from his instructions for
me is that the device name on my Pixel is eDP1
instead of DP-2
. I have not
attemped to use the script linked to in the post, but it looks like it should
work if you change DP-2
to eDP1
. (Of course, you should check with xrandr
-q
to make sure your display device has the same name as mine.)
The Search Key
I map the Search
key on the Chromebook keyboard to be another Control
key,
so it threw me off in xfce that the mapping wasn't there anymore. Perhaps
surprisingly, the Search
key isn't mapped to Caps Lock
, it's mapped to
Super_L
. Also, the keyboard preferences in xfce don't let you remap keys
(perhaps an argument to add the extra 500MB+ for Unity or KDE), so I had to
fall back to xmodmap. My mappings file looks like this:
remove mod4 = Super_L
add Control = Super_L
Of course, if you replace Control
with Caps_Lock
, you'll have a Caps Lock
key, if that's more to your liking.
The end for now
Right now, I haven't done anything to make either the scaling or the search key
remapping happen automatically. If I start going in and out of xfce more often,
I'll do that (and post about it), but it also shouldn't be hard to find out how
to do it, as it would just be whatever standard way xfce wants one to do these
things.
Anyways, I'm currently fascinated with the Pixel, as the screen is amazing and
it makes me not want to use anything else. It's even more attractive because
it's light and portable and now has a full development environment. (I did all
of the code labs at Google I/O using it!) So hopefully, I'll have more to say
about Chromebook Pixel and Chrome OS hacking in the future.