dmazzoni | 2f48975 | 2017-02-16 03:39:16 | [diff] [blame] | 1 | # ChromeVox on Desktop Linux |
| 2 | |
| 3 | ## Starting ChromeVox |
| 4 | |
| 5 | On Chrome OS, you can enable spoken feedback (ChromeVox) by pressing Ctrl+Alt+Z. |
| 6 | |
| 7 | If you have a Chromebook, this gives you speech support built-in. If you're |
| 8 | building Chrome from source and running it on desktop Linux, speech and braille |
| 9 | won't be included by default. Here's how to enable it. |
| 10 | |
| 11 | ## Compiling the Chrome OS version of Chrome |
| 12 | |
| 13 | First follow the public instructions for |
| 14 | [Chrome checkout and build](https://www.chromium.org/developers/how-tos/get-the-code). |
| 15 | |
Zach Helfinstein | 46d2ecae | 2018-07-27 18:28:36 | [diff] [blame] | 16 | Edit `.gclient` (in `chromium/`) and at the bottom add: |
| 17 | |
| 18 | ``` |
| 19 | target_os = ["chromeos"] |
| 20 | ``` |
| 21 | |
| 22 | Run `gclient sync` to update your checkout. |
| 23 | |
| 24 | Then create a GN configuration with "chromeos" as the target OS, for example: |
dmazzoni | 2f48975 | 2017-02-16 03:39:16 | [diff] [blame] | 25 | |
dbeam | 9e590b2 | 2017-03-02 07:11:20 | [diff] [blame] | 26 | ``` |
| 27 | gn args out/cros |
| 28 | ``` |
dmazzoni | 2f48975 | 2017-02-16 03:39:16 | [diff] [blame] | 29 | |
| 30 | ...in editor, add this line: |
| 31 | |
| 32 | ``` |
| 33 | target_os = "chromeos" |
| 34 | is_component_build = true |
| 35 | is_debug = false |
| 36 | ``` |
| 37 | |
| 38 | Note: Only ```target_os = "chromeos"``` is required, the others are recommended |
| 39 | for a good experience but you can configure Chrome however you like otherwise. |
dbeam | 9e590b2 | 2017-03-02 07:11:20 | [diff] [blame] | 40 | Note that Native Client is required, so do not put `enable_nacl = false` in |
dmazzoni | 2f48975 | 2017-02-16 03:39:16 | [diff] [blame] | 41 | your file anywhere! |
| 42 | |
| 43 | Now build Chrome as usual, e.g.: |
| 44 | |
dbeam | 9e590b2 | 2017-03-02 07:11:20 | [diff] [blame] | 45 | ``` |
Max Moroz | f5b31fcd | 2018-08-10 21:55:48 | [diff] [blame] | 46 | autoninja -C out/cros chrome |
dbeam | 9e590b2 | 2017-03-02 07:11:20 | [diff] [blame] | 47 | ``` |
dmazzoni | 2f48975 | 2017-02-16 03:39:16 | [diff] [blame] | 48 | |
| 49 | And run it as usual to see a mostly-complete Chrome OS desktop inside |
| 50 | of a window: |
| 51 | |
dbeam | 9e590b2 | 2017-03-02 07:11:20 | [diff] [blame] | 52 | ``` |
| 53 | out/cros/chrome |
| 54 | ``` |
dmazzoni | 2f48975 | 2017-02-16 03:39:16 | [diff] [blame] | 55 | |
| 56 | By default you'll be logged in as the default user. If you want to |
| 57 | simulate the login manager too, run it like this: |
| 58 | |
dbeam | 9e590b2 | 2017-03-02 07:11:20 | [diff] [blame] | 59 | ``` |
| 60 | out/cros/chrome --login-manager |
| 61 | ``` |
dmazzoni | 2f48975 | 2017-02-16 03:39:16 | [diff] [blame] | 62 | |
dbeam | 9e590b2 | 2017-03-02 07:11:20 | [diff] [blame] | 63 | You can run any of the above under it’s own X session (avoiding any window |
| 64 | manager key combo conflicts) by doing something like |
dmazzoni | 2f48975 | 2017-02-16 03:39:16 | [diff] [blame] | 65 | |
dbeam | 9e590b2 | 2017-03-02 07:11:20 | [diff] [blame] | 66 | ``` |
| 67 | startx out/cros/chrome |
| 68 | ``` |
dmazzoni | 2f48975 | 2017-02-16 03:39:16 | [diff] [blame] | 69 | |
Laura Eberly | 531206c | 2021-04-23 00:01:33 | [diff] [blame] | 70 | ### Remapping keys so ChromeVox recognizes a Search key |
| 71 | ChromeVox expects that the Search key is mapped from your |
| 72 | left Windows key/LWIN/key code 91; however, your window manager/desktop |
| 73 | environment (Linux) treats this as a Super or Meta which usually gets assigned |
| 74 | to numerous shortcut combinations. |
| 75 | |
| 76 | #### Option 1: running under a new X session |
| 77 | To avoid these conflicts, run using startx as described above. |
| 78 | |
| 79 | #### Option 2: remapping keys in your window manager |
| 80 | If you decide not to run under X or wish to run Linux within a window manager |
| 81 | such as through Chrome Remote Desktop or a virtual machine, you need to remap |
| 82 | keys either in Linux or inside Chrome OS. |
| 83 | |
| 84 | To manually disable all conflicting key combinations in Linux, remove all |
| 85 | keyboard bindings that reference "Super" or "Meta" in |
| 86 | System Settings > Keyboard > Shortcuts. |
| 87 | |
| 88 | #### Option #3: remapping the Search key inside Chrome OS |
| 89 | To remap the Search key inside Chrome OS, go to Settings > Device > Keyboard. |
| 90 | The control key is a good choice for setting as Search as there should be no |
| 91 | conflicts with Linux on its own. Caps Lock is not recommended to change as |
| 92 | ChromeVox may handle it as a special case. |
David Tseng | c4b4301 | 2018-04-11 04:10:27 | [diff] [blame] | 93 | |
dmazzoni | 2f48975 | 2017-02-16 03:39:16 | [diff] [blame] | 94 | ## Speech |
| 95 | |
dbeam | 9e590b2 | 2017-03-02 07:11:20 | [diff] [blame] | 96 | If you want speech, you just need to copy the speech synthesis data files to |
| 97 | /usr/share like it would be on a Chrome OS device: |
dmazzoni | 2f48975 | 2017-02-16 03:39:16 | [diff] [blame] | 98 | |
| 99 | ``` |
David Tseng | 8cbfe698 | 2020-11-10 23:38:57 | [diff] [blame] | 100 | gsutil ls gs://chromeos-localmirror/distfiles/espeak* |
dmazzoni | 2f48975 | 2017-02-16 03:39:16 | [diff] [blame] | 101 | ``` |
| 102 | |
David Tseng | 1bb2aa7a | 2020-02-26 19:11:05 | [diff] [blame] | 103 | Pick the latest version and |
dmazzoni | 2f48975 | 2017-02-16 03:39:16 | [diff] [blame] | 104 | |
| 105 | ``` |
Jacobo Aragunde Pérez | 0af076da | 2022-01-13 15:38:55 | [diff] [blame] | 106 | VERSION=1.49.3.14 |
Guido Trotter | d22bb1cd | 2020-11-14 05:24:38 | [diff] [blame] | 107 | TMPDIR=$(mktemp -d) |
Jacobo Aragunde Pérez | 0af076da | 2022-01-13 15:38:55 | [diff] [blame] | 108 | gsutil cp gs://chromeos-localmirror/distfiles/espeak-ng-$VERSION.tar.xz $TMPDIR |
| 109 | tar -C $TMPDIR -xvf $TMPDIR/espeak-ng-$VERSION.tar.xz |
Guido Trotter | d22bb1cd | 2020-11-14 05:24:38 | [diff] [blame] | 110 | sudo mkdir -p /usr/share/chromeos-assets/speech_synthesis/espeak-ng/ |
| 111 | sudo chown -R $(whoami) /usr/share/chromeos-assets/ |
| 112 | cp -r $TMPDIR/espeak-ng/chrome-extension/* /usr/share/chromeos-assets/speech_synthesis/espeak-ng |
| 113 | rm -rf $TMPDIR |
Katie Dektar | 8ea0d42 | 2017-09-18 19:45:17 | [diff] [blame] | 114 | ``` |
| 115 | |
dbeam | 9e590b2 | 2017-03-02 07:11:20 | [diff] [blame] | 116 | **Be sure to check permissions of /usr/share/chromeos-assets, some users report |
| 117 | they need to chmod or chown too, it really depends on your system.** |
dmazzoni | 2f48975 | 2017-02-16 03:39:16 | [diff] [blame] | 118 | |
David Tseng | 8cbfe698 | 2020-11-10 23:38:57 | [diff] [blame] | 119 | **Note that the default Google tts engine is now only available on an actual |
| 120 | Chrome OS device. ** |
| 121 | |
dbeam | 9e590b2 | 2017-03-02 07:11:20 | [diff] [blame] | 122 | After you do that, just run "chrome" as above (e.g. out/cros/chrome) and press |
| 123 | Ctrl+Alt+Z, and you should hear it speak! If not, check the logs. |
dmazzoni | 2f48975 | 2017-02-16 03:39:16 | [diff] [blame] | 124 | |
| 125 | ## Braille |
| 126 | |
dbeam | 9e590b2 | 2017-03-02 07:11:20 | [diff] [blame] | 127 | ChromeVox uses extension APIs to deliver braille to Brltty through libbrlapi |
| 128 | and uses Liblouis to perform translation and backtranslation. |
dmazzoni | 2f48975 | 2017-02-16 03:39:16 | [diff] [blame] | 129 | |
dbeam | 9e590b2 | 2017-03-02 07:11:20 | [diff] [blame] | 130 | Once built, Chrome and ChromeVox will use your machine’s running Brltty |
| 131 | daemon to display braille if ChromeVox is running. Simply ensure you have a |
| 132 | display connected before running Chrome and that Brltty is running. |
dmazzoni | 2f48975 | 2017-02-16 03:39:16 | [diff] [blame] | 133 | |
David Tseng | e34a52f | 2018-10-23 01:09:32 | [diff] [blame] | 134 | Note you may need to customize brltty.conf (typically found in /etc). |
| 135 | In particular, the api-parameters Auth param may exclude the current user. |
| 136 | You can turn this off by doing: |
| 137 | api-parameters Auth=none |
| 138 | |
Laura Eberly | 531206c | 2021-04-23 00:01:33 | [diff] [blame] | 139 | Testing against the latest releases of Brltty (e.g. 6.3 at time of writing) is |
dbeam | 9e590b2 | 2017-03-02 07:11:20 | [diff] [blame] | 140 | encouraged. |
dmazzoni | 2f48975 | 2017-02-16 03:39:16 | [diff] [blame] | 141 | |
| 142 | For more general information, see [ChromeVox](chromevox.md) |
| 143 | |
| 144 | # Using ChromeVox |
| 145 | |
dbeam | 9e590b2 | 2017-03-02 07:11:20 | [diff] [blame] | 146 | ChromeVox keyboard shortcuts use Search. On Linux that's usually your Windows |
| 147 | key. If some shortcuts don't work, you may need to remove Gnome keyboard |
| 148 | shortcut bindings, or use "startx", as suggested above, or remap it. |
dmazzoni | 2f48975 | 2017-02-16 03:39:16 | [diff] [blame] | 149 | |
| 150 | * Search+Space: Click |
| 151 | * Search+Left/Right: navigate linearly |
| 152 | * Search+Period: Open ChromeVox menus |
Laura Eberly | 531206c | 2021-04-23 00:01:33 | [diff] [blame] | 153 | * Search+H: jump to next heading on page |