blob: 63314494df97449f011a322e304f5401f5f3a7bd [file] [log] [blame] [view]
dmazzoni2f489752017-02-16 03:39:161# ChromeVox on Desktop Linux
2
3## Starting ChromeVox
4
5On Chrome OS, you can enable spoken feedback (ChromeVox) by pressing Ctrl+Alt+Z.
6
7If you have a Chromebook, this gives you speech support built-in. If you're
8building Chrome from source and running it on desktop Linux, speech and braille
9won't be included by default. Here's how to enable it.
10
11## Compiling the Chrome OS version of Chrome
12
13First follow the public instructions for
14[Chrome checkout and build](https://www.chromium.org/developers/how-tos/get-the-code).
15
Zach Helfinstein46d2ecae2018-07-27 18:28:3616Edit `.gclient` (in `chromium/`) and at the bottom add:
17
18```
19target_os = ["chromeos"]
20```
21
22Run `gclient sync` to update your checkout.
23
24Then create a GN configuration with "chromeos" as the target OS, for example:
dmazzoni2f489752017-02-16 03:39:1625
dbeam9e590b22017-03-02 07:11:2026```
27gn args out/cros
28```
dmazzoni2f489752017-02-16 03:39:1629
30...in editor, add this line:
31
32```
33target_os = "chromeos"
34is_component_build = true
35is_debug = false
36```
37
38Note: Only ```target_os = "chromeos"``` is required, the others are recommended
39for a good experience but you can configure Chrome however you like otherwise.
dbeam9e590b22017-03-02 07:11:2040Note that Native Client is required, so do not put `enable_nacl = false` in
dmazzoni2f489752017-02-16 03:39:1641your file anywhere!
42
43Now build Chrome as usual, e.g.:
44
dbeam9e590b22017-03-02 07:11:2045```
Max Morozf5b31fcd2018-08-10 21:55:4846autoninja -C out/cros chrome
dbeam9e590b22017-03-02 07:11:2047```
dmazzoni2f489752017-02-16 03:39:1648
49And run it as usual to see a mostly-complete Chrome OS desktop inside
50of a window:
51
dbeam9e590b22017-03-02 07:11:2052```
53out/cros/chrome
54```
dmazzoni2f489752017-02-16 03:39:1655
56By default you'll be logged in as the default user. If you want to
57simulate the login manager too, run it like this:
58
dbeam9e590b22017-03-02 07:11:2059```
60out/cros/chrome --login-manager
61```
dmazzoni2f489752017-02-16 03:39:1662
dbeam9e590b22017-03-02 07:11:2063You can run any of the above under its own X session (avoiding any window
64manager key combo conflicts) by doing something like
dmazzoni2f489752017-02-16 03:39:1665
dbeam9e590b22017-03-02 07:11:2066```
67startx out/cros/chrome
68```
dmazzoni2f489752017-02-16 03:39:1669
Laura Eberly531206c2021-04-23 00:01:3370### Remapping keys so ChromeVox recognizes a Search key
71ChromeVox expects that the Search key is mapped from your
72left Windows key/LWIN/key code 91; however, your window manager/desktop
73environment (Linux) treats this as a Super or Meta which usually gets assigned
74to numerous shortcut combinations.
75
76#### Option 1: running under a new X session
77To avoid these conflicts, run using startx as described above.
78
79#### Option 2: remapping keys in your window manager
80If you decide not to run under X or wish to run Linux within a window manager
81such as through Chrome Remote Desktop or a virtual machine, you need to remap
82keys either in Linux or inside Chrome OS.
83
84To manually disable all conflicting key combinations in Linux, remove all
85keyboard bindings that reference "Super" or "Meta" in
86System Settings > Keyboard > Shortcuts.
87
88#### Option #3: remapping the Search key inside Chrome OS
89To remap the Search key inside Chrome OS, go to Settings > Device > Keyboard.
90The control key is a good choice for setting as Search as there should be no
91conflicts with Linux on its own. Caps Lock is not recommended to change as
92ChromeVox may handle it as a special case.
David Tsengc4b43012018-04-11 04:10:2793
dmazzoni2f489752017-02-16 03:39:1694## Speech
95
dbeam9e590b22017-03-02 07:11:2096If 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:
dmazzoni2f489752017-02-16 03:39:1698
99```
David Tseng8cbfe6982020-11-10 23:38:57100gsutil ls gs://chromeos-localmirror/distfiles/espeak*
dmazzoni2f489752017-02-16 03:39:16101```
102
David Tseng1bb2aa7a2020-02-26 19:11:05103Pick the latest version and
dmazzoni2f489752017-02-16 03:39:16104
105```
Jacobo Aragunde Pérez0af076da2022-01-13 15:38:55106VERSION=1.49.3.14
Guido Trotterd22bb1cd2020-11-14 05:24:38107TMPDIR=$(mktemp -d)
Jacobo Aragunde Pérez0af076da2022-01-13 15:38:55108gsutil cp gs://chromeos-localmirror/distfiles/espeak-ng-$VERSION.tar.xz $TMPDIR
109tar -C $TMPDIR -xvf $TMPDIR/espeak-ng-$VERSION.tar.xz
Guido Trotterd22bb1cd2020-11-14 05:24:38110sudo mkdir -p /usr/share/chromeos-assets/speech_synthesis/espeak-ng/
111sudo chown -R $(whoami) /usr/share/chromeos-assets/
112cp -r $TMPDIR/espeak-ng/chrome-extension/* /usr/share/chromeos-assets/speech_synthesis/espeak-ng
113rm -rf $TMPDIR
Katie Dektar8ea0d422017-09-18 19:45:17114```
115
dbeam9e590b22017-03-02 07:11:20116**Be sure to check permissions of /usr/share/chromeos-assets, some users report
117they need to chmod or chown too, it really depends on your system.**
dmazzoni2f489752017-02-16 03:39:16118
David Tseng8cbfe6982020-11-10 23:38:57119**Note that the default Google tts engine is now only available on an actual
120Chrome OS device. **
121
dbeam9e590b22017-03-02 07:11:20122After you do that, just run "chrome" as above (e.g. out/cros/chrome) and press
123Ctrl+Alt+Z, and you should hear it speak! If not, check the logs.
dmazzoni2f489752017-02-16 03:39:16124
125## Braille
126
dbeam9e590b22017-03-02 07:11:20127ChromeVox uses extension APIs to deliver braille to Brltty through libbrlapi
128and uses Liblouis to perform translation and backtranslation.
dmazzoni2f489752017-02-16 03:39:16129
dbeam9e590b22017-03-02 07:11:20130Once built, Chrome and ChromeVox will use your machines running Brltty
131daemon to display braille if ChromeVox is running. Simply ensure you have a
132display connected before running Chrome and that Brltty is running.
dmazzoni2f489752017-02-16 03:39:16133
David Tsenge34a52f2018-10-23 01:09:32134Note you may need to customize brltty.conf (typically found in /etc).
135In particular, the api-parameters Auth param may exclude the current user.
136You can turn this off by doing:
137api-parameters Auth=none
138
Laura Eberly531206c2021-04-23 00:01:33139Testing against the latest releases of Brltty (e.g. 6.3 at time of writing) is
dbeam9e590b22017-03-02 07:11:20140encouraged.
dmazzoni2f489752017-02-16 03:39:16141
142For more general information, see [ChromeVox](chromevox.md)
143
144# Using ChromeVox
145
dbeam9e590b22017-03-02 07:11:20146ChromeVox keyboard shortcuts use Search. On Linux that's usually your Windows
147key. If some shortcuts don't work, you may need to remove Gnome keyboard
148shortcut bindings, or use "startx", as suggested above, or remap it.
dmazzoni2f489752017-02-16 03:39:16149
150* Search+Space: Click
151* Search+Left/Right: navigate linearly
152* Search+Period: Open ChromeVox menus
Laura Eberly531206c2021-04-23 00:01:33153* Search+H: jump to next heading on page