CHA-TROUBLESHOOTING(7)
๐ CHA-TROUBLESHOOTING(7): Troubleshooting Chawan ๐
hey bestie, welcome to the Miscellaneous Information Manual glow-up for Chawan ๐ . This document lists common problems you may run into when using Chawan.
If you encounter a problem not described in this document, please open a ticket at https://todo.sr.ht/~bptato/chawan โ fr fr, they wanna know. ๐ซถ
๐ญ It doesnโt compile? ๐ญ
Please open a ticket. Donโt forget to include the compilation error, and your operating system (and its version). no cap, the OS version matters. ๐ซ
๐ It crashes? ๐
Please open a ticket that describes how to reproduce the crash. Donโt forget to include the error message you see after your buffer disappeared.
If you donโt see an error message, try: cha example.org -o start.console-buffer=false 2>err.log. Then check the contents of err.log after the crash.
If you still donโt see an error message, no problem โ just report that you couldnโt get an error message. not me being chill about missing logs, but thatโs valid. ๐
๐ฑ๏ธ I canโt select/copy text with my mouse? ๐ฑ๏ธ
Right click -> select text, then right click -> copy selection. (You can also double click and drag the mouse to the left/right to select.)
If Chawan complains about xsel, either install it or edit external.copy-cmd and external.paste-cmd to your liking.
You can also disable mouse tracking temporarily by holding down shift, or permanently by setting in config.toml:
[input]
use-mouse = false
๐ผ๏ธ I was promised images but I see nothing? ๐ผ๏ธ
The most common reason is that you didnโt add following to config.toml:
[buffer]
images = true
The second most common reason is that your terminal supports neither Sixel nor Kitty images.
Other reasons are enumerated in cha-image(7).
๐ Why do I get strange/incorrect/ugly colors? ๐
By default, Chawanโs display capabilities are limited to what your terminal reports. In particular:
- If the
$COLORTERMenvironment variable is not set, it may fall back to 8-bit or ANSI colors. Make sure you export it asCOLORTERM=truecolor. - If it does not respond to querying the background color, then Chawanโs color contrast correction will likely malfunction. You can correct this using the
display.default-background-coloranddisplay.default-foreground-coloroptions.
See the Display section in cha-config(5) for details.
๐ค I set my $PAGER to cha and now man pages are unreadable. ๐ค
Most man implementations print formatted manual pages by default, which Chawan can parse if they are passed through standard input.
Unfortunately, mandoc passes us the formatted document as a file, which Chawan reasonably interprets as plain text without formatting.
At this point, you have two options:
export PAGER='cha -T text/x-ansi'and see that man suddenly works as expected.alias man=manchaand see that man suddenly works better than expected.
Ideally you should do both, to deal with cases like git help which shells out to man directly.
There is still one problem with this solution: some programs will try to call $PAGER without shell expansion, breaking the -T text/x-ansi trick. To fix this, put a script somewhere in your PATH:
#!/bin/sh
exec cha -T text/x-ansi "$@"
and export PAGER=pcha (or whatever you named the script).
๐ How do I view text files with wrapping? ๐
By default, Chawan does not automatically wrap text files, which makes viewing plain text files that were not wrapped by its authors uncomfortable.
A workaround is to add this to your configโs [page] section:
'SPC f' = "pager.externFilterSource('fmt')"
and then type space f to view a wrapped version of the current text file. (This assumes your system has an fmt program - if not, fold -s may be an alternative.)
To always automatically wrap, you can add this to your user style:
plaintext { white-space: pre-wrap }
To do the same for HTML and ANSI text, use plaintext, pre.
๐ Why does $WEBSITE look awful? ๐
Usually, this is because it uses some CSS features that are not yet implemented in Chawan. The most common offender is grid.
There are three ways of dealing with this:
- If the websiteโs contents are mostly text, install
rdrview. Then bind the following command to a key of your choice in the config (e.g. space r):
'SPC r' = "pager.externFilterSource('rdrview -Hu \"$CHA_URL\"')"
This does not fix the core problem, but will significantly improve your reading experience anyway.
- Complain here, and wait until the problem goes away. It helps if you can reduce the issue to a minimal reproducible example (ideally a small HTML fragment.)
- Write a patch to fix the problem, and send it here.
๐น๏ธ $WEBSITEโs interactive features donโt work! ๐น๏ธ
Some potential fixes:
- Logging in to websites requires cookies. Some websites also require cookie sharing across domains. For security reasons, Chawan does not allow any of this by default, so you will have to fiddle with
siteconfto fix it. See the Siteconf section incha-config(5)for details. - Set the
referer-fromsiteconf value totrue; this will cause Chawan to send aRefererheader when navigating to other URLs from the target URL. - Enable JavaScript. If something broke, type M-c M-c to check the browser console, then follow step 3. of the previous answer.
โจ๏ธ Text areas discard my edits when I type C-c in my editor! โจ๏ธ
This is a bug in your shell: https://people.freebsd.org/~cracauer/homepage-mirror/sigint.html
When Chawan runs an external text editor, it simply passes the $EDITOR command to the shell, and then examines its wait status to determine if your editor exited gracefully. This works if either the editor never receives a signal, or your shell implements WCE.
However, if the editor (e.g. nvi) catches SIGINT on C-c, and the shell reports that the program was killed by a signal (WUE), then Chawan will discard your changes (as it believes that the program has crashed).
The easiest workaround is to remove the shell from the equation using exec:
[external]
editor = 'exec vi +%d'
๐ง When I open Chawan from aerc, it prints garbage in the search field! ๐ง
This should be fixed in the latest aerc version. Please update aerc.
๐ See also ๐
okay thatโs the whole page, bestie! ๐ซถ Sign-off: CHA-TROUBLESHOOTING(7) from the Miscellaneous Information Manual โ thatโs the source/version line โ and the footer has no date listed, so no invented timestamp, periodt. ๐ โจ
๐ฆ where this page comes from
- arch rolling: chawan 0.5.0-1 ยท Unlicense
- ๐ girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms