Using a Chromebook for Web Development - tanielgles.ga

 

chrome os app development tutorial

Chrome OS: A fast and secure development environment. It’s never been easier or more secure to develop for the Web and Android on Chrome OS. Between a fast-growing user base, Progressive Web Apps, millions of Android apps, and now, Linux, the potential for developing on and for Chrome OS is only going to keep growing. Aug 19,  · Chrome OS recently added support for opening these from the Files app, so it's very easy to tanielgles.ga files. After you download one, copy it to the 'Linux files' section of the Chrome OS . Create Your First App. This tutorial walks you through creating your first Chrome App. Chrome Apps are structured similarly to extensions so current developers will recognize the manifest and packaging methods. When you're done, you'll just need to produce a zip file of your code and assets in order to publish your app.


How to Set Up and Use Linux Apps on Chromebooks


Have you seen anybody using a Chromebook yet? These are slim, lightweight laptops that run ChromeOSan operating system made by Google that is designed around the Chrome web browser. They also make great travel laptops if you are going on vacation or to a conference. The problem for me is that when I travel, I spend a fair amount of time coding this is an addiction I do not want to get rid of!

So I decided to buy one and try to configure it in a way that is suitable for web development on the move. In this article I'm going to go over three different approaches to do that. December update: there is now a fourth way that I will cover in a new article. Chromebooks are fairly underpowered devices. If you plan on doing coding, I would recommend you only look at the Intel based ones.

Given that you always have the option to add more storage, the amount of internal storage was not a huge concern for me. The model that I ended up choosing is the Samsung Chromebook 3. There are several variants all with this name, which makes picking the right chrome os app development tutorial tricky.

Right from the start you notice that Chromebooks are nothing like regular laptops. The very first thing you have to do is enter your Wi-Fi connection details, and once you do that you get a login prompt and the machine is ready for you. No need to go through long set ups where you have to answer a lot of questions, set up a user account, etc.

All you need to use a Chromebook is a Google account. Once you log in, a Chrome browser opens and that is it, you can start browsing the web. If you want to check your email, you use Gmail.

Write a report or spreadsheet? Google Docs. Google Slides. Other types of files? Google Drive. You can certainly work while you are offline and use the local storage, but in general you have to be comfortable using cloud storage, because the Chromebook is designed under the premise that you will sync everything to the cloud.

The operating system that powers the Chromebook, ChromeOS, was built as a very secure platform that is more in line with "app store" concept, in which applications can only be obtained from an approved source, in this case the Chrome App Store, chrome os app development tutorial, and for some models that support Android apps, also the Android Play Store. As I'm sure you can guess by now, this isn't a platform that is friendly to coding.

It feels more like having a tablet with a keyboard than a machine you can develop on. If you want to install the kind of software that we developers use, like for example, vim, a Python interpreter, etc. There are actually three different approaches that give you access to a Linux environment in which you can write code, all with pros and cons.

This approach is fairly benign, but is limited to Chromebook models that have support for running Android apps, chrome os app development tutorial are those in this list. Some models support Android apps directly, while others need to be switched to the "beta channel", which installs a newer version of ChromeOS with additional features.

The Samsung Chromebook that I'm using needs to be put on the beta channel to support Android apps. The solution is based on installing a very cool Android app called Termux. Termux implements a user-mode Linux environment that can run on any Android device. The environment runs in a sandbox and does not require a rooted device, so the system security is not compromised in any way.

Termux runs in its own window, and you can still use the Chrome browser or any other apps you have installed, so the integration is really good. Termux has a few shell options such as bash and zsh, and comes with its own package manager based on Ubuntu's apt, which you can use to install your typical applications, including ssh, git, vim, Python, Node. The list of packages that are supported is fairly extensive, you'll probably find that all the tools that you use have already been ported.

This seems like a perfect solution, right? Well, I have tried this approach and unfortunately it sounds better on chrome os app development tutorial than in reality. Because you are in a heavily guarded sandbox, the sharing between the Linux environment and the rest of the system is very limited, and this gets in the way. After I tried this approach and found no comfortable way to set things up, I looked at how other people implemented a solution based on Termux, and all have weird ways in which they attempt to bypass the strict security measures of the host operating system.

Now don't get me wrong, I think you can create a decent environment, but it is not going to be a "familiar" environment, you will have to carefully design your workflow so that it does not collide with the restrictions imposed by ChromeOS. But as a big plus for this approach, this is the only option that I know that can be implemented without root access, which is amazing considering how much you can get done while keeping the system secured.

Note that this statement is now outdated, there is a much better way to run Linux on your Chromebook without having to root your device.

If you are willing to sacrifice some of the tight security measures that ChromeOS implements, then you have more and in my opinion better options. If you are concerned about making your system less secure, consider that we are talking about making your system's security be on par with a regular laptop. If you bought a Chromebook because of its highly regarded security aspects though, I would recommend that you stick to the Termux solution I described in the previous section.

Chromebooks have a developer modeintended for ChromeOS developers to have more freedom to access the system, obviously at the cost of reduced security. Developer mode disables internal verifications to detect infiltrated code every time the system boots. It also gives you shell access to the chronos user, which is the default user in the system, a user that is configured with password-less sudo access by default.

Not checking the OS for infiltrated code is something I can live with. A system with password-less sudo I cannot. Let's first see how to switch the Chromebook into developer mode, then we'll address the sudo problem. Note that switching to developer mode requires a full reset of your system, so any files you have in local storage will be lost.

After the above chrome os app development tutorial, ChromeOS will run as usual, but developer mode will be activated. Note that each time you boot, you will see the "System verification is OFF" screen, and you will have to accept it by pressing Ctrl-D. If you chrome os app development tutorial Space by accident, developer mode will be deactivated and the system restored to factory settings.

Anything in local storage will disappear. You will not notice any difference in how ChromeOS operates in development mode, chrome os app development tutorial. The hidden power is in the shell chrome os app development tutorial, which is available by pressing Ctrl-Alt-T to open a crosh tab Chrome Shelland then typing shell at the crosh command prompt.

As I mentioned earlier, this gives you full sudo access without password. The very first thing you need to do is recover some of the lost security by setting a password:.

At this point you have a system that is about as secure as a laptop or desktop computer, so we can stop worrying about security and see what cool things this developer shell can do.

The next sections describe two different approaches to get a real Linux distribution installed on your Chromebook. With the help of the chrx project, chrome os app development tutorial, you can dual-boot your Chromebook between ChromeOS and a Linux distribution. This option leaves you with a full Linux installation that is running on a x CPU, so you can think of it as being equal to running Linux on a low-end laptop. The installation process is pretty much automated.

You need to open the developer shell as indicated above, and then download and run the chrx installer script:. Chrome os app development tutorial script will ask you a few questions and then run for a while. When running without arguments as above, chrx will install GalliumOSa small and beautiful Linux distribution based on Xubuntu, specially optimized to run on Chromebooks. Valid options are galliumoschrome os app development tutorial, ubuntulubuntuxubuntukubuntuchrome os app development tutorial and fedora.

There isn't really much to say about this option, chrome os app development tutorial, as anything that runs on a regular Linux machine will likely run in the Chromebook as well, including GUI applications, containers, virtualization, access to camera and microphone, and anything else you can think of. The only reason you may not want to go with the solution presented in the previous section is that you have to choose wether you want to boot ChromeOS or Linux, you cannot have both at the same time.

And if you like the sleekness and simplicity of ChromeOS, it may be tough to get used to a less polished and harder to use Linux desktop. If that is your situation, you may like the Termux solution more, because it nicely integrates into ChromeOS by creating a Linux terminal in a window, chrome os app development tutorial. If you like the convenience of the Termux solution, chrome os app development tutorial, but do not like the many limitations of running Linux in that environment, then you should definitely check out crouton.

Crouton is another installer script that runs on the developer shell like chrx, but it does something completely different. A chroot is like a poor man's Docker container, it is a much older technology that allows you to run processes in the context of a different file system root directory, hence the name " ch ange root".

If you install a base Linux system in a subdirectory on your disk, chroot allows you to launch processes that see that subdirectory with all its contents as their whole file system. The great benefit is that chrome os app development tutorial can run one or more chroots in your system and the processes that live in each one are isolated from the others and from the processes in the host system.

The downside is that the chroots do not run their own kernel, the kernel is always the one from the host system, in this case ChromeOS, so if your needs require working with specific kernels, or adding custom kernel modules, then this is not for you. Like chrx, installation is fairly easy.

First you download the crouton script from its GitHub repositoryand then run it from a developer shell. For example, you can install Ubuntu The command line arguments allow you to specify what do you want to put in the chroot, with a few Debian, Kali and Ubuntu releases as choices Ubuntu In addition to picking the OS, you can select what window manager you want to use, and these include the usual suspects: gnome, kde, unity, xfce, etc. Other options allow you to encrypt the chroot for added security or restore a chroot from a previously made backup.

When you have a chroot created, you have a a few options. If all you want is command-line access, then right from a developer shell you can open a shell in the chroot with the sudo enter-chroot command. The most interesting option, however, is the xiwi window manager that I mentioned above, chrome os app development tutorial. This is a custom manager that uses a memory buffer as display. You install the Crouton integration extension in the Chrome browser, chrome os app development tutorial, and then for each window that you start in the chroot, the extension opens a new window or tab within the ChromeOS desktop, and displays the xiwi RAM-based display on it, chrome os app development tutorial.

The refresh rate prevents this solution from being usable to play games or any kind of application that requires low latency display updates, but for code editing it is perfect. Below you can see a screenshot of this IDE open on a Python project.

I have been able to work with git, vscode, vim, zsh, tmux, chrome os app development tutorial, Python, Flask, opencv without a problem. And unlike the weird networking in Termux, the localhost in a chroot maps to the localhost in the host operating system, so for example, you can run a Flask server in a chroot session and open it in Chrome at localhostexactly like I would on my Mac or Windows computers.

As far as downsides, I haven't really found anything that is a deal killer yet. I found that Docker does not install in the chroot, but rkt does, so that's a good compromise solution to run containers you can only use host networking though.

 

Apps for Chrome OS overview | Android Developers

 

chrome os app development tutorial

 

Aug 22,  · How to Enable Linux Apps on Chrome OS. To get started, jump into your device’s Settings menu by clicking the system tray and then the “Settings” button. (Note: I’m on the Chrome OS developer channel with the “New System Menu” flag enabled, so the following screenshot may look different than what you have.). Create Your First App. This tutorial walks you through creating your first Chrome App. Chrome Apps are structured similarly to extensions so current developers will recognize the manifest and packaging methods. When you're done, you'll just need to produce a zip file of your code and assets in order to publish your app. Chrome OS: A fast and secure development environment. It’s never been easier or more secure to develop for the Web and Android on Chrome OS. Between a fast-growing user base, Progressive Web Apps, millions of Android apps, and now, Linux, the potential for developing on and for Chrome OS is only going to keep growing.