launching chrome in ssh session

1,798 views
Skip to first unread message

Thiago Farina

unread,
Aug 12, 2015, 5:47:31 PM8/12/15
to Chromium-dev
Hi list,

Is it possible to run chrome under a ssh session? Is it CHROME_HEADLESS for this? If so, how?

I tried the following:

$ export CHROME_HEADLESS
$ ./out/Debug/chrome --no-sandbox

Then I got the following:

[6348:6348:0812/184453:ERROR:browser_main_loop.cc(194)] Running without the SUID sandbox! See https://code.google.com/p/chromium/wiki/LinuxSUIDSandboxDevelopment for more information on developing with the sandbox on.
[6348:6351:0812/184453:FATAL:browser_main_loop.cc(242)] <unknown>: Command line `dbus-launch --autolaunch=cea5186ec39ed9406aaf94f800000006 --binary-syntax --close-stderr' exited with non-zero exit status 1: Autolaunch error: X11 initialization failed.\n
#0 0x7f87a429264e base::debug::StackTrace::StackTrace()
#1 0x7f87a42e3412 logging::LogMessage::~LogMessage()
#2 0x7f87a92bb797 content::(anonymous namespace)::GLibLogHandler()
#3 0x7f879d45ff61 g_logv
#4 0x7f879d460172 g_log
#5 0x7f8790b2cd2a <unknown>
#6 0x7f8790b2d087 <unknown>
#7 0x7f879d458d13 g_main_context_dispatch
#8 0x7f879d459060 <unknown>
#9 0x7f879d45945a g_main_loop_run
#10 0x7f8790b2c98b <unknown>
#11 0x7f879d47a9b5 <unknown>
#12 0x7f879ef96e9a start_thread
#13 0x7f879b78638d clone

Aborted (core dumped)

$ [6350:6350:0100/000000:ERROR:zygote_linux.cc(612)] write: Broken pipe
[0812/184454:ERROR:nacl_helper_linux.cc(311)] NaCl helper process running without a sandbox!
Most likely you need to configure your SUID sandbox correctly

--
Thiago Farina

Stefan Zager

unread,
Aug 12, 2015, 7:46:29 PM8/12/15
to tfa...@chromium.org, Chromium-dev
Not sure what you expect to happen.  Do you expect that a chrome window will appear on your local machine, from a chrome process running on the remote machine?  If so, then 'ssh -X' should allow you to do this, but I expect the display performance to be in the range of poor to unusable.


--
--
Chromium Developers mailing list: chromi...@chromium.org
View archives, change email options, or unsubscribe:
http://groups.google.com/a/chromium.org/group/chromium-dev

To unsubscribe from this group and stop receiving emails from it, send an email to chromium-dev...@chromium.org.

Thiago Farina

unread,
Aug 12, 2015, 7:53:50 PM8/12/15
to Stefan Zager, Chromium-dev
On Wed, Aug 12, 2015 at 8:45 PM, Stefan Zager <sza...@google.com> wrote:
Not sure what you expect to happen.  Do you expect that a chrome window will appear on your local machine, from a chrome process running on the remote machine?
Nope. I don't expect/want a window to appear.

Just getting it running so I can start a debug session is enough for my needs.

--
Thiago Farina

Junichi Uekawa (上川純一)

unread,
Aug 12, 2015, 8:04:44 PM8/12/15
to tfa...@chromium.org, Stefan Zager, Chromium-dev
Hi,

I usually use xvfb-run command to run chrome under a xvfb framebuffer for testing.


--
--
Chromium Developers mailing list: chromi...@chromium.org
View archives, change email options, or unsubscribe:
http://groups.google.com/a/chromium.org/group/chromium-dev

To unsubscribe from this group and stop receiving emails from it, send an email to chromium-dev...@chromium.org.



--
Junichi Uekawa
Google

Stefan Zager

unread,
Aug 12, 2015, 8:32:46 PM8/12/15
to Thiago Farina, Chromium-dev
Assuming the remote host has X running, you should be able to do this by setting the DISPLAY env var:

$ DISPLAY=0:0 <command>

Alternately, you can run xvfb, and send the display there:

$ xvfb :1
$ DISPLAY=0:1 <command>

Primiano Tucci

unread,
Aug 13, 2015, 6:17:50 AM8/13/15
to Stefan Zager, Thiago Farina, Chromium-dev
CHROME_HEADLESS does not do what the name suggests (running without UI).
Is a magic var used by a mixture of fetch-time, build-time and run-time code (yay) to tell that chrome is running on a bot.
It does stuff like exclude breakpad, skip user prompts etc.
In essence  CHROME_HEADLESS is meant to be CHROME_UNATTENDED. 
But that (CHROME_UNATTENDED) would have been too clear as a name and there would have been the risk that somebody might have understood it. Hence CHROME_HEADLESS :-)

--

Thiago Farina

unread,
Aug 13, 2015, 11:33:52 PM8/13/15
to Stefan Zager, Chromium-dev
Got it!

Thank you Stefan!

--
Thiago Farina
Reply all
Reply to author
Forward
0 new messages