How can i turn on Developer Mode on ChromeOS launched on VirtualBox? - google-chrome

I have launched ChromeOS on VirtualBox. Now I want to turn on Developer Mode to disable the verification of rootfs (root file system). How can I turn on this mode without pressing buttons on laptop, because it`s launched virtually?
Maybe there are some solutions using command line (crosh/shell)

If you can run "shell" from crosh, then the system is already in developer mode.
For non-Chrome OS devices, typically developer mode is turned on by adding cros_debug to the kernel command line, and the default Chromium OS builds include that automatically.

Related

Does headless Chrome auto update?

Does Chrome update itself when running in headless mode by selenium?
It seems, it is not updating, probably because of --disable-background-networking switch set by Selenium by default. I want to ensure that's indeed the case. If there any reference in documentation explaining either auto-update behavior or meaning of switches and their impact? So far best I've found is list with all command line Chrome switches with some comments, but it is still not clear.
No, Chrome Browser Client doesn't update itself when running in headless mode by selenium.
As per Getting Started with Headless Chrome the Headless Chrome is the server environment where you don't need a visible UI shell.
If you've got Chrome 59+ installed, you start Chrome with the --headless flag as follows:
chrome \
--headless \ # Runs Chrome in headless mode.
--disable-gpu \ # Temporarily needed if running on Windows.
chrome should always point to your installation of Chrome. Of course, the exact location varies from platform to platform.
So until and unless the original Chrome Browser is automatically/manually updated, Chrome Browser Client doesn't get updated.
TL;DR
--disable-background-networking is configured to disable several subsystems which run network requests in the background. This is used when performing network performance testing in order to avoid noise in the measurements.

Chrome Headless Doesn't work

I've read about the Chrome Headless from developers.google said we can run the Google without UI. Quote from that link :
Headless Chrome is shipping in Chrome 59. It's a way to run the Chrome
browser in a headless environment. Essentially, running Chrome without
chrome! It brings all modern web platform features provided by
Chromium and the Blink rendering engine to the command line.
Why is that useful?
A headless browser is a great tool for automated testing and server
environments where you don't need a visible UI shell. For example, you
may want to run some tests against a real web page, create a PDF of
it, or just inspect how the browser renders an URL.
This is really great feature, so I do some experiment with this cool feature. The idea is to taking snapshot as the document site by do call of chrome.exe from Windows Command Prompt, as follow :
chrome --headless --disable-gpu --screenshot https://www.chromestatus.com/
After do several times and following the instruction from these site. I got nothing. I don't get any picture or screenshot with name screenshot.png as document mention it before Running with --screenshot will produce a file named screenshot.png in the current working directory.
From this document also said about version,
Caution: Headless mode is available on Mac and Linux in Chrome 59.
Windows support is coming in Chrome 60. To check what version of
Chrome you have, open chrome://version.
after do some check with suggested before, I run chrome://version on my Chrome on Windows x64 Machine and got some result :
Google Chrome 62.0.3202.94 (Official Build) (64-bit) (cohort: Stable)
Revision 4fd852a98d66564c88736c017b0a0b0478e885ad-refs/branch-heads/3202#{#789}
What wrong? What i missed?
Thanks
After do some experiments. for --screenshot will save the image on the same level as chrome.exe location and that will be mean save on Program Files.
So we need need to combine parameter names and arguments with a =
--screenshot="D:\screen.png" will work, otherwise Chrome writes to it's installation folder. Big design flaw, no software should use it's installation folder as a working directory.
Here are the complete argument :
chrome --headless --enable-logging --disable-gpu --screenshot="D:\screen.png" "https://www.chromestatus.com/"

creating selenium tests on chromeOS

I currently have a java project which instantiates various browsers via selenium hub/node on various windows operating systems. Is there much involved to expand this to cater for running up a browser on a stock chromebook chromeOS?
The following are steps I tried back in November 2014. The result was unsuccessful and I opened a question on the Google forum with no response.
followed manufacturer's instructions to put the Chromebook in Developer Mode
set chromeos-firrmwareupdate to dev mode and removed rootfs verification from partitions 2 and 4
downloaded and installed Java (latest jre), required for Jenkins slave and Selenium
downloaded Jenkins slave.jar and selenium-server-standalone.jar (2.41.0)
put Jenkins and Selenium in /home and remounted to remove noexec
remounted tmp to resize to 2G (req for Jenkins)
added DISPLAY=:0.0 to ui.conf to set display
added chain rule to allow tcp input
added 'no-sandbox' and 'disable-setuid-sandbox' switches and excluded 'test-type' switch
Result: ChromeDriver started up, opened up a gray screen (a broken instance of Chrome), and closed with an "unable to open pages" error. Weird thing, though, was that the same command used to launch Chrome worked when run from the terminal.

run chrome 30 without sandbox

I'm trying to run chrome 30, in Linux, from the command line (executing google-chrome file of the version downloaded and unpacked in a folder).
If i run it without the option --no-sandbox the result is the following
[24419:24419:1016/012228:FATAL:zygote_host_impl_linux.cc(142)] The SUID sandbox helper binary was found, but is not configured correctly. Rather than run without sandboxing I'm aborting now. You need to make sure that /home/user/user.browsers/chrome-30/opt/google/chrome/chrome-sandbox is owned by root and has mode 4755.
./chrome-30.sh: line 5: 24419 Aborted (core dumped) $CHROME_FOLDER/google-chrome
If I run it with the option --no-sandbox, following also this procedure to configure it, the result is the error:
È stata creata una nuova finestra nella sessione corrente del browser.
[1016/012454:ERROR:nacl_helper_linux.cc(269)] NaCl helper process running without a sandbox!
Most likely you need to configure your SUID sandbox correctly
This last procedure works fine with chrome v31.
Any help?
If you have root access, you should set up the SUID sandbox as per these instructions, and run without the --no-sandbox option.
If you don't have root access, you cannot set up a SUID sandbox and you have to use the --no-sandbox option, but only use it for testing because it is a security risk.
In your case, it looks like you tried running a new Chrome window with --no-sandbox while another session was already running (that's what the message in Italian says). Try closing the existing session before starting a new one. To close the existing session, find the Chrome icon in the system tray, right click it and choose Exit. If you don't see the system tray icon, you can also try killall google-chrome or killall chromium, depending on which version you're using.
This error message...
[24419:24419:1016/012228:FATAL:zygote_host_impl_linux.cc(142)] The SUID sandbox helper binary was found, but is not configured correctly.
Rather than run without sandboxing I'm aborting now.
You need to make sure that /home/user/user.browsers/chrome-30/opt/google/chrome/chrome-sandbox is owned by root and has mode 4755.
./chrome-30.sh: line 5: 24419 Aborted (core dumped) $CHROME_FOLDER/google-chrome
...implies that the program was unable to initiate/spawn a new Browsing Context i.e. Chrome Browser session.
As per the discussion in Issue 400842: Chromium, if you have installed Chromium v35 (or later) and your cpu doesn't have the SSE2 instruction set, e.g. AthlonXP, Pentium III, etc, then Chromium can't be initiated successfully. All the new Chromium browsers from version 35 onwards need SSE2. Any Chromium version earlier than 35 should run on such a system without any issue.
To enforce these measures, Chromium team have closed the issue as Status: WontFix and mentioned:
If you really want to build Chromium without SSE2, you are welcome to apply your own patches and build your own browser however you like, but the Chromium project is not accepting patches to build without SSE2.
Further, this feature was successfully tested in AMD Athlon 3400+ desktop with Lubuntu 14.04.2 and Chrome seems to work fine. But on an older AMD Athlon 1300 without SSE, Chrome now courteously displays a message that "my hardware does not support it".
In mac you can run the below command to run the chrome in sandbox mode. This will open the chrome and supress the security settings. This can be used for testing API's etc from angular or ionic
/Applications/Google\ Chrome.app/Contents/MacOS/Google\ Chrome --disable-web-security --user-data-dir=$HOME/chrome-in-sandbox-mode

Chromium Browser (Linux Chrome) unable to display WebGL

I am running Chrome (chromium-browser on Linux Mint).
Version 22.0.1229.94 Built on Ubuntu 12.10, running on LinuxMint 14 (161065)
I can't seem to get webGL enabled on it, it has worked previously.
chrome://gpu shows "WebGL has been disabled, either via about:flags or command line."
So I have checked chrome://version/gpu
Which shows: Command Line /usr/lib/chromium-browser/chromium-browser --disable-new-tab-first-run --enable-user-scripts --flag-switches-begin --enable-accelerated-filters --disable-accelerated-2d-canvas --disable-gpu-vsync --disable-threaded-animation --disable-webgl --js-flags=--harmony --enable-nacl --enable-experimental-extension-apis --force-compositing-mode --ignore-gpu-blacklist --flag-switches-end
Which implies its getting disabled in the commandline. chrome://flags doesn't have webgl disabled.
/etc/chromium-browser/default only has CHROMIUM_FLAGS="--disable-new-tab-first-run --enable-user-scripts"
I have also tried running chrome direct via /usr/bin/chromium-browser
I can't see how this is getting disabled in the commandline. Is there something else I should change to enable it ?
Only way I've managed to fix it, was to do a rm -Rf /home/(username)/.config/chromium. Removing the Default directory inside it wasn't enough. WebGL is now enabled as default, without any further changes.