| OLD | NEW |
| 1 # Running Blimp | 1 # Running Blimp |
| 2 | 2 |
| 3 See [build](build.md) for instructions on how to build Blimp. | 3 See [build](build.md) for instructions on how to build Blimp. |
| 4 | 4 |
| 5 ## Running the client | 5 ## Running the client |
| 6 | 6 |
| 7 There are both Android and Linux clients. The Android client is the shipping | 7 There are both Android and Linux clients. The Android client is the shipping |
| 8 client while the Linux client is used for development purposes. | 8 client while the Linux client is used for development purposes. |
| 9 | 9 |
| 10 ### Instructing client to connect to specific host | 10 ### Instructing client to connect to specific host |
| 11 | 11 |
| 12 To have the client connect to a custom engine use the `--engine-ip`, | 12 To have the client connect to a custom engine use the `--engine-ip`, |
| 13 `--engine-port`, and `--engine-transport` flags. The possible valid | 13 `--engine-port`, and `--engine-transport` flags. The possible valid |
| 14 values for `--engine-transport` are 'tcp' and 'ssl'. | 14 values for `--engine-transport` are 'tcp' and 'ssl'. |
| 15 An example valid endpoint would be | 15 An example valid endpoint would be |
| 16 `--engine-ip=127.0.0.1 --engine-port=1234 --engine-transport=tcp`. | 16 `--engine-ip=127.0.0.1 --engine-port=1234 --engine-transport=tcp`. |
| 17 | 17 |
| 18 SSL-encrypted connections take an additional flag | 18 SSL-encrypted connections take an additional flag |
| 19 `--engine-cert-path` which specifies a path to a PEM-encoded certificate | 19 `--engine-cert-path` which specifies a path to a PEM-encoded certificate |
| 20 file (e.g. `--engine-cert-path=/path/to/file.pem`.) | 20 file (e.g. `--engine-cert-path=/path/to/file.pem`.) |
| 21 | 21 |
| 22 ### Requesting the complete page from the engine | 22 ### Requesting the complete page from the engine |
| 23 The engine sends partially rendered content to the client. To request the comple
te | 23 The engine sends partially rendered content to the client. To request the comple
te |
| 24 page from the engine, use the `--download-whole-document` flag on the client. | 24 page from the engine, use the `--download-whole-document` flag on the client. |
| 25 | 25 |
| 26 ### Specifying the client auth token file |
| 27 The client needs access to a file containing a client auth token. One should |
| 28 make sure this file is available by pushing it onto the device before running |
| 29 the client. One can do this by running the following command: |
| 30 |
| 31 ```bash |
| 32 adb push /path/to/blimp_client_token \ |
| 33 /data/data/org.chromium.blimp/blimp_client_token |
| 34 ``` |
| 35 |
| 36 To have the client use the given client auth token file, use the |
| 37 `--blimp-client-token-path` flag (e.g. |
| 38 `--blimp-client-token-path=/data/data/org.chromium.blimp/blimp_client_token`) |
| 39 |
| 40 |
| 26 ### Android Client | 41 ### Android Client |
| 27 | 42 |
| 28 Install the Blimp APK with the following: | 43 Install the Blimp APK with the following: |
| 29 | 44 |
| 30 ```bash | 45 ```bash |
| 31 ./build/android/adb_install_apk.py $(PRODUCT_DIR)/apks/Blimp.apk | 46 ./build/android/adb_install_apk.py $(PRODUCT_DIR)/apks/Blimp.apk |
| 32 ``` | 47 ``` |
| 33 | 48 |
| 34 Set up any command line flags with: | 49 Set up any command line flags with: |
| 35 | 50 |
| (...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 92 * `--blimp-client-token-path=$PATH`: Path to a file containing a nonempty | 107 * `--blimp-client-token-path=$PATH`: Path to a file containing a nonempty |
| 93 token string. If this is not present, the engine will fail to boot. | 108 token string. If this is not present, the engine will fail to boot. |
| 94 * `--use-remote-compositing`: Ensures that the renderer uses the remote | 109 * `--use-remote-compositing`: Ensures that the renderer uses the remote |
| 95 compositor. | 110 compositor. |
| 96 * `--disable-cached-picture-raster`: Ensures that rasterized content is not | 111 * `--disable-cached-picture-raster`: Ensures that rasterized content is not |
| 97 destroyed before serialization. | 112 destroyed before serialization. |
| 98 * `--android-fonts-path=$PATH`: Path to where the fonts are located. | 113 * `--android-fonts-path=$PATH`: Path to where the fonts are located. |
| 99 Typically this would be `out-linux/Debug/gen/third_party/blimp_fonts`. | 114 Typically this would be `out-linux/Debug/gen/third_party/blimp_fonts`. |
| 100 * `--disable-remote-fonts`: Disables downloading of custom web fonts in the | 115 * `--disable-remote-fonts`: Disables downloading of custom web fonts in the |
| 101 renderer. | 116 renderer. |
| 102 | |
| 103 #### Typical invocation | |
| 104 When the client connects to a manually specified engine instead of using the | |
| 105 assigner, it will use a dummy token. The engine needs to know what this token | |
| 106 is, so it must be provided using the `--blimp-client-token-path` flag. The token | |
| 107 is available in the constant `kDummyClientToken` in | |
| 108 `blimp/client/session/assignment_source.h`. You can easily store that to a file | |
| 109 by running the following command once: | |
| 110 | |
| 111 ```bash | |
| 112 awk '{if ( match($0, /^\s*const char kDummyClientToken.*/) ) { print substr($5,
2, length($5)-3);} }' \ | |
| 113 ./blimp/client/session/assignment_source.h > /tmp/blimpengine-token | |
| 114 ``` | |
| 115 | |
| 116 Then start the engine using these flags: | |
| 117 | |
| 118 ```bash | |
| 119 out-linux/Debug/blimp_engine_app \ | |
| 120 --android-fonts-path=out-linux/Debug/gen/third_party/blimp_fonts \ | |
| 121 --blimp-client-token-path=/tmp/blimpengine-token \ | |
| 122 --enable-logging=stderr \ | |
| 123 --vmodule="blimp*=1" | |
| 124 ``` | |
| OLD | NEW |