-
Notifications
You must be signed in to change notification settings - Fork 8.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Running as a default terminal causes app to create terminal window #11627
Comments
@miniksa Add this to the list of "things that spawn a visible console window (and therefore launch into defterm) when they ideally shouldn't" |
I also want to add that this only happens with MasterPlus on my machine, the others don't create any visible windows terminal |
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 |
That doesn't seem right, I thought we fixed that. Can you share your |
Might be easiest to diagnose your issues with the whole |
{
"$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"
} |
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) |
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 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 |
I think this probably belongs here, but my machine went to sleep and when it woke up, I have this: 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: This particular svchost is hosting: |
So it seems to be something entirely Microsoft spawned -- the command line only has 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. |
Same issue using Syncthing, their doc recommends to create a startup task with options to disable the console: |
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. |
Ok, after a few weeks of use I can tell that the |
There still can be a problem that is described in this issue, I have not tested it with |
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. |
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 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! |
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! |
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:
Then a windows terminal window appears:
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.
The text was updated successfully, but these errors were encountered: