Image preview in WezTerm over SSH on Windows
High-resolution image preview (kitty graphics protocol) in broot does not work, when logging from a Windows computer to an Ubuntu computer using WezTerm and SSH.
Settings
- Computer A: running Windows, WezTerm version 20220213-203140-4a1c4b55
- Computer B and C: running Ubuntu 20.04, WezTerm version 20220213-203140-4a1c4b55, broot version 1.9.3
What works
When accessing B from C using SSH and WezTerm (TERM_PROGRAM=WezTerm and TERM_PROGRAM_VERSION=20220213-203140-4a1c4b55 are exported accordingly), image preview works in broot. The resolution of the preview is high.
What does not work
When accessing B or C from A using SSH and WezTerm without exporting TERM_PROGRAM and TERM_PROGRAM_VERSION, broot shows low-resolution image previews. After exporting TERM_PROGRAM=WezTerm and TERM_PROGRAM_VERSION=20220213-203140-4a1c4b55, broot does not show any image preview (the preview region is black). The command wezterm imgcat shows high-resolution preview.
if you are using the standalone ssh executable then you are most likely running into a limitation of the conpty layer where it doesn't understand the iterm or kitty image protocols.
You may wish to try using wezterm ssh B to connect to B using wezterm's integrated ssh client; that doesn't need to use conpty and should work with both kitty and iterm image protocols.
@blumenschwein If you can confirm what @wez said, I'll add an entry in the FAQ
Thanks @wez @Canop . I have made more tests, but unfortunately, using wezterm ssh alone does not seem to change much.
Test 1
Now I tried wezterm ssh B and adapted the AcceptEnv settings in /etc/ssh/sshd_config on B accordingly, so that variables TERM_PROGRAM etc. are set automatically at login. But this does not change much. Instead of showing a black region, now broot shows previews in low resolution.
There are some warnings regarding OpenGL:
>wezterm ssh user_name@computer_B
2022-02-17T11:09:10.121Z WARN window::os::windows::window > EGL init failed Config says to avoid EGL, fall back to WGL
2022-02-17T11:09:10.270Z INFO wezterm_gui::termwindow > OpenGL initialized! Intel(R) UHD Graphics 4.5.0 - Build 26.20.100.7870 is_context_loss_possible=true wezterm version: 20220213-203140-4a1c4b55
2022-02-17T11:09:38.502Z WARN wezterm_term::terminalstate > unhandled DecPrivateMode SetDecPrivateMode(Unspecified(1015))
Besides, the command wezterm imgcat always shows high-resolution previews, both with standalone ssh and with wezterm ssh. I got low-resolution previews or black region only when using broot.
Test 2
I also installed WSL2 on A and used the Linux version of WezTerm from there to accessed B. It works with standalone ssh and exporting TERM_PROGRAM etc. manually, and broot shows high-resolution previews in this case. But just like in Test 1, with wezterm ssh broot shows only low-resolution previews. Also here, the command wezterm imgcat always shows high-resolution previews, both for standalone ssh and wezterm ssh.