id: 2f74792ea46d43bc94a8503415317ae2
parent_id: 
item_type: 1
item_id: f1f0222592714d24914760fe20f7d521
item_updated_time: 1764345571054
title_diff: "[{\"diffs\":[[1,\"dnschneidcrouton [2]\"]],\"start1\":0,\"start2\":0,\"length1\":0,\"length2\":20}]"
body_diff: "[{\"diffs\":[[1,\"<html>\\\r\\\n<head>\\\r\\\n  <title>dnschneid/crouton</title>\\\r\\\n  <basefont face=\\\"微软雅黑\\\" size=\\\"2\\\" />\\\r\\\n  <meta http-equiv=\\\"Content-Type\\\" content=\\\"text/html;charset=utf-8\\\" />\\\r\\\n  <meta name=\\\"exporter-version\\\" content=\\\"YXBJ Windows/608924 (zh-CN, DDL); Windows/10.0.0 (Win64); EDAMVersion=V2;\\\"/>\\\r\\\n  <style>\\\r\\\n\\tbody, td {\\\r\\\n\\t  font-family: 微软雅黑;\\\r\\\n\\t  font-size: 12pt;\\\r\\\n\\t}\\\r\\\n  </style>\\\r\\\n</head>\\\r\\\n<body>\\\r\\\n<a name=\\\"11661\\\"></a>\\\r\\\n<h1>dnschneid/crouton</h1>\\\r\\\n\\\r\\\n<div><span><div style=\\\"-evernote-webclip:true\\\"><br/><div><div><div><div><h1>crouton: Chromium OS Universal Chroot Environment</h1><div><div></div></div></div>\\\n<p>crouton is a set of scripts that bundle up into an easy-to-use,\\\nChromium OS-centric chroot generator. Currently Ubuntu and Debian are\\\nsupported (using debootstrap behind the scenes), but &quot;Chromium OS Debian,\\\nUbuntu, and Probably Other Distros Eventually Chroot Environment&quot; doesn't\\\nacronymize as well (crodupodece is admittedly pretty fun to say, though).</p>\\\n<h2>&quot;crouton&quot;...an acronym?</h2>\\\n<p>It stands for <em>ChRomium Os Universal chrooT envirONment</em>\\\n...or something like that. Do capitals really matter if caps-lock has been\\\n(mostly) banished, and the keycaps are all lower-case?</p>\\\n<p>Moving on...</p>\\\n<h2>Who's this for?</h2>\\\n<p>Anyone who wants to run straight Linux on their Chromium OS device, and doesn't\\\ncare about physical security. You're also better off having some knowledge of\\\nLinux tools and the command line in case things go funny, but it's not strictly\\\nnecessary.</p>\\\n<h2>What's a chroot?</h2>\\\n<p>Like virtualization, chroots provide the guest OS with their own, segregated\\\nfile system to run in, allowing applications to run in a different binary\\\nenvironment from the host OS. Unlike virtualization, you are <em>not</em> booting a\\\nsecond OS; instead, the guest OS is running using the Chromium OS system. The\\\nbenefit to this is that there is zero speed penalty since everything is run\\\nnatively, and you aren't wasting RAM to boot two OSes at the same time. The\\\ndownside is that you must be running the correct chroot for your hardware, the\\\nsoftware must be compatible with Chromium OS's kernel, and machine resources are\\\ninextricably tied between the host Chromium OS and the guest OS. What this means\\\nis that while the chroot cannot directly access files outside of its view, it\\\n<em>can</em> access all of your hardware devices, including the entire contents of\\\nmemory. A root exploit in your guest OS will essentially have unfettered access\\\nto the rest of Chromium OS.</p>\\\n<p>...but hey, you can run <a href=\\\"https://en.wikipedia.org/wiki/Tux_Racer\\\" target=\\\"_blank\\\">TuxRacer</a>!</p>\\\n<h2>Prerequisites</h2>\\\n<p>You need a device running Chromium OS that has been switched to developer mode.</p>\\\n<p>For instructions on how to do that, go to <a href=\\\"https://www.chromium.org/chromium-os/developer-information-for-chrome-os-devices\\\" target=\\\"_blank\\\">this Chromium OS wiki page</a>,\\\nclick on your device model and follow the steps in the <em>Entering Developer Mode</em>\\\nsection.</p>\\\n<p>Note that developer mode, in its default configuration, is <em>completely\\\ninsecure</em>, so don't expect a password in your chroot to keep anyone from your\\\ndata. crouton does support encrypting chroots, but the encryption is only as\\\nstrong as the quality of your passphrase. Consider this your warning.</p>\\\n<p><span style=\\\"color: rgb(0, 0, 255);\\\">It's also highly recommended that you install the <a href=\\\"https://goo.gl/OVQOEt\\\" target=\\\"_blank\\\"><span style=\\\"color: rgb(0, 0, 255);\\\">crouton extension</span></a>,\\\nwhich, when combined with the <code>extension</code> or <code>xiwi</code>\\\ntargets, provides much improved integration with Chromium OS.</span></p>\\\n<p>That's it! Surprised?</p>\\\n<h2>Usage</h2>\\\n<p>crouton is a powerful tool, and there are a <em>lot</em> of features, but basic usage\\\nis as simple as possible by design.</p>\\\n<p>If you're just here to use crouton, you can grab the latest release from\\\n<a href=\\\"https://goo.gl/fd3zc\\\" target=\\\"_blank\\\">https://goo.gl/fd3zc</a>. Download it, pop open a shell\\\n(Ctrl+Alt+T, type <code>shell</code> and hit enter), and run <code>sh ~/Downloads/crouton</code> to\\\nsee the help text. See the &quot;examples&quot; section for some usage examples.</p>\\\n<p><span style=\\\"color: rgb(0, 0, 255);\\\">If you're modifying crouton, you'll probably want to clone or download the repo\\\nand then either run <code>installer/main.sh</code> directly, or use <code>make</code> to build your\\\nvery own <code>crouton</code>. </span>You can also download the latest release, cd into the\\\nDownloads folder, and run <code>sh crouton -x</code> to extract out the juicy scripts\\\ncontained within, but you'll be missing build-time stuff like the Makefile.</p>\\\n<p>crouton uses the concept of &quot;targets&quot; to decide what to install. While you will\\\nhave apt-get in your chroot, some targets may need minor hacks to avoid issues\\\nwhen running in the chrooted environment. As such, if you expect to want\\\nsomething that is fulfilled by a target, install that target when you make the\\\nchroot and you'll have an easier time.  Don't worry if you forget to include a\\\ntarget; you can always update the chroot later and add it. You can see the list\\\nof available targets by running <code>sh ~/Downloads/crouton -t help</code>.</p>\\\n<p>Once you've set up your chroot, you can easily enter it using the\\\nnewly-installed <code>enter-chroot</code> command, or one of the target-specific\\\nstart* commands. Ta-da! That was easy.</p>\\\n<h2>Examples</h2>\\\n<h3>The easy way (assuming you want an Ubuntu LTS with Xfce)</h3>\\\n<ol><li>Download <code>crouton</code></li><li>Open a shell (Ctrl+Alt+T, type <code>shell</code> and hit enter) and run\\\n<code><span style=\\\"x-evernote:highlighted;background-color:#F6EE96;\\\">sudo sh ~/Downloads/crouton -t xfce</span></code></li><li><span style=\\\"x-evernote:highlighted;background-color:#F6EE96;\\\">\\\n</span></li><li>Wait patiently and answer the prompts like a good person.</li><li>Done! You can jump straight to your Xfce session by running\\\n<code><span style=\\\"x-evernote:highlighted;background-color:#F6EE96;\\\">sudo enter-chroot startxfce4</span></code><span style=\\\"x-evernote:highlighted;background-color:#F6EE96;\\\"> or, as a special shortcut, </span><code><span style=\\\"x-evernote:highlighted;background-color:#F6EE96;\\\">sudo startxfce4</span></code></li><li><span style=\\\"x-evernote:highlighted;background-color:#F6EE96;\\\">\\\n</span></li><li>Cycle through Chromium OS and your running graphical chroots using\\\n<span style=\\\"x-evernote:highlighted;background-color:#F6EE96;\\\">Ctrl+Alt+Shift+Back and</span><span style=\\\"x-evernote:highlighted;background-color:#F6EE96;\\\"> Ctrl+Alt+Shift+Forward.</span></li><li><span style=\\\"x-evernote:highlighted;background-color:#F6EE96;\\\">\\\n</span></li><li><span style=\\\"x-evernote:highlighted;background-color:#F6EE96;\\\"></span>Exit the chroot by logging out of Xfce.</li></ol>\\\n<h3>With encryption!</h3>\\\n<ol><li>Add the <code>-e</code> parameter when you run crouton to create an encrypted chroot\\\nor encrypt a non-encrypted chroot.</li><li>You can get some extra protection on your chroot by storing the decryption\\\nkey separately from the place the chroot is stored. Use the <code>-k</code> parameter\\\nto specify a file or directory to store the keys in (such as a USB drive or\\\nSD card) when you create the chroot. Beware that if you lose this file,\\\nyour chroot will not be decryptable. That's kind of the point, of course.</li></ol>\\\n<h3>Hey now, Ubuntu 16.04 is pretty old; I'm young and hip</h3>\\\n<ol><li>The <code>-r</code> parameter specifies which distro release you want to use.</li><li>Run <code>sh ~/Downloads/crouton -r list</code> to list the recognized releases and\\\nwhich distros they belong to.</li></ol>\\\n<h3>Wasteful redundancies are wasteful: one clipboard, one browser, one window</h3>\\\n<ol><li>Install the <a href=\\\"https://goo.gl/OVQOEt\\\" target=\\\"_blank\\\">crouton extension</a> into Chromium OS.</li><li>Add the <code>extension</code> or <code>xiwi</code> version to your chroot.</li><li>Try some copy-pasta, or uninstall all your web browsers from the chroot.</li></ol>\\\n<p><em>Installing the extension and its target gives you synchronized clipboards, the\\\noption of using Chromium OS to handle URLs, and allows chroots to create\\\ngraphical sessions as Chromium OS windows.</em></p>\\\n<h3>I don't always use Linux, but when I do, I use CLI</h3>\\\n<ol><li>You can save a chunk of space by ditching X and just installing\\\ncommand-line tools using <code>-t core</code> or <code>-t cli-extra</code></li><li>Enter the chroot in as many crosh shells as you want simultaneously using\\\n<code>sudo enter-chroot</code></li><li>Use the <a href=\\\"https://goo.gl/eczLT\\\" target=\\\"_blank\\\">Crosh Window</a> extension to keep Chromium OS\\\nfrom eating standard keyboard shortcuts.</li><li>If you installed cli-extra, <code>startcli</code> will launch a new VT right into the\\\nchroot.</li></ol>\\\n<h3>A new version of crouton came out; my chroot is therefore obsolete and sad</h3>\\\n<ol><li>Check for updates, download the latest version, and see what's new by\\\nrunning <code>croutonversion -u -d -c</code> from the chroot (run <code>croutonversion -h</code>\\\nto see what those parameters actually do).</li><li>Exit the chroot and run <code>sudo sh ~/Downloads/crouton -u -n chrootname</code>.\\\nIt will update all installed targets.</li></ol>\\\n<h3>I want to open my desktop in a window or a tab but I don't have the 'xiwi' target/xmethod.</h3>\\\n<ol><li>Add 'xiwi' or any other target to an existing chroot with the '-u' option using: <code>sudo sh ~/Downloads/crouton -t xiwi -u -n chrootname</code></li></ol>\\\n<p>This will also make 'xiwi' the default xmethod.</p>\\\n<ol><li>If you want to keep the 'xorg' xmethod as the default then enter it first using: <code>sudo sh ~/Downloads/crouton -t xorg,xiwi -u -n chrootname</code></li></ol>\\\n<h3>A backup a day keeps the price-gouging data restoration services away</h3>\\\n<ol><li><code>sudo edit-chroot -b chrootname</code> backs up your chroot to a timestamped\\\ntarball in the current directory. Chroots are named either via the <code>-n</code>\\\nparameter when created or by the release name if -n was not specified.</li><li><code>sudo edit-chroot -r chrootname</code> restores the chroot from the most recent\\\ntimestamped tarball. You can explicitly specify the tarball with <code>-f</code></li><li>If your machine is new, powerwashed, or held upside-down and shaken, you\\\ncan use the crouton installer to restore a chroot and relevant scripts:\\\n<code>sudo sh ~/Downloads/crouton -f mybackup.tar.gz</code></li></ol>\\\n<p><em>Unlike with Chromium OS, the data in your chroot isn't synced to the cloud.</em></p>\\\n<h3>This chroot's name/location/password/existence sucks. How to fix?</h3>\\\n<ol><li>Check out the <code>edit-chroot</code> command; it likely does what you need it to do.</li><li>If you set a Chromium OS root password, you can change it with\\\n<code>sudo chromeos-setdevpasswd</code></li><li>You can change the password inside your chroot with <code>passwd</code></li></ol>\\\n<h3>I want to install the chroot to another location</h3>\\\n<ol><li>Use <code>-p</code> to specify the directory in which to install the chroot and\\\nscripts. Be sure to quote or escape spaces.</li><li>When entering the chroot, either specify the full path of the enter-chroot\\\nor start* scripts (i.e. <code>sudo sh /path/to/enter-chroot</code>), or use the\\\n<code>-c</code> parameter to explicitly specify the chroots directory.</li></ol>\\\n<h3>Downloading bootstrap files over and over again is a waste of time</h3>\\\n<ol><li>Download <code>crouton</code></li><li>Open a shell (Ctrl+Alt+T, type <code>shell</code> and hit enter) and run\\\n<code>sudo sh ~/Downloads/crouton -d -f ~/Downloads/mybootstrap.tar.bz2</code></li><li>Include the <code>-r</code> parameter if you want to specify for which release to\\\nprepare a bootstrap.</li><li>You can then create chroots using the tarball by running\\\n<code>sudo sh ~/Downloads/crouton -f ~/Downloads/mybootstrap.tar.bz2</code>. Make sure\\\nyou also specify the target environment with <code>-t</code>.</li></ol>\\\n<p><em>This is the quickest way to create multiple chroots at once, since you won't\\\nhave to determine and download the bootstrap files every time.</em></p>\\\n<h3>Targets are cool. Abusing them for fun and profit is even cooler</h3>\\\n<ol><li>You can make your own target files (start by copying one of the existing\\\nones) and then use them with any version of crouton via the <code>-T</code> parameter.</li></ol>\\\n<p><em>This is great for automating common tasks when creating chroots.</em></p>\\\n<h3>Help! I've created a monster that must be slain!</h3>\\\n<ol><li>The delete-chroot command is your sword, shield, and only true friend.\\\n<code>sudo delete-chroot evilchroot</code></li><li>It's actually just a shortcut to <code>sudo edit-chroot -d evilchroot</code>, which I\\\nsuppose makes it a bit of a deceptive Swiss Army knife friend...still good?</li></ol>\\\n<h2>Tips</h2>\\\n<ul><li>Chroots are cheap! Create multiple ones using <code>-n</code>, break them, then make\\\nnew, better ones!</li><li>You can change the distro mirror from the default by using <code>-m</code></li><li>Want to use a proxy? <code>-P</code> lets you specify one (or disable it).</li><li>A script is installed in your chroot called <code>brightness</code>. You can assign\\\nthis to keyboard shortcuts to adjust the brightness of the screen (e.g.\\\n<code>brightness up</code>) or keyboard (e.g. <code>brightness k down</code>).</li><li>Multiple monitors will work fine in the chroot, but you may have to switch\\\nto Chromium OS and back to enable them.</li><li>You can make commands run in the background so that you can close the\\\nterminal. This is particularly useful for desktop environments: try running\\\n<code>sudo startxfce4 -b</code></li><li>Want to disable Chromium OS's power management? Run <code>croutonpowerd -i</code></li><li>Only want power management disabled for the duration of a command?\\\n<code>croutonpowerd -i command and arguments</code> will automatically stop inhibiting\\\npower management when the command exits.</li><li>Have a Pixel or two or 4.352 million? <code>-t touch</code> improves touch support.</li><li>Want to share some files and/or folders between ChromeOS and your chroot?<br/>\\\nCheck out the <code>/etc/crouton/shares</code> file, or read all about it in the wiki.</li><li>Want more tips? Check the <a href=\\\"https://github.com/dnschneid/crouton/wiki\\\" target=\\\"_blank\\\">wiki</a>.</li></ul>\\\n<h2>Issues?</h2>\\\n<p>Running another OS in a chroot is a pretty messy technique (although it's hidden\\\nbehind very pretty scripts), and these scripts are relatively new, so problems\\\nare not surprising. Check the issue tracker and file a bug if your issue isn't\\\nthere. When filing a new bug, include the output of <code>croutonversion</code> run from\\\ninside the chroot or, if you cannot mount your chroot, include the output\\\nof <code>cat /etc/lsb-release</code> from Crosh.</p>\\\n<h2>I want to be a Contributor!</h2>\\\n<p>That's great!  But before your code can be merged, you'll need to have signed\\\nthe <a href=\\\"https://cla.developers.google.com/clas/new?kind=KIND_INDIVIDUAL&amp;domain=DOMAIN_GOOGLE\\\" target=\\\"_blank\\\">Individual Contributor License Agreement</a>.\\\nDon't worry, it only takes a minute and you'll definitely get to keep your\\\nfirstborn, probably.  If you've already signed it for contributing to Chromium\\\nor Chromium OS, you're already done.</p>\\\n<p>If you don't know what to do with your time as an official Contributor, here's\\\nsome suggestions:</p>\\\n<ul><li>Really like a certain desktop environment? Fork crouton, add the target, and\\\ncreate a pull request.</li><li>Feel like hacking around with Chromium OS integration? Fork crouton, improve\\\nintegration, and create a pull request.</li><li>Is your distro underrepresented? Want to contribute to the elusive and\\\nmythical beast known as &quot;croagh&quot;? Fork crouton, add the distro, and create a\\\npull request.</li><li>Discovered a bug lurking within the scripts, or a papercut that bothers you\\\njust enough to make you want to actually do something about it? You guessed\\\nit: fork crouton, fix everything, and create a pull request.</li><li>Are most bugs too high-level for you to defeat? Grind up some EXP by using\\\nyour fork to eat <a href=\\\"https://github.com/dnschneid/crouton/labels/pie\\\" target=\\\"_blank\\\">pie</a>.</li></ul>\\\n<h2>Are there other, non-Contributory ways I can help?</h2>\\\n<p>Yes!</p>\\\n<h2>But how?</h2>\\\n<p>There's a way For Everyone to help!</p>\\\n<ul><li>Something broken? File a bug! Bonus points if you try to fix it. It helps if\\\nyou provide the output of <code>croutonversion</code> (or the output of\\\n<code>cat /etc/lsb-release</code> from Crosh) when you submit the bug.</li><li>Want to try and break something? Look through <a href=\\\"https://github.com/dnschneid/crouton/issues?labels=needstesting&amp;state=open\\\" target=\\\"_blank\\\">requests for testing</a>\\\nand then do your best to brutally rip the author's work to shreds.</li><li>Look through <a href=\\\"https://github.com/dnschneid/crouton/issues?state=open\\\" target=\\\"_blank\\\">open issues</a>\\\nand see if there's a topic or application you happen to have experience\\\nwith. And then, preferably, share that experience with others.</li><li>Find issues that need <a href=\\\"https://github.com/dnschneid/crouton/issues?labels=needswiki&amp;state=open,closed\\\" target=\\\"_blank\\\">wiki entries</a>\\\nand add the relevant info to the <a href=\\\"https://github.com/dnschneid/crouton/wiki\\\" target=\\\"_blank\\\">wiki</a>.\\\nOr just add things to/improve things in the wiki in general, but do try to\\\nkeep it relevant and organized.</li><li>Really like a certain desktop environment, but not up for coding? Open or\\\ncomment on a bug with steps to get things working well.</li><li>Hang out in the #crouton IRC channel on freenode.net!</li></ul>\\\n<h2>License</h2>\\\n<p>crouton (including this eloquently-written README) is copyright © 2016 The\\\ncrouton Authors. All rights reserved. Use of the source code included here is\\\ngoverned by a BSD-style license that can be found in the LICENSE file in the\\\nsource tree.</p>\\\n</div></div></div><br/></div></span>\\\n</div></body></html>\\u0000\"]],\"start1\":0,\"start2\":0,\"length1\":0,\"length2\":18039}]"
metadata_diff: {"new":{"id":"f1f0222592714d24914760fe20f7d521","parent_id":"f67288c3a0be4374b5d532b5dcc3aabc","latitude":"0.00000000","longitude":"0.00000000","altitude":"0.0000","author":"","source_url":"","is_todo":0,"todo_due":0,"todo_completed":0,"source":"joplin-desktop","source_application":"net.cozic.joplin-desktop","application_data":"","order":1764348826581,"markup_language":2,"is_shared":0,"share_id":"","conflict_original_id":"","master_key_id":"","user_data":"","deleted_time":0},"deleted":[]}
encryption_cipher_text: 
encryption_applied: 0
updated_time: 2025-11-28T21:04:02.613Z
created_time: 2025-11-28T21:04:02.613Z
type_: 13