blob: aea0c93c299bd424d56d5c4252acf431bfd05ac1 [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
David Tsengc4b43012018-04-11 04:10:2770NOTE: if you decide to run Chrome OS under linux within a window manager, you
71are subject to its keybindings which will most certainly conflict with
72ChromeVox. The Search key (which gets mapped from LWIN/key code 91), usually
73gets assigned to numerous shortcut combinations. You can manually disable all
74such combinations, or run under X as described above.
75
dmazzoni2f489752017-02-16 03:39:1676## Speech
77
dbeam9e590b22017-03-02 07:11:2078If you want speech, you just need to copy the speech synthesis data files to
79/usr/share like it would be on a Chrome OS device:
dmazzoni2f489752017-02-16 03:39:1680
81```
dbeam9e590b22017-03-02 07:11:2082sudo git clone https://chromium.googlesource.com/chromiumos/platform/assets /usr/share/chromeos-assets
dmazzoni2f489752017-02-16 03:39:1683```
84
dbeam9e590b22017-03-02 07:11:2085Change the permissions:
dmazzoni2f489752017-02-16 03:39:1686
87```
dbeam9e590b22017-03-02 07:11:2088sudo find /usr/share/chromeos-assets -type f -exec chmod 644 {} \;
89sudo find /usr/share/chromeos-assets -type d -exec chmod 755 {} \;
dmazzoni2f489752017-02-16 03:39:1690```
91
dbeam9e590b22017-03-02 07:11:2092Next, unzip the NaCl executables. You only need to do the one for your host
93architecture:
dmazzoni2f489752017-02-16 03:39:1694
95```
dbeam9e590b22017-03-02 07:11:2096PATTS_DIR=/usr/share/chromeos-assets/speech_synthesis/patts
Katie D11cc61c2018-01-19 17:57:4597sudo unzip $PATTS_DIR/tts_service_x86_64.nexe.zip -d $PATTS_DIR
dmazzoni2f489752017-02-16 03:39:1698```
99
Katie Dektar8ea0d422017-09-18 19:45:17100You may need to update permissions for the unzipped files within within
101speech_synthesis/patts:
102
103```
104sudo find $PATTS_DIR -type f -exec chmod 755 {} \;
105```
106
dbeam9e590b22017-03-02 07:11:20107**Be sure to check permissions of /usr/share/chromeos-assets, some users report
108they need to chmod or chown too, it really depends on your system.**
dmazzoni2f489752017-02-16 03:39:16109
dbeam9e590b22017-03-02 07:11:20110After you do that, just run "chrome" as above (e.g. out/cros/chrome) and press
111Ctrl+Alt+Z, and you should hear it speak! If not, check the logs.
dmazzoni2f489752017-02-16 03:39:16112
Katie Dc9912db2018-12-20 01:24:49113### eSpeak
114
115To get [eSpeak](espeak.md) on Chrome OS on Desktop Linux, copy the eSpeak
116extension (chrome branch) to the same place:
117
118```
119cd ~
120git clone https://chromium.googlesource.com/chromiumos/third_party/espeak-ng
121cd espeak-ng
122git checkout chrome
123sudo cp -r chrome-extension /usr/share/chromeos-assets/speech_synthesis/espeak-ng
124```
125
dmazzoni2f489752017-02-16 03:39:16126## 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
dbeam9e590b22017-03-02 07:11:20140Testing against the latest releases of Brltty (e.g. 5.4 at time of writing) is
141encouraged.
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
154* Search+H: jump to next heading on page