From 717ee79a4b4382961e0e82e17a98287ea7b7c805 Mon Sep 17 00:00:00 2001 From: Eric Seidel Date: Wed, 19 Nov 2014 09:46:43 -0800 Subject: [PATCH] Make skydb chromoting aware Presumably we should push this logic down into mojo instead of hacking around this at the script level. But at least this makes skydb work better for now. R=ojan@chromium.org Review URL: https://codereview.chromium.org/743603004 --- engine/src/flutter/tools/skydb | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/engine/src/flutter/tools/skydb b/engine/src/flutter/tools/skydb index bf1e2a1bea..e834f68289 100755 --- a/engine/src/flutter/tools/skydb +++ b/engine/src/flutter/tools/skydb @@ -58,12 +58,16 @@ class SkyDebugger(object): self._sky_server = subprocess.Popen(server_command) return 'http://localhost:%s/%s' % (HTTP_PORT, relative_path) + def _in_chromoting(self): + return os.environ.get('CHROME_REMOTE_DESKTOP_SESSION', False) + def main(self): logging.basicConfig(level=logging.INFO) parser = argparse.ArgumentParser(description='Sky launcher/debugger') parser.add_argument('--gdb', action='store_true') - parser.add_argument('--use-osmesa', action='store_true') + parser.add_argument('--use-osmesa', action='store_true', + default=self._in_chromoting()) parser.add_argument('url', nargs='?', type=str) args = parser.parse_args()