microsoft / microsoft/terminal

Cannot run Windows Terminal as the same user from two different sessions

Open
#17,629 5 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Area-Remoting Issue-Bug Product-Terminal
Dominant language
C++
Stars
105k
Forks
9.6k
Avg merge
3d 17h
Merged PRs (30d)
29

Description

Windows Terminal version

1.20.11781.0

Windows build number

10.0.22631.0

Other Software

No response

Steps to reproduce
  1. Log on to user User1.
  2. Launch Windows Terminal.
  3. "Lock".
  4. Log on to user User2.
  5. (Optional: Launch Windows Terminal and see that it works.)
  6. Launch Windows Terminal as user User1.
    Ways to do it:
    1. While holding Shift, right-click on C:\Program Files\WindowsApps\Microsoft.WindowsTerminal_1.20.11781.0_x64__8wekyb3d8bbwe\wt.exe, pick Run as a different user, and enter credentials.
    2. From whatever command-line shell you like run runas.exe /user:User1 cmd.exe, enter credentials, and in the resulting cmd.exe instance run wt.exe.
    3. ... Any other way you like.
Expected Behavior

Launch.

The same as would have happened if we had closed Windows Terminal is the first TS session.

Actual Behavior
Screenshot 2024-07-30 190000
Important

Note that:

  • If we don't launch the first Windows Terminal, or if close it before attempting to launch the second instance, Windows Terminal would launch properly.
  • If the two sessions belonged to the same user (e.g. on a Windows server that's configured to allow multiple sessions for the same user) Windows Terminal would launch properly.
  • If we use the ZIP distribution of Windows Terminal, we can launch it as the same user from multiple sessions belonging to different users.
  • This is not an inherent limitation of apps distributed via the Microsoft Store or as MSIX outside the Microsoft Store, since WinDbg is distributed as an MSIX (https://windbg.download.prss.microsoft.com/dbazure/prod/1-2308-2002-0/windbg.msixbundle) and it can launch as the same user from different sessions belonging to different users and it works also with the older version of WinDbg that's on the Microsoft Store.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Reproduce the failure with Windows Terminal 1.20.11781.0 on Windows build 10.0.22631.0 using the listed runas.exe and wt.exe steps. Compare the MSIX installation with the ZIP distribution and verify that launching the same user from different sessions works while the first session remains active.

Written by the indexing model from the issue text.

Assessment

Tech stack
cpp
Domain
cli, operating-systems
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.