Ubuntu
$ lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 14.04.4 LTS
Release: 14.04
Codename: trusty
Chromium
chromium-browser --version
Chromium 48.0.2564.116 Ubuntu 14.04
I am serving a Flask web application on localhost
and I want to browse to it in headless mode.
Following this lead on stackoverflow
Prerequisite
$ apt-get install xvfb imagemagick
X virtual frame buffer xvfb-run
Running Chromium with the following options
--allow-running-insecure-content // trying to get passed
--ignore-certificate-errors // the self-signed certs
--ignore-urlfetcher-cert-requests //
--disable-gpu
--no-sandbox
the command
xvfb-run --server-args='-screen 0, 1024x768x24' chromium-browser --allow-running-insecure-content --ignore-certificate-errors --ignore-urlfetcher-cert-requests --disable-gpu --no-sandbox https://admin:password@localhost
Xlib: extension "RANDR" missing on display ":99".
[2596:2596:0407/170544:ERROR:browser_main_loop.cc(206)] Running without the SUID sandbox! See https://code.google.com/p/chromium/wiki/LinuxSUIDSandboxDevelopment for more information on developing with the sandbox on.
Xlib: extension "RANDR" missing on display ":99".
Xlib: extension "RANDR" missing on display ":99".
[2596:2596:0407/170544:ERROR:desktop_window_tree_host_x11.cc(892)] Not implemented reached in virtual void views::DesktopWindowTreeHostX11::InitModalType(ui::ModalType)
[2596:2596:0407/170545:ERROR:logging.h(808)] Failed to call method: org.freedesktop.DBus.ObjectManager.GetManagedObjects: object_path= /: org.freedesktop.DBus.Error.UnknownMethod: Method "GetManagedObjects" with signature "" on interface "org.freedesktop.DBus.ObjectManager" doesn't exist
[2596:2596:0407/170545:ERROR:logging.h(808)] Failed to call method: org.freedesktop.DBus.ObjectManager.GetManagedObjects: object_path= /: org.freedesktop.DBus.Error.UnknownMethod: Method "GetManagedObjects" with signature "" on interface "org.freedesktop.DBus.ObjectManager" doesn't exist
[2596:2596:0407/170629:ERROR:chrome_browser_main_extra_parts_x11.cc(62)] X IO error received (X server probably went away)
Without --disable-gpu
and --no-sandbox
[3122:3122:0407/172728:ERROR:sandbox_linux.cc(338)] InitializeSandbox() called with multiple threads in process gpu-process
[3062:3099:0407/172728:ERROR:browser_gpu_channel_host_factory.cc(144)] Failed to create channel.
UPDATE 20160407
$ sudo Xvfb :1 -screen 0 1024x768x24 -ac +extension GLX +extension RANDR +render -noreset &
$ export DISPLAY=":1"
$ chromium-browser --allow-running-insecure-content --ignore-certificate-errors --ignore-urlfetcher-cert-requests --disable-gpu --no-sandbox https://admin:password@localhost
getting
[3413:3413:0407/174058:ERROR:browser_main_loop.cc(206)] Running without the SUID sandbox! See https://code.google.com/p/chromium/wiki/LinuxSUIDSandboxDevelopment for more information on developing with the sandbox on.
[3413:3413:0407/174058:ERROR:browser_main_loop.cc(256)] Gtk: cannot open display: :1
[3422:3422:0100/000000:ERROR:zygote_linux.cc(674)] write: Broken pipe
Also tried with google-chrome
wget -q -O - https://dl-ssl.google.com/linux/linux_signing_key.pub | sudo apt-key add -
sudo sh -c 'echo "deb [arch=amd64] http://dl.google.com/linux/chrome/deb/ stable main" >> /etc/apt/sources.list.d/google.list'
sudo apt-get update
sudo apt-get install google-chrome-stable
Version
google-chrome --version
Google Chrome 49.0.2623.110
and I am getting the same errors including extension "RANDR" missing on display ":99".
Related posts
any-way-to-start-google-chrome-in-headless-mode