diff --git a/_posts/2020-12-14-orca-raspberry-pi-manjaro.md b/_posts/2020-12-14-orca-raspberry-pi-manjaro.md index 04d948d..45597df 100644 --- a/_posts/2020-12-14-orca-raspberry-pi-manjaro.md +++ b/_posts/2020-12-14-orca-raspberry-pi-manjaro.md @@ -140,6 +140,46 @@ Interesting though for such a young browser to have a minimal level of accessibi I would be interested where this goes in the future. +## P.S. + +Somehow I forgot that you would need to setup the dummy display driver to work with the graphics without a display attached. +To do this, install the `xf86-video-dummy` pacakge: +
+# pacman -S xf86-video-dummy ++ +Next, override any `/etc/X11/xorg.conf` you may have with this: + +
+Section "Monitor" + Identifier "Monitor0" + HorizSync 28.0-80.0 + VertRefresh 48.0-75.0 + # https://arachnoid.com/modelines/ + # 1920x1080 @ 60.00 Hz (GTF) hsync: 67.08 kHz; pclk: 172.80 MHz + Modeline "1920x1080_60.00" 172.80 1920 2040 2248 2576 1080 1081 1084 1118 -HSync +Vsync +EndSection + +Section "Device" + Identifier "Card0" + Driver "dummy" + VideoRam 256000 +EndSection + +Section "Screen" + DefaultDepth 24 + Identifier "Screen0" + Device "Card0" + Monitor "Monitor0" + SubSection "Display" + Depth 24 + Modes "1920x1080_60.00" + EndSubSection +EndSection ++ +Now, when you boot, you should head 'Screen reader on'. + ## Conclusion It took a bit of messing around to get this working, but I'm glad I did! diff --git a/_posts/2020-12-20-deploy-lichess.md b/_posts/2020-12-20-deploy-lichess.md new file mode 100644 index 0000000..e038ed3 --- /dev/null +++ b/_posts/2020-12-20-deploy-lichess.md @@ -0,0 +1,73 @@ +--- +title: "How to Deploy Lichess's Lila With Nginx" +layout: post +--- + +I was getting ready to have a public test of some changes I made to [lichess.org](https://lichess.org)'s [open source chess platform](https://lichess.org/source). +In preperation, I got my Let's Encrypt certificates and nginx configurations setup... +and it wouldn't work. +Here are some tips for myself and future Lichess developers. + +## Reasoning + +My pull request involves accessibility. +It will extend Lichess's NVUI (Non-Visual User Interface) to be more accessible to beginner level chess players. +At the time of writing this, Lichess's NVUI only supports searching pieces by type, rank and file. +It does not support any kind of interactive board. + +I wanted to play chess with a friend of mine who uses a screen reader. +Even though Lichess does indeed have a separate rendering of the page for visually impaired users, +I have heard from a few people that it is not the best. + +I don't use a screen reader myself, so I thought having a public latest changes deployed server would work better for testing. +It would certainly work better than getting some of my less computer literate friends to connect to me via VSCode/VPN and view my local repository. + +So here is how to deploy it: + +## Setup a development environment + +This is described [in Lichess's documentation itself](https://github.com/ornicar/lila/wiki/Lichess-Development-Onboarding). +I will not elaborate further as it is not necessary. + +## Setup nginx + +This is the part that stumps most people. +Getting a local development server usually works alright, but once you want to reverse proxy it for security and professionalism purposes, it get more interesting. + +### lila + +[Lila](https://github.com/ornicar/lila/) is the name for the main chess server, we need to change a few settings. Here is my git diff for the `conf/base.conf` file: + +
+- domain = "localhost:9663" +- socket.domains = [ "localhost:9664" ] ++ domain = "chess.tait.tech" ++ socket.domains = [ "ws.chess.tait.tech" ] + asset.domain = ${net.domain} +- asset.base_url = "http://"${net.asset.domain} ++ asset.base_url = "https://"${net.asset.domain} + asset.minified = false +- base_url = "http://"${net.domain} ++ base_url = "https://"${net.domain} ++ +### lila-ws + +[Lila-ws](https://github.com/ornicar/lila-ws/) is the websocket component of Lila. + +The most common complaint amongst aspiring Lichess developers is websockets not working. +They constantly get these '101' responses from the websocket, +and it also seems that the websocket returns instead of staying in the 'pending' state as it should be. + +Here is how to fix that (in diff format): + +
+-csrf.origin = "http://127.0.0.1:9000" ++csrf.origin = "https://chess.tait.tech" ++ +You need to tell lila-ws where the websocket requests will be coming from. This is how to do that. + +## Conclusion + +This is not a long article, but just some notes for future me and Lila developers. diff --git a/_site/2020/12/14/orca-raspberry-pi-manjaro/index.html b/_site/2020/12/14/orca-raspberry-pi-manjaro/index.html index 741357a..1b36481 100644 --- a/_site/2020/12/14/orca-raspberry-pi-manjaro/index.html +++ b/_site/2020/12/14/orca-raspberry-pi-manjaro/index.html @@ -9,4 +9,32 @@ export ENABLE_ACCESSIBILITY=1
Next, add two flags to the $HOME/.config/chromium-flags.conf
file.
--force-renderer-accessibility --enable-caret-browsing -
You will need to relog to set the ENABLE_ACCESSIBILITY environment variable. Now Chromium should work with Orca.
The Badwolf browser is based on the WebkitGTK engine, as opposed to Firefox’s Gecko and Google’s Blink engines. It almost works out of the box. It is really fast compared to the other two, but it lacks some features like announcing a page is done loading and it doesn’t appear to support caret browsing, which will cause some other problems. Interesting though for such a young browser to have a minimal level of accessibility so early!
I would be interested where this goes in the future.
It took a bit of messing around to get this working, but I’m glad I did! Now I can nerd out with another Linux friend and given how well they seem to find problems with accessibility, hopefully a few upstream patches can be made.
Happy hacking, for everyone!