Running as a default terminal causes app to create terminal window #15707

Closed
opened 2026-01-31 04:46:12 +00:00 by claunia · 20 comments
Owner

Originally created by @Mayhem93 on GitHub (Oct 27, 2021).

Windows Terminal version (or Windows build number)

10.0.22000.0, 1.11.2921.0

Other Software

CoolerMaster MasterPlus (I couldn't find any version string :( but it's a 2-3 week old fresh install)

Steps to reproduce

Make Windows Terminal the default terminal.

Install CoolerMaster MasterPlus (I don't think it's a requirement to have any of their hardware to use it) and on every reboot there's a service called MPService that starts a process with a console host attached:
image

Then a windows terminal window appears:
image

And every time I close it (obviously the process ends) the service restarts the program (so the only way to get rid of this is to stop the service).

Expected Behavior

Expected behavior should be the same when conhost was the default console terminal (no window creation, the program ran in the background)

Actual Behavior

The terminal window appears every time this service runs the said program instead of having it in the background somehow.

Originally created by @Mayhem93 on GitHub (Oct 27, 2021). ### Windows Terminal version (or Windows build number) 10.0.22000.0, 1.11.2921.0 ### Other Software CoolerMaster MasterPlus (I couldn't find any version string :( but it's a 2-3 week old fresh install) ### Steps to reproduce Make Windows Terminal the default terminal. Install CoolerMaster MasterPlus (I don't think it's a requirement to have any of their hardware to use it) and on every reboot there's a service called MPService that starts a process with a console host attached: ![image](https://user-images.githubusercontent.com/705289/139022471-22714d58-c136-489b-95c0-096aff50c7b0.png) Then a windows terminal window appears: ![image](https://user-images.githubusercontent.com/705289/139022587-05633505-f90c-4903-a76f-7c854e7f6ff5.png) And every time I close it (obviously the process ends) the service restarts the program (so the only way to get rid of this is to stop the service). ### Expected Behavior Expected behavior should be the same when conhost was the default console terminal (no window creation, the program ran in the background) ### Actual Behavior The terminal window appears every time this service runs the said program instead of having it in the background somehow.
Author
Owner

@zadjii-msft commented on GitHub (Oct 27, 2021):

@miniksa Add this to the list of "things that spawn a visible console window (and therefore launch into defterm) when they ideally shouldn't"

@zadjii-msft commented on GitHub (Oct 27, 2021): @miniksa Add this to the list of "things that spawn a visible console window (and therefore launch into defterm) when they ideally shouldn't"
Author
Owner

@Mayhem93 commented on GitHub (Oct 27, 2021):

I also want to add that this only happens with MasterPlus on my machine, the others don't create any visible windows terminal

@Mayhem93 commented on GitHub (Oct 27, 2021): I also want to add that this only happens with MasterPlus on my machine, the others don't create any visible windows terminal
Author
Owner

@Mayhem93 commented on GitHub (Oct 27, 2021):

ALSO another thing to note: making windows terminal the default one any new terminal hosts will try to open the default profile. I have Ubuntu as my default one and I wish to have it, but unfortunately I have to change it back to powershell

@Mayhem93 commented on GitHub (Oct 27, 2021): ALSO another thing to note: making windows terminal the default one any new terminal hosts will try to open the default profile. I have Ubuntu as my default one and I wish to have it, but unfortunately I have to change it back to powershell
Author
Owner

@zadjii-msft commented on GitHub (Oct 27, 2021):

any new terminal hosts will try to open the default profile. I have Ubuntu as my default one and I wish to have it, but unfortunately I have to change it back to powershell

That doesn't seem right, I thought we fixed that. Can you share your settings.json?

@zadjii-msft commented on GitHub (Oct 27, 2021): > any new terminal hosts will try to open the default profile. I have Ubuntu as my default one and I wish to have it, but unfortunately I have to change it back to powershell That doesn't seem right, I thought we fixed that. Can you share your `settings.json`?
Author
Owner

@Mayhem93 commented on GitHub (Oct 27, 2021):

@zadjii-msft

"Open in Windows Terminal" context menu doesn't work, I forgot to mention. I ran cmd.exe from win+R and it correctly opened cmd.

"Open in Windows Terminal" opens it in Ubuntu with the default location I've set it up to, like here:
image

If this is a bug, let me know so I can make a separate ticket for this :)

@Mayhem93 commented on GitHub (Oct 27, 2021): @zadjii-msft "Open in Windows Terminal" context menu doesn't work, I forgot to mention. I ran cmd.exe from win+R and it correctly opened cmd. "Open in Windows Terminal" opens it in Ubuntu with the default location I've set it up to, like here: ![image](https://user-images.githubusercontent.com/705289/139100094-96124f2b-d8ed-4c9f-9542-e886ea9b8603.png) If this is a bug, let me know so I can make a separate ticket for this :)
Author
Owner

@zadjii-msft commented on GitHub (Oct 27, 2021):

Might be easiest to diagnose your issues with the whole settings.json file

@zadjii-msft commented on GitHub (Oct 27, 2021): Might be easiest to diagnose your issues with the whole [`settings.json`](https://github.com/microsoft/terminal/wiki/Frequently-Asked-Questions-(FAQ)#where-can-i-find-the-settings-file) file
Author
Owner

@Mayhem93 commented on GitHub (Oct 27, 2021):

{
    "$schema": "https://aka.ms/terminal-profiles-schema",
    "actions": 
    [
        {
            "command": 
            {
                "action": "copy",
                "singleLine": false
            },
            "keys": "ctrl+c"
        },
        {
            "command": "find",
            "keys": "ctrl+shift+f"
        },
        {
            "command": "paste",
            "keys": "ctrl+v"
        },
        {
            "command": 
            {
                "action": "newTab"
            },
            "keys": "ctrl+t"
        },
        {
            "command": "duplicateTab",
            "keys": "ctrl+shift+t"
        },
        {
            "command": 
            {
                "action": "closeTab"
            },
            "keys": "ctrl+w"
        },
        {
            "command": 
            {
                "action": "splitPane",
                "split": "auto",
                "splitMode": "duplicate"
            },
            "keys": "alt+shift+d"
        }
    ],
    "copyFormatting": "none",
    "copyOnSelect": false,
    "defaultProfile": "{2c4de342-38b7-51cf-b940-2309a097f518}",
    "initialCols": 150,
    "initialPosition": "620,300",
    "initialRows": 40,
    "profiles": 
    {
        "defaults": {},
        "list": 
        [
            {
                "antialiasingMode": "cleartype",
                "bellStyle": "audible",
                "colorScheme": "VibrantTom",
                "font": 
                {
                    "face": "Cascadia Code"
                },
                "guid": "{574e775e-4f2a-5b96-ac1e-a2962a402336}",
                "hidden": false,
                "name": "PowerShell",
                "source": "Windows.Terminal.PowershellCore"
            },
            {
                "acrylicOpacity": 0.59999999999999998,
                "background": "#2D0133",
                "bellStyle": "audible",
                "commandline": "wsl.exe ~ -d Ubuntu",
                "cursorShape": "filledBox",
                "experimental.retroTerminalEffect": false,
                "font": 
                {
                    "face": "Source Code Pro",
                    "size": 11,
                    "weight": "normal"
                },
                "guid": "{2c4de342-38b7-51cf-b940-2309a097f518}",
                "hidden": false,
                "name": "Ubuntu",
                "source": "Windows.Terminal.Wsl",
                "startingDirectory": null,
                "useAcrylic": true
            },
            {
                "guid": "{b453ae62-4e3d-5e58-b989-0a998ec441b8}",
                "hidden": true,
                "name": "Azure Cloud Shell",
                "source": "Windows.Terminal.Azure"
            }
        ]
    },
    "schemes": 
    [
        {
            "background": "#0C0C0C",
            "black": "#0C0C0C",
            "blue": "#0037DA",
            "brightBlack": "#767676",
            "brightBlue": "#3B78FF",
            "brightCyan": "#61D6D6",
            "brightGreen": "#16C60C",
            "brightPurple": "#B4009E",
            "brightRed": "#E74856",
            "brightWhite": "#F2F2F2",
            "brightYellow": "#F9F1A5",
            "cursorColor": "#FFFFFF",
            "cyan": "#3A96DD",
            "foreground": "#CCCCCC",
            "green": "#13A10E",
            "name": "Campbell",
            "purple": "#881798",
            "red": "#C50F1F",
            "selectionBackground": "#FFFFFF",
            "white": "#CCCCCC",
            "yellow": "#C19C00"
        },
        {
            "background": "#012456",
            "black": "#0C0C0C",
            "blue": "#0037DA",
            "brightBlack": "#767676",
            "brightBlue": "#3B78FF",
            "brightCyan": "#61D6D6",
            "brightGreen": "#16C60C",
            "brightPurple": "#B4009E",
            "brightRed": "#E74856",
            "brightWhite": "#F2F2F2",
            "brightYellow": "#F9F1A5",
            "cursorColor": "#FFFFFF",
            "cyan": "#3A96DD",
            "foreground": "#CCCCCC",
            "green": "#13A10E",
            "name": "Campbell Powershell",
            "purple": "#881798",
            "red": "#C50F1F",
            "selectionBackground": "#FFFFFF",
            "white": "#CCCCCC",
            "yellow": "#C19C00"
        },
        {
            "background": "#282A36",
            "black": "#21222C",
            "blue": "#BD93F9",
            "brightBlack": "#6272A4",
            "brightBlue": "#D6ACFF",
            "brightCyan": "#A4FFFF",
            "brightGreen": "#69FF94",
            "brightPurple": "#FF92DF",
            "brightRed": "#FF6E6E",
            "brightWhite": "#FFFFFF",
            "brightYellow": "#FFFFA5",
            "cursorColor": "#FFFFFF",
            "cyan": "#8BE9FD",
            "foreground": "#F8F8F2",
            "green": "#50FA7B",
            "name": "Dracula",
            "purple": "#FF79C6",
            "red": "#FF5555",
            "selectionBackground": "#FFFFFF",
            "white": "#F8F8F2",
            "yellow": "#F1FA8C"
        },
        {
            "background": "#282C34",
            "black": "#282C34",
            "blue": "#61AFEF",
            "brightBlack": "#5A6374",
            "brightBlue": "#61AFEF",
            "brightCyan": "#56B6C2",
            "brightGreen": "#98C379",
            "brightPurple": "#C678DD",
            "brightRed": "#E06C75",
            "brightWhite": "#DCDFE4",
            "brightYellow": "#E5C07B",
            "cursorColor": "#FFFFFF",
            "cyan": "#56B6C2",
            "foreground": "#DCDFE4",
            "green": "#98C379",
            "name": "One Half Dark",
            "purple": "#C678DD",
            "red": "#E06C75",
            "selectionBackground": "#FFFFFF",
            "white": "#DCDFE4",
            "yellow": "#E5C07B"
        },
        {
            "background": "#FAFAFA",
            "black": "#383A42",
            "blue": "#0184BC",
            "brightBlack": "#4F525D",
            "brightBlue": "#61AFEF",
            "brightCyan": "#56B5C1",
            "brightGreen": "#98C379",
            "brightPurple": "#C577DD",
            "brightRed": "#DF6C75",
            "brightWhite": "#FFFFFF",
            "brightYellow": "#E4C07A",
            "cursorColor": "#4F525D",
            "cyan": "#0997B3",
            "foreground": "#383A42",
            "green": "#50A14F",
            "name": "One Half Light",
            "purple": "#A626A4",
            "red": "#E45649",
            "selectionBackground": "#FFFFFF",
            "white": "#FAFAFA",
            "yellow": "#C18301"
        },
        {
            "background": "#002B36",
            "black": "#002B36",
            "blue": "#268BD2",
            "brightBlack": "#073642",
            "brightBlue": "#839496",
            "brightCyan": "#93A1A1",
            "brightGreen": "#586E75",
            "brightPurple": "#6C71C4",
            "brightRed": "#CB4B16",
            "brightWhite": "#FDF6E3",
            "brightYellow": "#657B83",
            "cursorColor": "#FFFFFF",
            "cyan": "#2AA198",
            "foreground": "#839496",
            "green": "#859900",
            "name": "Solarized Dark",
            "purple": "#D33682",
            "red": "#DC322F",
            "selectionBackground": "#FFFFFF",
            "white": "#EEE8D5",
            "yellow": "#B58900"
        },
        {
            "background": "#FDF6E3",
            "black": "#002B36",
            "blue": "#268BD2",
            "brightBlack": "#073642",
            "brightBlue": "#839496",
            "brightCyan": "#93A1A1",
            "brightGreen": "#586E75",
            "brightPurple": "#6C71C4",
            "brightRed": "#CB4B16",
            "brightWhite": "#FDF6E3",
            "brightYellow": "#657B83",
            "cursorColor": "#002B36",
            "cyan": "#2AA198",
            "foreground": "#657B83",
            "green": "#859900",
            "name": "Solarized Light",
            "purple": "#D33682",
            "red": "#DC322F",
            "selectionBackground": "#FFFFFF",
            "white": "#EEE8D5",
            "yellow": "#B58900"
        },
        {
            "background": "#000000",
            "black": "#000000",
            "blue": "#3465A4",
            "brightBlack": "#555753",
            "brightBlue": "#729FCF",
            "brightCyan": "#34E2E2",
            "brightGreen": "#8AE234",
            "brightPurple": "#AD7FA8",
            "brightRed": "#EF2929",
            "brightWhite": "#EEEEEC",
            "brightYellow": "#FCE94F",
            "cursorColor": "#FFFFFF",
            "cyan": "#06989A",
            "foreground": "#D3D7CF",
            "green": "#4E9A06",
            "name": "Tango Dark",
            "purple": "#75507B",
            "red": "#CC0000",
            "selectionBackground": "#FFFFFF",
            "white": "#D3D7CF",
            "yellow": "#C4A000"
        },
        {
            "background": "#FFFFFF",
            "black": "#000000",
            "blue": "#3465A4",
            "brightBlack": "#555753",
            "brightBlue": "#729FCF",
            "brightCyan": "#34E2E2",
            "brightGreen": "#8AE234",
            "brightPurple": "#AD7FA8",
            "brightRed": "#EF2929",
            "brightWhite": "#EEEEEC",
            "brightYellow": "#FCE94F",
            "cursorColor": "#000000",
            "cyan": "#06989A",
            "foreground": "#555753",
            "green": "#4E9A06",
            "name": "Tango Light",
            "purple": "#75507B",
            "red": "#CC0000",
            "selectionBackground": "#FFFFFF",
            "white": "#D3D7CF",
            "yellow": "#C4A000"
        },
        {
            "background": "#16171D",
            "black": "#878787",
            "blue": "#44B4CC",
            "brightBlack": "#E373C8",
            "brightBlue": "#0000FF",
            "brightCyan": "#19D1D8",
            "brightGreen": "#81EC0D",
            "brightPurple": "#FF00FF",
            "brightRed": "#FF0000",
            "brightWhite": "#E5E5E5",
            "brightYellow": "#FFD93D",
            "cursorColor": "#FFFFFF",
            "cyan": "#19D1D8",
            "foreground": "#FFFFFF",
            "green": "#CCFF04",
            "name": "VibrantTom",
            "purple": "#9933CC",
            "red": "#FF6600",
            "selectionBackground": "#FFFFFF",
            "white": "#F5F5F5",
            "yellow": "#FFD93D"
        },
        {
            "background": "#000000",
            "black": "#000000",
            "blue": "#000080",
            "brightBlack": "#808080",
            "brightBlue": "#0000FF",
            "brightCyan": "#00FFFF",
            "brightGreen": "#00FF00",
            "brightPurple": "#FF00FF",
            "brightRed": "#FF0000",
            "brightWhite": "#FFFFFF",
            "brightYellow": "#FFFF00",
            "cursorColor": "#FFFFFF",
            "cyan": "#008080",
            "foreground": "#C0C0C0",
            "green": "#008000",
            "name": "Vintage",
            "purple": "#800080",
            "red": "#800000",
            "selectionBackground": "#FFFFFF",
            "white": "#C0C0C0",
            "yellow": "#808000"
        }
    ],
    "tabWidthMode": "equal",
    "trimBlockSelection": true,
    "wordDelimiters": " /\\()\"'-.,:;<>~!@#$%^&*|+=[]{}~?\u2502"
}
@Mayhem93 commented on GitHub (Oct 27, 2021): ```json { "$schema": "https://aka.ms/terminal-profiles-schema", "actions": [ { "command": { "action": "copy", "singleLine": false }, "keys": "ctrl+c" }, { "command": "find", "keys": "ctrl+shift+f" }, { "command": "paste", "keys": "ctrl+v" }, { "command": { "action": "newTab" }, "keys": "ctrl+t" }, { "command": "duplicateTab", "keys": "ctrl+shift+t" }, { "command": { "action": "closeTab" }, "keys": "ctrl+w" }, { "command": { "action": "splitPane", "split": "auto", "splitMode": "duplicate" }, "keys": "alt+shift+d" } ], "copyFormatting": "none", "copyOnSelect": false, "defaultProfile": "{2c4de342-38b7-51cf-b940-2309a097f518}", "initialCols": 150, "initialPosition": "620,300", "initialRows": 40, "profiles": { "defaults": {}, "list": [ { "antialiasingMode": "cleartype", "bellStyle": "audible", "colorScheme": "VibrantTom", "font": { "face": "Cascadia Code" }, "guid": "{574e775e-4f2a-5b96-ac1e-a2962a402336}", "hidden": false, "name": "PowerShell", "source": "Windows.Terminal.PowershellCore" }, { "acrylicOpacity": 0.59999999999999998, "background": "#2D0133", "bellStyle": "audible", "commandline": "wsl.exe ~ -d Ubuntu", "cursorShape": "filledBox", "experimental.retroTerminalEffect": false, "font": { "face": "Source Code Pro", "size": 11, "weight": "normal" }, "guid": "{2c4de342-38b7-51cf-b940-2309a097f518}", "hidden": false, "name": "Ubuntu", "source": "Windows.Terminal.Wsl", "startingDirectory": null, "useAcrylic": true }, { "guid": "{b453ae62-4e3d-5e58-b989-0a998ec441b8}", "hidden": true, "name": "Azure Cloud Shell", "source": "Windows.Terminal.Azure" } ] }, "schemes": [ { "background": "#0C0C0C", "black": "#0C0C0C", "blue": "#0037DA", "brightBlack": "#767676", "brightBlue": "#3B78FF", "brightCyan": "#61D6D6", "brightGreen": "#16C60C", "brightPurple": "#B4009E", "brightRed": "#E74856", "brightWhite": "#F2F2F2", "brightYellow": "#F9F1A5", "cursorColor": "#FFFFFF", "cyan": "#3A96DD", "foreground": "#CCCCCC", "green": "#13A10E", "name": "Campbell", "purple": "#881798", "red": "#C50F1F", "selectionBackground": "#FFFFFF", "white": "#CCCCCC", "yellow": "#C19C00" }, { "background": "#012456", "black": "#0C0C0C", "blue": "#0037DA", "brightBlack": "#767676", "brightBlue": "#3B78FF", "brightCyan": "#61D6D6", "brightGreen": "#16C60C", "brightPurple": "#B4009E", "brightRed": "#E74856", "brightWhite": "#F2F2F2", "brightYellow": "#F9F1A5", "cursorColor": "#FFFFFF", "cyan": "#3A96DD", "foreground": "#CCCCCC", "green": "#13A10E", "name": "Campbell Powershell", "purple": "#881798", "red": "#C50F1F", "selectionBackground": "#FFFFFF", "white": "#CCCCCC", "yellow": "#C19C00" }, { "background": "#282A36", "black": "#21222C", "blue": "#BD93F9", "brightBlack": "#6272A4", "brightBlue": "#D6ACFF", "brightCyan": "#A4FFFF", "brightGreen": "#69FF94", "brightPurple": "#FF92DF", "brightRed": "#FF6E6E", "brightWhite": "#FFFFFF", "brightYellow": "#FFFFA5", "cursorColor": "#FFFFFF", "cyan": "#8BE9FD", "foreground": "#F8F8F2", "green": "#50FA7B", "name": "Dracula", "purple": "#FF79C6", "red": "#FF5555", "selectionBackground": "#FFFFFF", "white": "#F8F8F2", "yellow": "#F1FA8C" }, { "background": "#282C34", "black": "#282C34", "blue": "#61AFEF", "brightBlack": "#5A6374", "brightBlue": "#61AFEF", "brightCyan": "#56B6C2", "brightGreen": "#98C379", "brightPurple": "#C678DD", "brightRed": "#E06C75", "brightWhite": "#DCDFE4", "brightYellow": "#E5C07B", "cursorColor": "#FFFFFF", "cyan": "#56B6C2", "foreground": "#DCDFE4", "green": "#98C379", "name": "One Half Dark", "purple": "#C678DD", "red": "#E06C75", "selectionBackground": "#FFFFFF", "white": "#DCDFE4", "yellow": "#E5C07B" }, { "background": "#FAFAFA", "black": "#383A42", "blue": "#0184BC", "brightBlack": "#4F525D", "brightBlue": "#61AFEF", "brightCyan": "#56B5C1", "brightGreen": "#98C379", "brightPurple": "#C577DD", "brightRed": "#DF6C75", "brightWhite": "#FFFFFF", "brightYellow": "#E4C07A", "cursorColor": "#4F525D", "cyan": "#0997B3", "foreground": "#383A42", "green": "#50A14F", "name": "One Half Light", "purple": "#A626A4", "red": "#E45649", "selectionBackground": "#FFFFFF", "white": "#FAFAFA", "yellow": "#C18301" }, { "background": "#002B36", "black": "#002B36", "blue": "#268BD2", "brightBlack": "#073642", "brightBlue": "#839496", "brightCyan": "#93A1A1", "brightGreen": "#586E75", "brightPurple": "#6C71C4", "brightRed": "#CB4B16", "brightWhite": "#FDF6E3", "brightYellow": "#657B83", "cursorColor": "#FFFFFF", "cyan": "#2AA198", "foreground": "#839496", "green": "#859900", "name": "Solarized Dark", "purple": "#D33682", "red": "#DC322F", "selectionBackground": "#FFFFFF", "white": "#EEE8D5", "yellow": "#B58900" }, { "background": "#FDF6E3", "black": "#002B36", "blue": "#268BD2", "brightBlack": "#073642", "brightBlue": "#839496", "brightCyan": "#93A1A1", "brightGreen": "#586E75", "brightPurple": "#6C71C4", "brightRed": "#CB4B16", "brightWhite": "#FDF6E3", "brightYellow": "#657B83", "cursorColor": "#002B36", "cyan": "#2AA198", "foreground": "#657B83", "green": "#859900", "name": "Solarized Light", "purple": "#D33682", "red": "#DC322F", "selectionBackground": "#FFFFFF", "white": "#EEE8D5", "yellow": "#B58900" }, { "background": "#000000", "black": "#000000", "blue": "#3465A4", "brightBlack": "#555753", "brightBlue": "#729FCF", "brightCyan": "#34E2E2", "brightGreen": "#8AE234", "brightPurple": "#AD7FA8", "brightRed": "#EF2929", "brightWhite": "#EEEEEC", "brightYellow": "#FCE94F", "cursorColor": "#FFFFFF", "cyan": "#06989A", "foreground": "#D3D7CF", "green": "#4E9A06", "name": "Tango Dark", "purple": "#75507B", "red": "#CC0000", "selectionBackground": "#FFFFFF", "white": "#D3D7CF", "yellow": "#C4A000" }, { "background": "#FFFFFF", "black": "#000000", "blue": "#3465A4", "brightBlack": "#555753", "brightBlue": "#729FCF", "brightCyan": "#34E2E2", "brightGreen": "#8AE234", "brightPurple": "#AD7FA8", "brightRed": "#EF2929", "brightWhite": "#EEEEEC", "brightYellow": "#FCE94F", "cursorColor": "#000000", "cyan": "#06989A", "foreground": "#555753", "green": "#4E9A06", "name": "Tango Light", "purple": "#75507B", "red": "#CC0000", "selectionBackground": "#FFFFFF", "white": "#D3D7CF", "yellow": "#C4A000" }, { "background": "#16171D", "black": "#878787", "blue": "#44B4CC", "brightBlack": "#E373C8", "brightBlue": "#0000FF", "brightCyan": "#19D1D8", "brightGreen": "#81EC0D", "brightPurple": "#FF00FF", "brightRed": "#FF0000", "brightWhite": "#E5E5E5", "brightYellow": "#FFD93D", "cursorColor": "#FFFFFF", "cyan": "#19D1D8", "foreground": "#FFFFFF", "green": "#CCFF04", "name": "VibrantTom", "purple": "#9933CC", "red": "#FF6600", "selectionBackground": "#FFFFFF", "white": "#F5F5F5", "yellow": "#FFD93D" }, { "background": "#000000", "black": "#000000", "blue": "#000080", "brightBlack": "#808080", "brightBlue": "#0000FF", "brightCyan": "#00FFFF", "brightGreen": "#00FF00", "brightPurple": "#FF00FF", "brightRed": "#FF0000", "brightWhite": "#FFFFFF", "brightYellow": "#FFFF00", "cursorColor": "#FFFFFF", "cyan": "#008080", "foreground": "#C0C0C0", "green": "#008000", "name": "Vintage", "purple": "#800080", "red": "#800000", "selectionBackground": "#FFFFFF", "white": "#C0C0C0", "yellow": "#808000" } ], "tabWidthMode": "equal", "trimBlockSelection": true, "wordDelimiters": " /\\()\"'-.,:;<>~!@#$%^&*|+=[]{}~?\u2502" } ```
Author
Owner

@DHowett commented on GitHub (Oct 27, 2021):

If I had to guess, MasterPlus starts a completely visible console window and then attempts to hide it.

There are much better options they could consider, such as not being a console subsystem application.

@DHowett commented on GitHub (Oct 27, 2021): If I had to guess, MasterPlus starts a completely visible console window and then attempts to hide it. There are much better options they could consider, such as _not being a console subsystem application._
Author
Owner

@Mayhem93 commented on GitHub (Oct 27, 2021):

If I had to guess, MasterPlus starts a completely visible console window and then attempts to hide it.

There are much better options they could consider, such as not being a console subsystem application.

Yeah but how come it doesn't happen with the old conhost ? I've never seen that, although I had some start up programs in the past which would do that (then immediately close)

@Mayhem93 commented on GitHub (Oct 27, 2021): > If I had to guess, MasterPlus starts a completely visible console window and then attempts to hide it. > > There are much better options they could consider, such as _not being a console subsystem application._ Yeah but how come it doesn't happen with the old conhost ? I've never seen that, although I had some start up programs in the past which would do that (then immediately close)
Author
Owner

@miniksa commented on GitHub (Oct 27, 2021):

The old console host exposes its raw window handle which can be retrieved and then force-hidden through an API if a client application wants to do that. It's not the right way of doing things, but it is a way that can appear to "work" on systems fast enough for it to not show anything.

We provide ample flags to be given during the initial CreateProcess call that would prevent the window from being shown in the first place (negating the need to grab the handle and hide it quickly).

With the Terminal, there aren't strictly window handles to be given out to do this operation as it's a tabbed interface all hosted in one window. There are a few things I could try to do heuristically to detect this situation and hide it to some degree... but I'd want to see a more widespread set of these incidents across multiple applications before I pursued that.

However, we haven't even validated that this is what MasterPlus is doing. So I would want to reproduce and figure that out first.

@miniksa commented on GitHub (Oct 27, 2021): The old console host exposes its raw window handle which can be retrieved and then force-hidden through an API if a client application wants to do that. It's not the right way of doing things, but it is a way that can appear to "work" on systems fast enough for it to not show anything. We provide ample flags to be given during the initial CreateProcess call that would prevent the window from being shown in the first place (negating the need to grab the handle and hide it quickly). With the Terminal, there aren't strictly window handles to be given out to do this operation as it's a tabbed interface all hosted in one window. There are a few things I could try to do heuristically to detect this situation and hide it to some degree... but I'd want to see a more widespread set of these incidents across multiple applications before I pursued that. However, we haven't even validated that this is what MasterPlus is doing. So I would want to reproduce and figure that out first.
Author
Owner

@Mayhem93 commented on GitHub (Oct 27, 2021):

@miniksa Ok thanks for your input. Let's see what's going on and maybe I'll send them the issue over so they can update it's app

@Mayhem93 commented on GitHub (Oct 27, 2021): @miniksa Ok thanks for your input. Let's see what's going on and maybe I'll send them the issue over so they can update it's app
Author
Owner

@oising commented on GitHub (Oct 27, 2021):

I think this probably belongs here, but my machine went to sleep and when it woke up, I have this:

image

The title in the task bar is "Command Prompt" and bizarrely, I cannot close the window -- i.e. alt+f4 or clicking on the "x" does nothing.

More info -- it appears to have been spawned by svchost:

image

This particular svchost is hosting:

image

@oising commented on GitHub (Oct 27, 2021): I think this probably belongs here, but my machine went to sleep and when it woke up, I have this: ![image](https://user-images.githubusercontent.com/1844001/139122481-ad981988-f4b3-491d-ad45-4048868f4437.png) The title in the task bar is "Command Prompt" and bizarrely, I **cannot close the window** -- i.e. alt+f4 or clicking on the "x" does nothing. More info -- it appears to have been spawned by svchost: ![image](https://user-images.githubusercontent.com/1844001/139122853-3ffb1f81-5918-4226-b9b7-f35a50f27c9c.png) This particular svchost is hosting: ![image](https://user-images.githubusercontent.com/1844001/139122955-c41dcae2-b52f-4746-9cca-667a623ceb29.png)
Author
Owner

@oising commented on GitHub (Oct 27, 2021):

So it seems to be something entirely Microsoft spawned -- the command line only has -Embedding on the end of the exe path. Nothing special.

Update: I spawned a tab to see if I had SYSTEM access (hahah) and thankfully it spawned under my creds. I noticed that once I had a single tab running, I was able to close the entire process.

@oising commented on GitHub (Oct 27, 2021): So it seems to be something entirely Microsoft spawned -- the command line only has `-Embedding` on the end of the exe path. Nothing special. Update: I spawned a tab to see if I had SYSTEM access (hahah) and thankfully it spawned under my creds. I noticed that once I had a single tab running, I was able to close the entire process.
Author
Owner

@Eveldee commented on GitHub (Nov 4, 2021):

Same issue using Syncthing, their doc recommends to create a startup task with options to disable the console: "C:\Program Files\Syncthing\syncthing.exe" -no-console -no-browser but on Windows 11 using Windows Terminal as default makes the console window visible instead of hiding it (works perfectly with conhost as default).

Syncthing

Edit: code responsible for hiding the console on Windows

@Eveldee commented on GitHub (Nov 4, 2021): Same issue using [Syncthing](https://github.com/syncthing/syncthing), their doc recommends to create a startup task with options to disable the console: `"C:\Program Files\Syncthing\syncthing.exe" -no-console -no-browser` but on Windows 11 using Windows Terminal as default makes the console **window visible** instead of hiding it (works perfectly with conhost as default). ![Syncthing](https://user-images.githubusercontent.com/28998091/140308244-099a8465-cb40-4e12-8033-04799a191c78.png) Edit: [code responsible for hiding the console on Windows](https://github.com/syncthing/syncthing/blob/f6375ecbfc652f7d4627c6c5bd8257530f1df5b5/lib/osutil/hidden_windows.go#L13)
Author
Owner

@silverqx commented on GitHub (Jan 29, 2022):

I have the same issue with more apps, eg Qt Maintenace Tool for windows opens a visible terminal, I let know about other apps when I discover which one opens these terminals.

@silverqx commented on GitHub (Jan 29, 2022): I have the same issue with more apps, eg Qt Maintenace Tool for windows opens a visible terminal, I let know about other apps when I discover which one opens these terminals.
Author
Owner

@silverqx commented on GitHub (Feb 20, 2022):

Ok, after a few weeks of use I can tell that the Qt Maintenance tool is only one application that opens a visible terminal window, I'm pretty sure that wterm behaves correctly and this will be Qt Maintenance Tool problem. Personally, I have not observed any wrong behavior of the wterm. 😁

@silverqx commented on GitHub (Feb 20, 2022): Ok, after a few weeks of use I can tell that the `Qt Maintenance tool` is only one application that opens a visible terminal window, I'm pretty sure that wterm behaves correctly and this will be `Qt Maintenance Tool` problem. Personally, I have not observed any wrong behavior of the wterm. 😁
Author
Owner

@silverqx commented on GitHub (Feb 20, 2022):

There still can be a problem that is described in this issue, I have not tested it with CoolerMaster MasterPlus like is described in the first post, but I have tested with dozens of applications that I'm using.

@silverqx commented on GitHub (Feb 20, 2022): There still can be a problem that is described in this issue, I have not tested it with `CoolerMaster MasterPlus` like is described in the first post, but I have tested with dozens of applications that I'm using.
Author
Owner

@Mayhem93 commented on GitHub (Feb 20, 2022):

I just realized the issue in my case is not present anymore. I don't know at what version it was fixed because I had conhost as default and somehow it automatically changed it to windows terminal without me knowing.

@Mayhem93 commented on GitHub (Feb 20, 2022): I just realized the issue in my case is not present anymore. I don't know at what version it was fixed because I had conhost as default and somehow it automatically changed it to windows terminal without me knowing.
Author
Owner

@zadjii-msft commented on GitHub (May 2, 2022):

Okay, I can confirm that this is seemingly fixed for CoolerMaster. Impossible to say if it was due to an OS-side defterm fix, a Terminal-side fix, or a CoolerMaster-side one.

The ShowWindow thing should have been fixed by #12515

Anything else that's in this bucket seems like it's probably a variant of /dup #12154. I'm gonna keep using that one to track it, since that's a little more narrowed down to the root cause.

Thanks all!

@zadjii-msft commented on GitHub (May 2, 2022): Okay, I can confirm that this is seemingly fixed for CoolerMaster. Impossible to say if it was due to an OS-side defterm fix, a Terminal-side fix, or a CoolerMaster-side one. The `ShowWindow` thing should have been fixed by #12515 Anything else that's in this bucket seems like it's probably a variant of /dup #12154. I'm gonna keep using that one to track it, since that's a little more narrowed down to the root cause. Thanks all!
Author
Owner

@ghost commented on GitHub (May 2, 2022):

Hi! We've identified this issue as a duplicate of another one that already exists on this Issue Tracker. This specific instance is being closed in favor of tracking the concern over on the referenced thread. Thanks for your report!

@ghost commented on GitHub (May 2, 2022): Hi! We've identified this issue as a duplicate of another one that already exists on this Issue Tracker. This specific instance is being closed in favor of tracking the concern over on the referenced thread. Thanks for your report!
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/terminal#15707