linux   524635

« earlier    

A single tool, 1 application, small and fast to manage notes, todo's, documents, email, contacts, images, music and videos or movies..... fully integrated.
qt  macos  windows  linux  pim 
7 hours ago by semanticdreamer
partitioning - Clone single partition to empty disk - Ask Ubuntu
rsync -aruv /* /new/ --exclude=/dev/* --exclude=/proc/* --exclude=/run/* --exclude=/sys/* --exclude=/tmp/* --exclude=/new
rsync  linux  clone  hdd  howto  terminal 
8 hours ago by travellersam
GitHub - dnschneid/crouton: Chromium OS Universal Chroot Environment
crouton: Chromium OS Universal Chroot Environment

crouton is a set of scripts that bundle up into an easy-to-use, Chromium OS-centric chroot generator. Currently Ubuntu and Debian are supported (using debootstrap behind the scenes), but "Chromium OS Debian, Ubuntu, and Probably Other Distros Eventually Chroot Environment" doesn't acronymize as well (crodupodece is admittedly pretty fun to say, though).

"crouton" acronym?

It stands for ChRomium Os Universal chrooT envirONment ...or something like that. Do capitals really matter if caps-lock has been (mostly) banished, and the keycaps are all lower-case?

Moving on...

Who's this for?

Anyone who wants to run straight Linux on their Chromium OS device, and doesn't care about physical security. You're also better off having some knowledge of Linux tools and the command line in case things go funny, but it's not strictly necessary.

What's a chroot?

Like virtualization, chroots provide the guest OS with their own, segregated file system to run in, allowing applications to run in a different binary environment from the host OS. Unlike virtualization, you are not booting a second OS; instead, the guest OS is running using the Chromium OS system. The benefit to this is that there is zero speed penalty since everything is run natively, and you aren't wasting RAM to boot two OSes at the same time. The downside is that you must be running the correct chroot for your hardware, the software must be compatible with Chromium OS's kernel, and machine resources are inextricably tied between the host Chromium OS and the guest OS. What this means is that while the chroot cannot directly access files outside of its view, it can access all of your hardware devices, including the entire contents of memory. A root exploit in your guest OS will essentially have unfettered access to the rest of Chromium OS.

...but hey, you can run TuxRacer!


You need a device running Chromium OS that has been switched to developer mode.

For instructions on how to do that, go to this Chromium OS wiki page, click on your device model and follow the steps in the Entering Developer Mode section.

Note that developer mode, in its default configuration, is completely insecure, so don't expect a password in your chroot to keep anyone from your data. crouton does support encrypting chroots, but the encryption is only as strong as the quality of your passphrase. Consider this your warning.

It's also highly recommended that you install the crouton extension, which, when combined with the extension or xiwi targets, provides much improved integration with Chromium OS.

That's it! Surprised?


crouton is a powerful tool, and there are a lot of features, but basic usage is as simple as possible by design.

If you're just here to use crouton, you can grab the latest release from Download it, pop open a shell (Ctrl+Alt+T, type shell and hit enter), and run sh ~/Downloads/crouton to see the help text. See the "examples" section for some usage examples.

If you're modifying crouton, you'll probably want to clone or download the repo and then either run installer/ directly, or use make to build your very own crouton. You can also download the latest release, cd into the Downloads folder, and run sh crouton -x to extract out the juicy scripts contained within, but you'll be missing build-time stuff like the Makefile.

crouton uses the concept of "targets" to decide what to install. While you will have apt-get in your chroot, some targets may need minor hacks to avoid issues when running in the chrooted environment. As such, if you expect to want something that is fulfilled by a target, install that target when you make the chroot and you'll have an easier time. Don't worry if you forget to include a target; you can always update the chroot later and add it. You can see the list of available targets by running sh ~/Downloads/crouton -t help.

Once you've set up your chroot, you can easily enter it using the newly-installed enter-chroot command, or one of the target-specific start* commands. Ta-da! That was easy.


The easy way (assuming you want an Ubuntu LTS with Xfce)

Download crouton
Open a shell (Ctrl+Alt+T, type shell and hit enter) and run sudo sh ~/Downloads/crouton -t xfce
Wait patiently and answer the prompts like a good person.
Done! You can jump straight to your Xfce session by running sudo enter-chroot startxfce4 or, as a special shortcut, sudo startxfce4
Cycle through Chromium OS and your running graphical chroots using Ctrl+Alt+Shift+Back and Ctrl+Alt+Shift+Forward.
Exit the chroot by logging out of Xfce.
With encryption!

Add the -e parameter when you run crouton to create an encrypted chroot or encrypt a non-encrypted chroot.
You can get some extra protection on your chroot by storing the decryption key separately from the place the chroot is stored. Use the -k parameter to specify a file or directory to store the keys in (such as a USB drive or SD card) when you create the chroot. Beware that if you lose this file, your chroot will not be decryptable. That's kind of the point, of course.
Hey now, Ubuntu 16.04 is pretty old; I'm young and hip

The -r parameter specifies which distro release you want to use.
Run sh ~/Downloads/crouton -r list to list the recognized releases and which distros they belong to.
Wasteful redundancies are wasteful: one clipboard, one browser, one window

Install the crouton extension into Chromium OS.
Add the extension or xiwi version to your chroot.
Try some copy-pasta, or uninstall all your web browsers from the chroot.
Installing the extension and its target gives you synchronized clipboards, the option of using Chromium OS to handle URLs, and allows chroots to create graphical sessions as Chromium OS windows.

I don't always use Linux, but when I do, I use CLI

You can save a chunk of space by ditching X and just installing command-line tools using -t core or -t cli-extra
Enter the chroot in as many crosh shells as you want simultaneously using sudo enter-chroot
Use the Crosh Window extension to keep Chromium OS from eating standard keyboard shortcuts.
If you installed cli-extra, startcli will launch a new VT right into the chroot.
A new version of crouton came out; my chroot is therefore obsolete and sad

Check for updates, download the latest version, and see what's new by running croutonversion -u -d -c from the chroot (run croutonversion -h to see what those parameters actually do).
Exit the chroot and run sudo sh ~/Downloads/crouton -u -n chrootname. It will update all installed targets.
I want to open my desktop in a window or a tab but I don't have the 'xiwi' target/xmethod.

Add 'xiwi' or any other target to an existing chroot with the '-u' option using: sudo sh ~/Downloads/crouton -t xiwi -u -n chrootname
This will also make 'xiwi' the default xmethod.

If you want to keep the 'xorg' xmethod as the default then enter it first using: sudo sh ~/Downloads/crouton -t xorg,xiwi -u -n chrootname
A backup a day keeps the price-gouging data restoration services away

sudo edit-chroot -b chrootname backs up your chroot to a timestamped tarball in the current directory. Chroots are named either via the -n parameter when created or by the release name if -n was not specified.
sudo edit-chroot -r chrootname restores the chroot from the most recent timestamped tarball. You can explicitly specify the tarball with -f
If your machine is new, powerwashed, or held upside-down and shaken, you can use the crouton installer to restore a chroot and relevant scripts: sudo sh ~/Downloads/crouton -f mybackup.tar.gz
Unlike with Chromium OS, the data in your chroot isn't synced to the cloud.

This chroot's name/location/password/existence sucks. How to fix?

Check out the edit-chroot command; it likely does what you need it to do.
If you set a Chromium OS root password, you can change it with sudo chromeos-setdevpasswd
You can change the password inside your chroot with passwd
I want to install the chroot to another location

Use -p to specify the directory in which to install the chroot and scripts. Be sure to quote or escape spaces.
When entering the chroot, either specify the full path of the enter-chroot or start* scripts (i.e. sudo sh /path/to/enter-chroot), or use the -c parameter to explicitly specify the chroots directory.
Downloading bootstrap files over and over again is a waste of time

Download crouton
Open a shell (Ctrl+Alt+T, type shell and hit enter) and run sudo sh ~/Downloads/crouton -d -f ~/Downloads/mybootstrap.tar.bz2
Include the -r parameter if you want to specify for which release to prepare a bootstrap.
You can then create chroots using the tarball by running sudo sh ~/Downloads/crouton -f ~/Downloads/mybootstrap.tar.bz2. Make sure you also specify the target environment with -t.
This is the quickest way to create multiple chroots at once, since you won't have to determine and download the bootstrap files every time.

Targets are cool. Abusing them for fun and profit is even cooler

You can make your own target files (start by copying one of the existing ones) and then use them with any version of crouton via the -T parameter.
This is great for automating common tasks when creating chroots.

Help! I've created a monster that must be slain!

The delete-chroot command is your sword, shield, and only true friend. sudo delete-chroot evilchroot
It's actually just a shortcut to sudo edit-chroot -d evilchroot, which I suppose makes it a bit of a deceptive Swiss Army knife friend...still good?

Chroots are cheap! Create multiple ones using -n, break them, then make new, better ones!
You can change the distro mirror from the default by using -m
Want to use a proxy? -P lets you specify one (or disable it).
A script is installed in your chroot called brightness. You can assign this to keyboard shortcuts to adjust the brightness of the screen (e.g. brightness up) or keyboard (e.g. … [more]
chromebooks  linux  projects 
13 hours ago by HM0880
Ultimate guide for Web Development on Chromebook — Part 1: Crouton
So why would anyone want to use Chromebook for web development? There’s a couple of reasons:
It sort of makes sense to use a Web oriented Operation System as a Web developer. You get to experience the web apps more. You can get inspired by them, learn from their mistakes, get familiar with their UI and UX. You are on the web probably more than on any other OS.
Chances are, you are experiencing more cutting-edge web features. ChromeOS apps are being built for Chrome. There’s flexbox, FileSystem API, WebGL and more.
And finally, you are forced to use the CLI quite a lot. If you intentionally avoid installing desktop environment like I did, you will have to get around by using CLI. That can be quite frustrating in the beginning but feels more and more awesome over time.
Lastly, Chromebooks are cheap. For a couple hundred bucks, you get a device with great battery life and great booting time. That can be good for student like me, who works only part-time and not always for revenue.
There are cons of course. Quite a lot of them. Even though with crouton you have Ubuntu working, the structure is different. Oftentimes there’s errors you have to deal with. Clipboard might sometimes act funny when copying data across windows. And ChromeOS generally does not try to protect your data that aren’t synced to the cloud. If you encounter a system failure and ChromeOS decides to do a powerwash, your data will be wiped. Backups and version control is crucial.
Install crouton
Unless you plan to use a cloud based solution such as as your development environment, ChromeOS apps will probably be not enough to develop the web efficiently. Fortunately Crouton is a great tool that let’s you install Ubuntu right into the ChromeOS. Through crouton you can utilize most of the features of Linux: launch servers, set up build tools, install your favorite text editor, image editor and so on. I highly recommend visiting the crouton github page before proceeding here.
This guide will generally focus on using crouton without a desktop environment and with xiwi instead to launch applications right in the Google Chrome windows or tabs. But even if you choose to install a desktop environment, I believe a lot of tips and tricks below will still be useful to you.
To install the Crouton, you need to enter the developer mode on your Chromebook.
If you have successfully launched the terminal with CTRL+ALT+T, we can get started:
Install the crouton integration extension into your Google Chrome
Download crouton and install it with these extensions:
sudo sh ~/Downloads/crouton -t core,xiwi,keyboard,x11,cli-extra,extension
This is will install crouton with these targets:
Xiwi: for embedding linux applications inside Chrome tabs and windows
Keyboard: To be able to use keyboard shortcuts properly in linux applications
X11: X Window System. Essential to run most programs.
cli-extra: installs a couple new features to the Command line interface.
extension: supports to the Crouton browser extension. The extension implements clipboard syncing through WebSockets so you can copy paste from browser to xiwi tabs and windows without issues.
Now you can enter the chroot with:
sudo enter-chroot
Great we are in Ubuntu now.
sudo apt-get install git
Using version control is quite essential as was explained before.
NPM + NodeJS
sudo apt-get install curl
curl — silent — location | sudo bash -
sudo apt-get install nodejs -y
This will install Node 0.12. (By the time of writing this article, there hasn’t been a good source for Node 4.0 for Ubuntu 12).
To be able to install packages into global directory, we need to move it under home:
npm config set prefix '~/.npm-packages'
echo 'export PATH="$PATH:$HOME/.npm-packages/bin"' >> ~/.bashrc
//this should work now:
npm install -g bower grunt gulp ember-cli
Sublime Text 3
sudo apt-get install software-properties-common python-software-properties -y
sudo add-apt-repository ppa:webupd8team/sublime-text-3
sudo apt-get update
sudo apt-get install sublime-text-installer
At this I reccomend installing Nautilus (a file browser) to get full support of gtk windowing system. Sublime fails to launch without it and on top of it, you get a GUI for file browsing. That maye be handy sometimes.
sudo apt-get install nautilus
Now you can launch Sublime with:
xiwi -t subl
Apache + PHP + MySQL
sudo apt-get install apache2 -y
sudo apt-get install mysql-server libapache2-mod-auth-mysql php5-mysql
sudo mysql_install_db
sudo add-apt-repository ppa:ondrej/php5
sudo apt-get -y update
sudo apt-get -y install php5 php5-mhash php5-mcrypt php5-curl php5-cli php5-mysql php5-gd php5-intl php5-xsl
This should give you PHP of version 5.6. Setting virtual hosts may be very tricky, because there is no easy access to ChromeOS hosts file. What I have used to develop php sites is the build-in php webserver:
cd ../your-www-directory/
php -S localhost:8000
Now you can visit the website at http://localhost:8000. Getting MySQL might be a bit tricky. This command should work to start a mysql server:
sudo /usr/sbin/mysqld
If you want MySQL server start automatically, check this wiki entry.
Be prepared and don’t loose any data!
Using Chromebook is all about having your data synced with the server. And ChromeOS kind of counts on that. If you are unlucky and you encounter a fatal system failure, ChromeOS will try to powerwash itself in the next boot. Even though that it’s quite harmless to usual Chromebook users which mostly loose just the content of their ~/Downloads directory, this can be very painful to developers using crouton.
It is therefore a good practiceto use version control for your projects and push changes very often. And whenever you install new software on your chroot, backup the chroot.
sudo edit-chroot -b chrootname
Then just move the tar.gz file into the google drive or a physical storage of your choice.
I also highly recommend using git and push your projects online to Github or BitBucket at the end of every development session!
Improve the CLI experience
Since the CLI is an essential part of web development and especially on ChromeOS, it is a good idea to work on an efficient workflow there.

Terminator is especially useful because you can create new terminal tabs within it. That way you don’t have to press CTRL+ALT+T every time you need to launch a new program. It also support color highlights and various plugins which extend its functionality.
sudo apt-get install terminator
sudo xiwi -t terminator
Aliases can save you a lot of time and energy, here is a few I use very frequently:

Aliases have to be stored in ~/.bashrc to persist indefinitely.
There is also one handy alias that can allow you to get into chroot a bit faster. It has to be stored in .bashrc outside chroot:
echo 'alias ec="sudo enter-chroot"' >> ~/Downloads/.bashrc
And then leave chroot, and move it to the chronos home .bashrc:
cat ~/Downloads/.bashrc >> ~/.bashrc
Now you can enter chroot with just
Additional useful software
sudo apt-get install unzip
sudo apt-get install ruby
sudo apt-get install gimp
sudo apt-get install inkscape
sudo apt-get install imagemagick
sudo apt-get install filezilla
sudo apt-get install build-essential
What’s next?
Ultimate guide for Web Development on Chromebook — Part 2: ChromeOS tricks and workflows

In the previous article I recommended using Crouton with no desktop environment and with xiwi instead. The best thing…
chromebooks  linux 
14 hours ago by HM0880

« earlier    

related tags

13  2017  agrachina  amazon  an  and  andriod  android  apache  appvn  apt  arachnoid  arm  article  assembly  audio-visual  automation  av  aws  backup  bash  best  bestpractices  books  bro  c++  c  camera  cctv  centos  cgroup  cgroups  change  cheatsheet  chromebooks  cli  clone  command  commandline  commands  complete  configure  confluence  container  containers  courses  crack  dbus  debian  debugging  demand  democracy  deploy  desktop  devops  dex  digitalocean  distros  dock  docker  documentation  download  drive  dropbox  ec2  editor  embedded  errormessage  example  expert  exploit  filemanagement  files  filesystem  finanzen  find  findutils  firewall  for  foundation  free  galago  gdb  geld  github  gnuroot  golang  google  great  guide  hardware  hdd  how  howto  http  install  installer  installing  instance  interview  io  ionate  ios  iot  java  javascript  jcore  kernel  keystore  keytool  krack  laptop  ldap  lemp  lenovo  lifesnippets  lifestyle  lkm  low_level  m2m  mac  machine-learning  macos  makeuseof  malware  max  maximum  maybesolution  media  memory  microsoft  mobile  multimedia  mysql  nas  needshelp  netstat  network  networking  nfs  nginx  nice  niche  on  open-source  openhardware  openmediavault  password  pc  pdf  permissions  philosophy  phone  php-fpm  php  php7  pid  pim  politics  processes  productivity  programming  projects  proxy  python  qt  raspberry-pi  raspberrypi  react  reddit  reference  restic  reverse-ssh  reverse  reversessh  review  root  rooted  routers  rsync  s3  samba  samsung  scp  script  server  shell  shellscripting  simplicity  six@six  smartphone  software  solution  ssh  ssl  startupinthecloud  station  suspend  sync  synology  sysadmin  t460  tarfiles  techworm  terminal  terminals  thinkpad  tips  tmox  tmux  to  tolearn  tool  tools  toread  torrents  totry  tounderstand  transferring  transparency  tunnel  tutorial  ubuntu  ubuntu16.04  ulimit  ultrabook  undelete  unix  unrooted  upgrade  use  user  vdi  vim  vs  vst  wayland  webmaster  weird  wifi  windows  windows10  wonderful  wonderhowto  wow  wsl 

Copy this bookmark: