wezterm icon indicating copy to clipboard operation
wezterm copied to clipboard

sixel doesn't work on Windows 10

Open xiangpeng2008 opened this issue 4 years ago • 11 comments

What Operating System(s) are you seeing this problem on?

Windows

WezTerm version

wezterm 20210814-124438-54e29167

Did you try the latest nightly build to see if the issue is better (or worse!) than your current version?

No, and I'll explain why below

Describe the bug

when I open wezterm on windows10, ssh to remote linux, and img2sixel path/img.png, nothing prints

To Reproduce

open wezterm on windows10 ssh to linux server img2sixel path/img.png

image

Configuration

no config

Expected Behavior

Sixel graphics support (experimental: starting in 20200620-160318-e00b076c)

Logs

 2021-10-17T12:07:17.919Z INFO  wezterm_mux_server_impl::local > setting up C:\Users\zhangxia\.local/share/wezterm\gui-sock-6796
 2021-10-17T12:07:18.484Z WARN  wezterm_term::terminalstate    > unhandled DecPrivateMode SetDecPrivateMode(Unspecified(9001))
 2021-10-17T12:07:18.960Z INFO  wezterm_gui::termwindow        > OpenGL initialized! ANGLE (NVIDIA Quadro P620 Direct3D11 vs_5_0 ps_5_0) OpenGL ES 3.0.0 (ANGLE 2.1.1 git hash: 07ea804e6201) is_context_loss_possible=true wezterm version: 20210814-124438-54e29167
 2021-10-17T12:07:30.103Z WARN  wezterm_term::terminalstate    > unhandled DecPrivateMode SetDecPrivateMode(Unspecified(1034))

Anything else?

No response

xiangpeng2008 avatar Oct 17 '21 12:10 xiangpeng2008

The Windows ConPTY layer might be interfering with this. If you use wezterm ssh to connect directly to the remote host, I would expect this to work. Could you try that?

wez avatar Oct 17 '21 15:10 wez

I'm not with this Windows 10 right now, will let you know tmr.

xiangpeng2008 avatar Oct 17 '21 15:10 xiangpeng2008

The Windows ConPTY layer might be interfering with this. If you use wezterm ssh to connect directly to the remote host, I would expect this to work. Could you try that?

Yes, wezterm ssh works.

xiangpeng2008 avatar Oct 18 '21 02:10 xiangpeng2008

We're waiting on some combination of: https://github.com/microsoft/terminal/issues/1173 https://github.com/microsoft/terminal/issues/448

before this will work directly on ConPTY

wez avatar Dec 23 '21 15:12 wez

For what it's worth, mintty is a Windows terminal that supports sixel graphics.

ykhan21 avatar Jan 06 '24 19:01 ykhan21

@ykhan21 wezterm does support sixel graphics. It's conpty in the middle that can mess things up

wez avatar Jan 06 '24 19:01 wez

The workaround that I suggest is using wezterm ssh to get directly into eg: a WSL environment or a remote linux environment

wez avatar Jan 06 '24 19:01 wez

Is there a way to get it to work without ssh-ing into a linux / WSL environment?

For example, on Windows with mintty I can do: magick convert image.png -polaroid 10 -thumbnail 500x image.png sixel:- > image.six.txt, then cat the file to display the image with sixel graphics: cat image.six.txt.

ykhan21 avatar Jan 06 '24 19:01 ykhan21

No, conpty, which is intimately tied to native console program output on windows, does not support sixels. To use sixel, you need to avoid conpty. Learn more about conpty: https://wezfurlong.org/wezterm/what-is-a-terminal.html#windows-and-conpty

As an alternative, using the iTerm2 image protocol uses a different kind of escape sequence that can mostly squeeze through conpty.

Consider using eg: png or jpg images together with wezterm imgcat

wez avatar Jan 06 '24 19:01 wez

I think this might be worth looking into, now that https://github.com/microsoft/terminal/issues/1173 has been resolved.

Thanks.

AnonymouX47 avatar Aug 30 '24 11:08 AnonymouX47

I think this might be worth looking into, now that microsoft/terminal#1173 has been resolved.

Thanks.

wezterm ssh does support sixel, mintty supports sixel, and microsoft terminal supports sixel now

Kreijstal avatar Oct 16 '24 11:10 Kreijstal

Now that Microsoft Windows Terminal (Preview) supports sixel, is there any reason that conpty would still block wezterm support for sixel?

This screenshot shows wezterm running side-by-side with Windows Terminal Preview. Windows Terminal can render sixel graphics, but wezterm still cannot.

image

I have very little to no knowledge on terminal architecture, so it isn't clear to me why one works, but not the other. So, be gentle in your responses. :)

pcgeek86 avatar Oct 31 '24 14:10 pcgeek86

So, be gentle in your responses. :)

I just want to say... as far as I know, he always is. :smiley:

AnonymouX47 avatar Oct 31 '24 15:10 AnonymouX47

Hello, today I noticed that miraculously both sixel and kitty support randomly started working. This is difficult to explain for me, since I didnt update anything, and Windows Update claims to not have done anything like that either. However I suppose that isnt that important, I just thought I'd let yall know.

Image

a-usr avatar Feb 17 '25 07:02 a-usr

Hello, today I noticed that miraculously both sixel and kitty support randomly started working. This is difficult to explain for me, since I didnt update anything, and Windows Update claims to not have done anything like that either. However I suppose that isnt that important, I just thought I'd let yall know.

Image

is this ssh wezterm, or wezterm under windows? ssh wezterm does support sixel, but if you use wezterm then use ssh, it won't work, are you sure?

which windows version do you use and which wezterm version is this?

Kreijstal avatar Feb 17 '25 10:02 Kreijstal

this is on Windows 11 build 22631.4751, with wezterm nightly (wezterm 20250210-070846-3bc67e44). Both mentioned image protocols work both using the unix domain, and the local one. SSH wasnt used, this should go through regular conPTY.

a-usr avatar Feb 17 '25 12:02 a-usr

Also uhh this

Image

I can assure you, the image is not black

Once we've figured the current issue out I suppose I'll create a seperate one for this.

a-usr avatar Feb 17 '25 13:02 a-usr

I read https://github.com/wezterm/wezterm/issues/1236#issuecomment-2662315786 and tried it. I replaced conPTY.dll and OpenConsole.exe of wezterm 20240203-110809-5046fc22 with ones in 4accc376f3411f2cbf4f92ca46f79f7bc47688a1 and launched wezterm-gui.exe, and it printed sixle.

Image

the wezterm configuration when I tried it:

local wezterm = require('wezterm')

local config = wezterm.config_builder()
config.default_prog = { 'C:/Program Files/PowerShell/7/pwsh.exe' }

return config

I guess all I had to do was use conPTY.dll and OpenConsole.exe of Windows Terminal 1.22, which supports sixel.

hexium310 avatar Feb 17 '25 18:02 hexium310

Thank you for confirming that it works!

wez avatar Feb 18 '25 19:02 wez

I'm going to lock this issue because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues. If you have found a problem that seems similar to this, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.

github-actions[bot] avatar Mar 21 '25 03:03 github-actions[bot]