blob: 7ee7e1ed248c65329f14c67e5b7f86052eb461c3 [file] [log] [blame] [view]
dmazzoni2f489752017-02-16 03:39:161# ChromeVox on Desktop Linux
2
3## Starting ChromeVox
4
Akihiro Otabe256192023-07-28 17:40:175On ChromeOS, you can enable spoken feedback (ChromeVox) by pressing Ctrl+Alt+Z.
dmazzoni2f489752017-02-16 03:39:166
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
Akihiro Otabe256192023-07-28 17:40:1711## Compiling the ChromeOS version of Chrome
dmazzoni2f489752017-02-16 03:39:1612
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
Akihiro Otabe256192023-07-28 17:40:1749And run it as usual to see a mostly-complete ChromeOS desktop inside
dmazzoni2f489752017-02-16 03:39:1650of 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
Akihiro Otabe256192023-07-28 17:40:1782keys either in Linux or inside ChromeOS.
Laura Eberly531206c2021-04-23 00:01:3383
84To manually disable all conflicting key combinations in Linux, remove all
85keyboard bindings that reference "Super" or "Meta" in
86System Settings > Keyboard > Shortcuts.
87
Akihiro Otabe256192023-07-28 17:40:1788#### Option #3: remapping the Search key inside ChromeOS
89To remap the Search key inside ChromeOS, go to Settings > Device > Keyboard.
Laura Eberly531206c2021-04-23 00:01:3390The 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
Akihiro Otabe256192023-07-28 17:40:1797/usr/share like it would be on a ChromeOS device:
dmazzoni2f489752017-02-16 03:39:1698
99```
Kevin Graneyb896df52023-07-25 16:55:49100gsutil 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```
Akihiro Otabe256192023-07-28 17:40:17106VERSION=1.51
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
Patti1bb2fa92023-10-18 15:29:45109mkdir $TMPDIR/extract
110tar -C $TMPDIR/extract -xvf $TMPDIR/espeak-ng-$VERSION.tar.xz
Guido Trotterd22bb1cd2020-11-14 05:24:38111sudo mkdir -p /usr/share/chromeos-assets/speech_synthesis/espeak-ng/
112sudo chown -R $(whoami) /usr/share/chromeos-assets/
Patti1bb2fa92023-10-18 15:29:45113cp -r $TMPDIR/extract/* /usr/share/chromeos-assets/speech_synthesis/espeak-ng
Guido Trotterd22bb1cd2020-11-14 05:24:38114rm -rf $TMPDIR
Katie Dektar8ea0d422017-09-18 19:45:17115```
116
dbeam9e590b22017-03-02 07:11:20117**Be sure to check permissions of /usr/share/chromeos-assets, some users report
118they need to chmod or chown too, it really depends on your system.**
dmazzoni2f489752017-02-16 03:39:16119
David Tseng8cbfe6982020-11-10 23:38:57120**Note that the default Google tts engine is now only available on an actual
Akihiro Otabe256192023-07-28 17:40:17121ChromeOS device.**
David Tseng8cbfe6982020-11-10 23:38:57122
dbeam9e590b22017-03-02 07:11:20123After you do that, just run "chrome" as above (e.g. out/cros/chrome) and press
124Ctrl+Alt+Z, and you should hear it speak! If not, check the logs.
dmazzoni2f489752017-02-16 03:39:16125
126## Braille
127
dbeam9e590b22017-03-02 07:11:20128ChromeVox uses extension APIs to deliver braille to Brltty through libbrlapi
129and uses Liblouis to perform translation and backtranslation.
dmazzoni2f489752017-02-16 03:39:16130
dbeam9e590b22017-03-02 07:11:20131Once built, Chrome and ChromeVox will use your machines running Brltty
132daemon to display braille if ChromeVox is running. Simply ensure you have a
133display connected before running Chrome and that Brltty is running.
dmazzoni2f489752017-02-16 03:39:16134
David Tsenge34a52f2018-10-23 01:09:32135Note you may need to customize brltty.conf (typically found in /etc).
136In particular, the api-parameters Auth param may exclude the current user.
137You can turn this off by doing:
138api-parameters Auth=none
139
Laura Eberly531206c2021-04-23 00:01:33140Testing against the latest releases of Brltty (e.g. 6.3 at time of writing) is
dbeam9e590b22017-03-02 07:11:20141encouraged.
dmazzoni2f489752017-02-16 03:39:16142
143For more general information, see [ChromeVox](chromevox.md)
144
145# Using ChromeVox
146
dbeam9e590b22017-03-02 07:11:20147ChromeVox keyboard shortcuts use Search. On Linux that's usually your Windows
148key. If some shortcuts don't work, you may need to remove Gnome keyboard
149shortcut bindings, or use "startx", as suggested above, or remap it.
dmazzoni2f489752017-02-16 03:39:16150
151* Search+Space: Click
152* Search+Left/Right: navigate linearly
153* Search+Period: Open ChromeVox menus
Kevin Graneyb896df52023-07-25 16:55:49154* Search+H: jump to next heading on page