Family Encyclopedia >> Electronics

How to automatically start Crouton when loading ChromeOS

So you have a Chromebook and installed Crouton so you can use normal Linux on it, right? Now, how about making this Linux install a little more useful by enabling autostart.

ContentsPreparationInstallConfigurationConclusion

By enabling autostart for your Crouton installation, you completely remove the need to boot ChromeOS, open a terminal, and enter a couple of commands to access your Linux installation.

Preparation

Before you can automatically start your Crouton Chroot, you must first enable read-write access to the ChromeOS filesystem. To do this, press "Ctrl + Alt + T" on your keyboard. This will open the terminal.

How to automatically start Crouton when loading ChromeOS

sudo sh ~/Downloads/rw-rootfs

After running the above command, the script should print on-screen instructions directly to the terminal window. Follow them carefully.

Install

Now that the filesystem can be written, adding the files needed for autostart should be fairly straightforward. The first thing to do is download files.

The first file is the base configuration file for autostart.

curl -Lk --connect-timeout 60 -m 300 --retry 2 "https://gist.github.com/DennisLfromGA/6443733/download" | tar -xzO> ~/Downloads/crouton.conf

After downloading the configuration file, we will need to move it.

How to automatically start Crouton when loading ChromeOS

sudo mv ~/Downloads/crouton.conf /etc/init

Now that we have downloaded and placed crouton.conf, we will need to download another file.

curl -Lk --connect-timeout 60 -m 300 --retry 2 "https://gist.github.com/DennisLfromGA/aa1c92ebe77c3df4ca84/download" | tar -xzO> ~/Downloads/crouton.init

Don't worry about moving the crouton.init file. It should stay in your downloads folder.

Configuration

Setting up autostart isn't terribly difficult. First, install this Chrome extension to edit the file. After that, open crouton.init in text editor.

How to automatically start Crouton when loading ChromeOS

Set the default Chroot that autostart should use. If you don't know your Chroot name, run cd /usr/local/chroots&ls in a shell. It will tell you everything you need to know.

After setting the default Chroot in crouton.init, you will need to specify the DE you want it to load by default. Remove the pound sign from the DE you will use in Crouton.

How to automatically start Crouton when loading ChromeOS

Finally, remove the pound sign from “XMETHOD=xorg” and place a pound sign in front of “XMETHOD=xiwi”. This will ensure that your session is running with Xorg.

How to automatically start Crouton when loading ChromeOS

Note: If your Crouton installation is running in a window, don't remove the pound sign from Xorg. Leave it like that.

When all changes are complete, save the file and reboot. Autostart must be fully enabled. Enjoy!

Conclusion

As a Chrome device owner, I have to say that being able to start Crouton automatically is incredibly useful. Having a regular chroot on my Chromebook is pretty cool, but I ultimately decided against using it because it's a pain having to open a shell and enter a couple of commands just to boot. That alone put me off using it.

With the autostart method, I no longer feel like Crouton is just a neat tool that I never use. This completely changed the way I view installing Linux in chroots on Chromebooks.

What do you think about Crouton autostart? Do you like to? Tell us below in the comments!