microsoft / microsoft/sudo

sudo always opens a new window by Console Host (ConHost)

Open
#129 2 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

Issue-Bug Needs-Triage
Dominant language
Rust
Stars
5.9k
Forks
180
Avg merge
1d 7h
Merged PRs (30d)
2

Description

Sudo for Windows version

sudo 1.0.1

Windows build number

10.0.26100.0

Other Software

No response

Steps to reproduce
Image
  1. Windows Settings → System → For developers
    1. Set "Terminal" to "Windows Terminal"
    2. Toggle "Enable sudo" on
    3. Set "Configure how sudo runs applications" to "In a new window"
  2. Run a command with sudo
Expected Behavior

Open a new Windows Terminal window.
sudo used to adopt this behavior.

Actual Behavior

It always uses Console Host. It does not respect the value "Terminal" in the Settings.
Console Host halts running applications just by clicking its screen. This behavior is not compatible with management commands/software. Do not use it.

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

Start by reproducing the reported behavior with Windows Settings configured to use Windows Terminal and sudo set to open a new window. Trace the Windows implementation that selects the host application, then verify that the configured Terminal is used instead of Console Host when the setting is enabled.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust
Domain
cli, operating-systems
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Active
Clarity
Mostly clear
Newbie friendliness
65/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.