Doing development on Chromebook usually means developing online. There are a lot of sites around for that. But with the APIs getting more mature, its just a matter of time before someone builds a kick-ass IDE which runs natively on Chromebooks without network connectivity.
One such tool which I’ve been exploring for a last few weeks is from Google and called “Chrome Dev Editor” If you have never built and run a chrome app or extension, I’ll show you how to do this in 3 easy steps.
Notice how it automatically adds the minimum code required for it to run. This will be the template you are going to work with. You are almost done, but lets review the files in there to understand why they are there.
- manifest.json – This is the most important file. Modify the app name, version number, capabilities, permissions, scripts using this file. This is the only filename which cannot be modified. Everything else can be controlled using this file.
- background.js – Noticed that manifest file mentions this script in it. This is the script which will start up first when the app comes up.
- index.html – background.js requests a window to be created using “chrome.app.window.create” and this is the file it points to for the contents of the window.
- main.js – This script is called from index.html. It won’t start up until the window is created
- style.css – index.html declares this as a stylesheet
- assets – The icons for your project are kept in there
Thats it. Click on the play button on the top left corner of your editor to launch the app.
Final steps – “Chrome Dev Editor” can upload and publish the app for you with a single click. Since you are on a chromebook, you should know that you can save your code on Google Drive as well, which will just sync across multiple devices automatically. And if you’d like to revision control your code, know that the editor has built in support for syncing code to git as well.
If you have used Chrome OS in a school or an enterprise network, you would have noticed how helpful the management piece can be. Using this tool you can quickly setup and deploy policies to make things easier for your users.
This is the authoritative source of all policies available on Chrome today. Pay special attention to the “Supported on” section. If it mentions “Google Chrome OS”, then the policy is supported on devices and most of them can be set using Admin console UI.
There are essentially two different types of policies one can set on Chrome OS.
The “user policies” are those policies which can be set for an individual, regardless of which machine they are using Chrome from. A good example of a user policy is the “Screen Lock”. An enterprise admin could enforce users to have an idle screen lock enabled automatically to protect internal company data. Similarly, there may be organizations which may want to disable “Browser History” across all users.
These “User policies” will follow the user on all platforms, which means that in addition to working on Chrome OS these policies will also take effect on Chrome for Windows and Linux if the user signs into them with the organization’s credentials.
The “device policies” are policies applied to the machine irrespective of the user on it. For Chrome OS the policies which can be applied on the device are clearly defined in the policy list.
Examples of these policies are shown on the right. If a device is used in a lab environment which doesn’t need data persistence, its simple to set “User Data” policy to “Erase all local user info, setting… after each sign-out”. Note that these policies take effect only on devices which are enrolled into the domain.
One of the first things an admin should learn is how to debug if the policies are setup correctly. The quickest way to do this is by going to the “chrome://policy” page. If there are any policies on your device, it will show up there.
There are two boxes on the top. The first one is labeled as “Device policies” and the second one is labeled as “User policies”. There are few different things you can quickly find out by looking at it:
- The device is enrolled to “trialdevices.com”
- If the “Device policies” box is missing, it probably means that the device is not enrolled.
- The signed in user is firstname.lastname@example.org
- If the “User policies” box is missing, it probably means that the user is not part of a domain pushing policies.
- Both policies were fetched in last 6 seconds (if this is too old, try to “Reload policies” to see if it can get a fresher version)
- Status for both is “Policy cache OK”
If you notice stale policies, you should start investigating using a tool like this to see if there are firewalls in the way which could be impacting it. If that doesn’t help, ask help from local networking admins who may know more.
One of the salient features of Chrome OS is its ability to do transparent updates with little or no interaction from the user. This not only ensures the user is always protected, it also improves performance and features over time.
If you administer a fleet of chrome devices, I recommend you read this support on how to correctly configure this. It goes through all the autoupdate (AU) terminologies and suggests best practices which will help you in long run.
How to check if AU is properly working in your network
- I’ll strongly recommend to enable reporting using your admin console. This will allow devices to send its OS version to the reporting engine.
- Then use the Admin SDK APIs to generate reports for devices in your domain, grouped by major version. I recommend you write your own scripts, but you can try third party tools like these to understand what the APIs are capable of.
- If you have lots of different networks, try to generate separate reports for devices in different networks to see if any of them are further behind than others.
- If you do notice some devices are not getting updates, look for the following failure patterns
- Check if the devices are being blocked from reaching update engine. White-list these domains if you need to implement ACLs.
- If you have enabled “scattered” updates, disable it for those users. “Scattered” updates is not good for devices which are not used every single day.
- If your devices never get updates, you may have to reach out to Google’s enterprise support team for deeper analysis.
How to check what my devices should be at ?
Understanding AU Logs
- You can extract the AU logs from the device very easily using the following steps
- Go to chrome://net-internals#chromeos
- Click on “store debug logs”. This creates a compressed archive in the “Download folder”
- After exploding the compressed archive, look for files under “/var/log/update_engine” which has all the AU related logs
- Find the latest log file there and open it up in an editor
- The AU request would look something like this
- Interpretation of the request
- Current version of the OS: 4319.96.0_i686
- Hardware is : PARROT (find more info here)
- Lang=”en-US” means its a US version of hardware
- track=”stable-channel” means this is requested a stable update
- Lang=”en-US” means its a US version of hardware
- track=”stable-channel” means its requesting a stable update
[1121/083519:INFO:omaha_request_action.cc(717)] Omaha request response:
– status=”noupdate” means there are no updates available for this particular device