How I set up ElementaryOS in Crouton on an Acer C7 Chromebook

(this post recovered from my old deleted blog via google Cache)

My wife has been using a Chromebook C7 for about a year now with a great deal of success. It does almost everything she needs, except connect to our printer, and run Firefox (for some reason our medical insurance’s website does not accept Chrome). So I wanted to set up a Linux UI for her to do these things, and thought ElementaryOS would be pretty and simple for her. Unfortunately I only found partial information on how to set it up. After a bit of tinkering, she has a functional ElementaryOS interface. Here’s what I did: Set up a regular Crouton chroot running xfce

1) Install crouton with an xfce interface (LifeHacker has a straightforward write-up available[1] )

This should get you to an xfce chroot. Now, instead of installing a second chroot for Elementary, we’re going to modify the xfce chroot to run Pantheon (the EOS interface). This means you can switch between Elementary and XFCE on the same chroot, similar to having the two desktop interfaces installed on the same Linux laptop.

Please note, since Elementary only builds on Ubuntu LTS releases, you need to stick with 12.04. Also, eOS doesn’t build their system for anything but x86, so if you have an ARM chromebook, you are unfortunately out of luck.

Edit: 2013/12/26 According to David Schneider, the crouton maintainer on GitHub, you can install the x11 or gtk-extra target rather than xfce, if you don’t want XFCE as well.

2)Install the elementary-desktop packages

Fire up your XFCE interface and open a terminal. Add the package repository for Elementary and install elementary-desktop:

$ sudo su
# add-apt-repository -y ppa:elementary-os/stable
# apt-get update
# apt-get install elementary-desktop

(Constantly typing sudo before every command is silly.)

3) Make your startup scripts

This was the part that took some me figuring. But after some reading, it turned out to be pretty simple.

On the chromebook (as root in crosh), we’re going to make a copy of /usr/local/bin/startxfce4:

# cp /usr/local/bin/startxfce4 /usr/local/bin/startelementary

Then edit the new file and change the last line, which reads

exec startxfce4


exec startelementary

Now in the chroot (either by starting the xfce desktop and doing this in a terminal, or just by going into your chroot directory in crosh), we’re going to copy the startup script for XFCE and modify it to start Elementary.

# cd /usr/bin

cp startxfce4 startelementary

Open this new startelementary script. Go to the very end, and delete this block of code:

if [ -f $BASEDIR/xinitrc ]; then exec $prog $BASEDIR/xinitrc $CLIENTRC $SERVERRC elif [ -f $HOME/.xfce4/xinitrc ]; then mkdir -p $BASEDIR cp $HOME/.xfce4/xinitrc $BASEDIR/ exec $prog $BASEDIR/xinitrc $CLIENTRC $SERVERRC else exec $prog /etc/xdg/xfce4/xinitrc $CLIENTRC $SERVERRC fi

Replace it with: exec $prog /usr/bin/xinit_pantheon

Finally, in the same directory create the xinit_pantheon script, like so:

#!/bin/sh /usr/sbin/lightdm-session “gnome-session –session=pantheon”

and make it executable with chmod +x xinit_pantheon

(you can put this script elsewhere if you like, just make sure to match up the path in your startelementary script.).

Now on the chromebook, in crosh, you should be able to launch an ElementaryOS Luna desktop with:

sudo startelementary

to start the chroot in xfce, as usual, run

sudo startxfce4

Edit Dec 26 A user on Reddit ran through this process and got Luna running, but the hotkeys to adjust screen brightness weren’t working for him. After a little looking around he got it fixed, here’s what he said: I think installing gtk2-engines-pixbuf fixed it. Either that or redoing the xmodmap for the key. One of those… I did them simultaneously so I’m not sure which one.

comments powered by Disqus