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

csudo doesn't work in WSL #1583

Closed
ringosham opened this Issue May 27, 2018 · 7 comments

Comments

Projects
2 participants
@ringosham

ringosham commented May 27, 2018

Versions

ConEmu build: 180506 preview x64
OS version: Windows 10 16299.431 x64
Used shell: WSL and powershell

Problem description

csudo does not launch consent.exe (does not elevate) when executed in WSL. This worked in the stable build, however.
On powershell (or maybe cmd as well, but untested), GUI applications launch within ConEmu which look bizzare.

Steps to reproduce

  1. Open WSL or powershell
  2. cmd.exe /c 'C:\Program Files\ConEmu\ConEmu\csudo.cmd' notepad.exe

Expected results

In WSL, consent.exe should ask for admin permission and launches notepad with admin.
In powershell, notepad should launch in a new window

Actual results

WSL skips consent.exe and opens notepad at user prvileges
Notepad opens within the ConEmu window if executed in powershell.

Additional information

The issue with consent.exe not launching is due to Cygwin/Msys connector. After removing the launch arguments in the {bash} task, the problem disappears. But launching Windows GUI programs within WSL still appears within the ConEmu Window.

This is tested in Quake mode.

Screenshot

screenshot 7

@Maximus5

This comment has been minimized.

Owner

Maximus5 commented May 27, 2018

WSL: ConEmuC started under WSL can't find appropriate GUI window. I may check that and this probably may be fixed.

Powershell: Notepad is started under Admin credentials. Expected behavior, I don't see the problem.

@Maximus5

This comment has been minimized.

Owner

Maximus5 commented May 27, 2018

@ringosham

This comment has been minimized.

ringosham commented May 27, 2018

Notepad did start under admin credentials in PowerShell, but GUI apps should open in a new window, not within the ConEmu window.
Complex applications like Wordpad would instantly crash if launched this way.

@Maximus5

This comment has been minimized.

Owner

Maximus5 commented May 27, 2018

Nope. When you run ChildGui with -new_console switch you tell ConEmu to run this ChildGui inside ConEmu.
By design.

@ringosham

This comment has been minimized.

ringosham commented May 27, 2018

Oh, now I see. I didn't use much of the features here so I didn't notice that's a thing. Woops.

@ringosham ringosham changed the title from csudo doesn't work in WSL and glitches with powershell to csudo doesn't work in WSL May 27, 2018

@Maximus5 Maximus5 added hooks processes and removed hooks labels May 28, 2018

@Maximus5 Maximus5 added this to To Do in ConEmu via automation May 28, 2018

Maximus5 added a commit that referenced this issue May 28, 2018

gh-1583: Let `-new_console` work in WSL.
  Note: `ConEmuC.exe` or `ConEmuC64.exe` are required to run commands,
  for example: `ConEmuC64.exe -c powershell -new_console`.

@Maximus5 Maximus5 moved this from To Do to Ready for Testing in ConEmu May 28, 2018

@ringosham

This comment has been minimized.

ringosham commented May 29, 2018

Just updated to the latest version. Generally having no problems, but is it possible to launch GUI apps outside of tabs using csudo?

@Maximus5

This comment has been minimized.

Owner

Maximus5 commented May 29, 2018

Via cmd start notepad.exe

@Maximus5 Maximus5 closed this May 29, 2018

ConEmu automation moved this from Ready for Testing to Done May 29, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment