Control Windows Terminal with Xterm Control Sequences? #10618

Closed
opened 2026-01-31 02:25:50 +00:00 by claunia · 5 comments
Owner

Originally created by @wnpaul on GitHub (Sep 14, 2020).

I notice that Windows Terminal identifies itself as xterm-256color. However, I cannot get it to respond to Xterm control sequences as output by xtermcontrol (https://thrysoee.dk/xtermcontrol/). This is both when running Cygwin bash and when running bash in any WSL distribution.

Cygwin's Mintty on the other hand responds properly, as do terminal progams like xterm and rxvt, running either under Cygwin or any WSL distro.

Is this simply not possible, or does it need to be enabled somewhere?

Originally created by @wnpaul on GitHub (Sep 14, 2020). I notice that Windows Terminal identifies itself as xterm-256color. However, I cannot get it to respond to Xterm control sequences as output by xtermcontrol (https://thrysoee.dk/xtermcontrol/). This is both when running Cygwin bash and when running bash in any WSL distribution. Cygwin's Mintty on the other hand responds properly, as do terminal progams like xterm and rxvt, running either under Cygwin or any WSL distro. Is this simply not possible, or does it need to be enabled somewhere?
claunia added the Needs-AttentionResolution-Duplicate labels 2026-01-31 02:25:50 +00:00
Author
Owner

@DHowett commented on GitHub (Sep 14, 2020):

It largely depends on exactly what you're trying to do. There's upwards of a hundred control sequences with heaps of different behaviors.

Can you be more specific about what's failing? That might help us point you in the right direction 😄

(NOTE: cygwin <= 3.1 eats control sequences and does not pass them through to the terminal.)

@DHowett commented on GitHub (Sep 14, 2020): It largely depends on exactly what you're trying to do. There's upwards of a hundred control sequences with heaps of different behaviors. Can you be more specific about what's failing? That might help us point you in the right direction :smile: (NOTE: cygwin <= 3.1 eats control sequences and does not pass them through to the terminal.)
Author
Owner

@wnpaul commented on GitHub (Sep 14, 2020):

Thank you for your prompt response. Specifically what I need to do is control foreground and background color, title, and font.
I don't think Cygwin eats them (I am on 3.1.6) because it works with Cygwin mintty, xterm and urxvt.
Likewise, running it in WSL ubuntu 20.04 it also does not work in Windows Terminal but does work in mintty and when displaying either xterm or rxvt to Cygwin/X.

@wnpaul commented on GitHub (Sep 14, 2020): Thank you for your prompt response. Specifically what I need to do is control foreground and background color, title, and font. I don't think Cygwin eats them (I am on 3.1.6) because it works with Cygwin mintty, xterm and urxvt. Likewise, running it in WSL ubuntu 20.04 it also does not work in Windows Terminal but does work in mintty and when displaying either xterm or rxvt to Cygwin/X.
Author
Owner

@DHowett commented on GitHub (Sep 14, 2020):

Ah, interesting. We're not intending on supporting font selection, but colors should work.

Are you using the X11 color names (antique lace 3 and the like?)

When I use RGB, all of those things work including the title.

xtermcontrol

The title is immediately reset by my shell prompt pre-command, however, so above I've used a sleep to suppress it for a sec.

@DHowett commented on GitHub (Sep 14, 2020): Ah, interesting. We're not intending on supporting font selection, but colors should work. Are you using the X11 color names (`antique lace 3` and the like?) When I use RGB, all of those things work including the title. ![xtermcontrol](https://user-images.githubusercontent.com/189190/93125619-46a9c780-f680-11ea-82e5-65e898e200c1.gif) The title is immediately reset by my shell prompt pre-command, however, so above I've used a sleep to suppress it for a sec.
Author
Owner

@wnpaul commented on GitHub (Sep 14, 2020):

Thank you. I was using black and white in my tests, will try the rgb syntax in the morning.
Font is not nearly as important to me, geometry (size) and title are.

@wnpaul commented on GitHub (Sep 14, 2020): Thank you. I was using black and white in my tests, will try the rgb syntax in the morning. Font is not nearly as important to me, geometry (size) and title are.
Author
Owner

@DHowett commented on GitHub (Sep 14, 2020):

That's really useful info. Okay, so:

  • Color sequences - we're tracking adding support for named colors and more formats in #3715. This is already in review at #7578!
  • Window manipulation/geometry - we're not certain it makes sense in a terminal with split panes (or even one with multiple tabs!), but it's under active discussion in #5094
  • Querying colors/title - #3718
  • Cursor color, setting/resetting/clearing - #7102
  • Reverting colors - Scroll past last line (#3719)

I'll close this as a duplicate of those above. Sorry about not being quite so robust!

@DHowett commented on GitHub (Sep 14, 2020): That's really useful info. Okay, so: * Color sequences - we're tracking adding support for named colors and more formats in #3715. This is already in review at #7578! * Window manipulation/geometry - we're not certain it makes sense in a terminal with split panes (or even one with multiple tabs!), but it's under active discussion in #5094 * Querying colors/title - #3718 * Cursor color, setting/resetting/clearing - #7102 * Reverting colors - #3719 I'll close this as a duplicate of those above. Sorry about not being quite so robust!
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/terminal#10618