Tachikoma fails to detect sixel feature win11 on windows terminal or mintty #40

Open
opened 2026-07-18 11:14:22 -07:00 by devel-chm · 4 comments
devel-chm commented 2026-07-18 11:14:22 -07:00 (Migrated from github.com)

FYI: Sixel.jl now detects and passes tests for sixel functionality
in recent windows terminal with sixel support (1.24.xxx works for me)
on win11 with julia 1.10.11.

Sixel.ij still fails to detect the capability and run when I run
julia 1.10.11 from a recent mintty terminal on win11 so
I’m not sure why it is working with the Windows Terminal.
Maybe there is some special code…

Tachikoma (2.3.5) does not detect that sixel works here. I was
able to force the use by setting ENV["TACHIKOMA_GFX"] = "sixel"
and the TachikomaDemos in the launcher() now show sixels!

It looks like you have some xterm interface code to detect sixel
features that I am unfamiliar with and that are not supported
by mintty (at least). Here is some bash code to check the terminal
capability with an ascii escape:

#!/bin/bash
#
# This shows how to use bash to send ANSI terminal control
# sequences to the underlying TTY and read the response for
# queries such as Device Attributes (DA).  If the primary
# DA includes the value 4 then sixel graphics is supported.

# Query DA 1
echo -e "\n\nQuerying primary Device Attribute for TTY"
IFS=";" read -a REPLY -s -t 1 -d "c" -p $'\e[c' >&2
echo "${#REPLY[@]}"    # How many values were returned?
echo "${!REPLY[@]}"    # What indices were set?
# Use printf with %q option to display printing and non-
# printing values returned.
for code in "${REPLY[@]}" ; do printf '%q\n' "$code" ; done

# Query DA 2
echo -e "\n\nQuerying secondary Device Attribute for TTY"
IFS=";" read -a REPLY -s -t 1 -d "c" -p $'\e[>c' >&2
echo "${#REPLY[@]}"    # How many values were returned?
echo "${!REPLY[@]}"    # What indices were set?
# Use printf with %q option to display printing and non-
# printing values returned.
for code in "${REPLY[@]}" ; do printf '%q\n' "$code" ; done
FYI: Sixel.jl now detects and passes tests for sixel functionality in recent windows terminal with sixel support (1.24.xxx works for me) on win11 with julia 1.10.11. Sixel.ij still fails to detect the capability and run when I run julia 1.10.11 from a recent mintty terminal on win11 so I’m not sure why it is working with the Windows Terminal. Maybe there is some special code… Tachikoma (2.3.5) does not detect that sixel works here. I was able to force the use by setting ENV["TACHIKOMA_GFX"] = "sixel" and the TachikomaDemos in the launcher() now show sixels! It looks like you have some xterm interface code to detect sixel features that I am unfamiliar with and that are not supported by mintty (at least). Here is some bash code to check the terminal capability with an ascii escape: ```bash #!/bin/bash # # This shows how to use bash to send ANSI terminal control # sequences to the underlying TTY and read the response for # queries such as Device Attributes (DA). If the primary # DA includes the value 4 then sixel graphics is supported. # Query DA 1 echo -e "\n\nQuerying primary Device Attribute for TTY" IFS=";" read -a REPLY -s -t 1 -d "c" -p $'\e[c' >&2 echo "${#REPLY[@]}" # How many values were returned? echo "${!REPLY[@]}" # What indices were set? # Use printf with %q option to display printing and non- # printing values returned. for code in "${REPLY[@]}" ; do printf '%q\n' "$code" ; done # Query DA 2 echo -e "\n\nQuerying secondary Device Attribute for TTY" IFS=";" read -a REPLY -s -t 1 -d "c" -p $'\e[>c' >&2 echo "${#REPLY[@]}" # How many values were returned? echo "${!REPLY[@]}" # What indices were set? # Use printf with %q option to display printing and non- # printing values returned. for code in "${REPLY[@]}" ; do printf '%q\n' "$code" ; done ```
devel-chm commented 2026-07-18 12:38:08 -07:00 (Migrated from github.com)

The file dd.test contains the characters: esc [ c which is the ascii escape
sequence to request terminal capabilities (4 is sixel support).

On windows terminal 1.24.11911.0 on win11:

PS C:\Users\chm> type .\dd.test

PS C:\Users\chm> [?61;4;6;7;14;21;22;23;24;28;32;42;52c

and from julia 1.10.11 running in the same terminal at
the shell> prompt:

shell> cat dd.test

shell> 61;4;6;7;14;21;22;23;24;28;32;42;52c

If I use cygwin mintty version 3.8.2 (x86-64) from the bash prompt:

bash$ cat dd.test

bash$ 64;2;3;4;6;9;11;15;21;28;29;1;22c

and from julia 1.10.11 running in that terminal at the shell> prompt:

shell> cat dd.test

shell> 61;6;7;21;22;23;24;28;32;42c

You can see that directly in the terminal, the output indicates sixel
support for both. On the windows terminal, you get the same output
running the test from the julia REPL shell prompt.

However, for the mintty output in the julia REPL shell mode
produces different output (and is missing the value 4 indicating
sixel support).

The file ``dd.test`` contains the characters: ``esc [ c`` which is the ascii escape sequence to request terminal capabilities (4 is sixel support). On windows terminal 1.24.11911.0 on win11: ``` PS C:\Users\chm> type .\dd.test PS C:\Users\chm> [?61;4;6;7;14;21;22;23;24;28;32;42;52c ``` and from julia 1.10.11 running in the same terminal at the shell> prompt: ``` shell> cat dd.test shell> 61;4;6;7;14;21;22;23;24;28;32;42;52c ``` If I use cygwin mintty version 3.8.2 (x86-64) from the bash prompt: ``` bash$ cat dd.test bash$ 64;2;3;4;6;9;11;15;21;28;29;1;22c ``` and from julia 1.10.11 running in that terminal at the shell> prompt: ``` shell> cat dd.test shell> 61;6;7;21;22;23;24;28;32;42c ``` You can see that directly in the terminal, the output indicates sixel support for both. On the windows terminal, you get the same output running the test from the julia REPL shell prompt. However, for the ``mintty`` output in the julia REPL shell mode produces different output (and is missing the value 4 indicating sixel support).
ShauryaAttreya37 commented 2026-07-22 06:23:01 -07:00 (Migrated from github.com)

I looked into this on the v2.4.0 tree (db8eef7) and I think the root cause is
structural rather than a probe that's failing, sixel autodetection can't
succeed on Windows 11/10 at all right now

  1. _detect_sixel_geometry!() returns immediately on Windows:
    https://github.com/kahliburke/Tachikoma.jl/blob/main/src/terminal.jl#L261
    @static Sys.iswindows() && return
    
I looked into this on the v2.4.0 tree (db8eef7) and I think the root cause is structural rather than a probe that's failing, sixel autodetection can't succeed on Windows 11/10 at all right now 1. `_detect_sixel_geometry!()` returns immediately on Windows: https://github.com/kahliburke/Tachikoma.jl/blob/main/src/terminal.jl#L261 ```julia @static Sys.iswindows() && return
devel-chm commented 2026-07-31 06:25:26 -07:00 (Migrated from github.com)

It looks like the terminal IO as configured by Julia is the problem.

If I look at the output of the cygwin/msys2 tty command from the
Julia shell mode I get /dev/cons0 for both.

However, as the above tests show windows terminal (late enough
version to have sixel support) responds to the escape sequence
while for mintty, the same /dev/cons0 appears to be filtering out
the capability (4 is not included).

It looks like a resolution to this problem will have to come at
the Julia IO level.

It looks like the terminal IO as configured by Julia is the problem. If I look at the output of the cygwin/msys2 tty command from the Julia shell mode I get /dev/cons0 for both. However, as the above tests show windows terminal (late enough version to have sixel support) responds to the escape sequence while for mintty, the same /dev/cons0 appears to be filtering out the capability (4 is not included). It looks like a resolution to this problem will have to come at the Julia IO level.
devel-chm commented 2026-07-31 06:27:40 -07:00 (Migrated from github.com)

Since Tachikoma appears to be directly working with the terminal (I get
sixel support for mintty if I set the TACHIKOMA_GFX environment
variable).

You might work around the detection problem for mintty by checking
if ``ENV["TERM_PROGRAM"] == "mintty" .

That will at least allow Tachikoma sixel features to function for mintty.

Since Tachikoma appears to be directly working with the terminal (I get sixel support for mintty if I set the TACHIKOMA_GFX environment variable). You might work around the detection problem for mintty by checking if ``ENV["TERM_PROGRAM"] == "mintty" . That will at least allow Tachikoma sixel features to function for mintty.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
kahliburke/Tachikoma.jl#40
No description provided.