terminal
terminal copied to clipboard
Allowing headless mode (running in the background) prevents Windows Terminal from opening again
Windows Terminal version
1.22.11141.0
Windows build number
10.0.26100.0
Other Software
No response
Steps to reproduce
- Open Windows Terminal
- Go to Settings > Compatibility, and turn on "Allow Windows Terminal to run in the background"
- Alternatively, open settings.json and set
"compatibility.allowHeadless": true
- Alternatively, open settings.json and set
- Save settings
- Close Windows Terminal
- Attempt to open Windows Terminal
Expected Behavior
Windows Terminal opens
Actual Behavior
Windows Terminal does not open
In order to get out of this situation, I need to do one of the following:
Option 1
- Reboot my PC
- Open Windows Terminal (this will only work for the first attempt after booting)
- Go to Settings > Compatibility, and turn off "Allow Windows Terminal to run in the background"
- Save settings
Option 2
- Open settings.json and set
"compatibility.allowHeadless": false - Reboot my PC (importantly, this must be done after disallowing headless mode)
I suspect that the issue is that, after allowing headless mode, there is a background process for Windows Terminal running. The fact that this process is running prevents any new Windows Terminal windows from opening. However, I can't figure out which background process is responsible.
That background process is likely WindowsTerminal.exe.
We don't have any other background processes in that mode. :)
I searched for "terminal" in Task Manager processes, and didn't find anything, but I still couldn't open Windows Terminal
It's WindowsTerminal. Not just Terminal!
If it isn't running, you don't have headless mode. :)
When I first tried this, I searched for both "terminal" and "windowsterminal", and nothing showed up. Somehow, I do now see WindowsTerminal.exe in Task Manager when I didn't before. Can't seem to upload a screen capture directly to GitHub, but I uploaded it to Google Drive: https://drive.google.com/file/d/1AeIwSi0Z0h5u9ERfhxxNT7h377F4tzwO/view?usp=sharing
Anyways, it isn't a very good experience to end up in this terminal (no pun intended😛) state with no clear indication as to why Terminal won't open anymore. Sure, I can get myself out of it by ending the process, but other users might not know the exact process name to search for.
@oliver-leung try press SHIFT when clicking on LNK
Curious, do you also have "windowingBehavior": "useExisting" in your settings.json (tracking that over in #18827)? If not, can you share a copy of your settings.json file /?
@Zeroes1 Holding down Shift and clicking on the .lnk doesn't work, unfortunately.
@carlos-zamora That's it! I actually had "windowingBehavior": "useAnyExisting", which wasn't mentioned in #18827, but it seems that both "useAnyExisting" and "useExisting" prevent Terminal from reopening. "useNew" was the only option that allowed me to reopen Terminal.
Is the "useAnyExisting" case addressed in #18623? If so, I'm fine to close out this issue 👍
Great! I'll close this out as a /duplicate of #18827. And good feedback, I'll update that bug title to be more clear since it looks like quite a few people are hitting this scenario. 😊
Is the
"useAnyExisting"case addressed in #18623?
Ah, so that one's on me. It was "fixed" as a part of the big windowing refactor started in #18215 which is available in v1.23.10732.0 (the current Preview channel). We're planning on promoting 1.23 to the stable channel, but we still have a few more fixes in this area we want to do before promoting it.
#18827 tracks doing a servicing fix for 1.22 in the meantime.
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!