wezterm icon indicating copy to clipboard operation
wezterm copied to clipboard

Can't start.

Open uliano opened this issue 2 years ago • 5 comments

What Operating System(s) are you seeing this problem on?

Windows

Which Wayland compositor or X11 Window manager(s) are you using?

No response

WezTerm version

20230929-093024-5e0fd1a0

Did you try the latest nightly build to see if the issue is better (or worse!) than your current version?

Yes, and I updated the version box above to show the version of the nightly that I tried

Describe the bug

Launching both from start menu and windows terminal command line I get:

⚠️  Process "C:\WINDOWS\system32\cmd.exe" in domain "local" didn't exit cleanly
Exited with code 1.
This message is shown because exit_behavior="CloseOnCleanExit"

At first I suspected something wrong with cmd.exe which I don't normally use, despite apparently working right in any other context, so:

config.default_prog = {'C:\\Windows\\System32\\WindowsPowerShell\\v1.0\\powershell.exe'}

to no avail:

⚠️  Process "'C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe'" in domain "local" didn't exit cleanly
Exited with code 1.
This message is shown because exit_behavior="CloseOnCleanExit"

The same behaviour on both my windows 11 laptop and desktop (kept updated) so, at least, I seem to be consistent with some misconfiguration.

To Reproduce

No response

Configuration

default but for the line shown above

Expected Behavior

No response

Logs

07:37:08.124  ERROR  portable_pty::win::psuedocon > CreateProcessW `"C:\\WINDOWS\\system32\\cmd.exe\0"` in cwd `Some("C:\\Users\\uliano\0")` failed: The parameter is incorrect. (os error 87)
08:03:33.441  ERROR  portable_pty::win::psuedocon > CreateProcessW `"C:\\Windows\\System32\\WindowsPowerShell\\v1.0\\powershell.exe\0"` in cwd `Some("C:\\Users\\uliano\0")` failed: The parameter is incorrect. (os error 87)

Anything else?

No response

uliano avatar Sep 30 '23 06:09 uliano

Try with a different cwd in case there is something strange about that? eg: wezterm start --cwd c:/ or by setting https://wezfurlong.org/wezterm/config/lua/config/default_cwd.html differently in the configuration.

What might be strange for this on windows could be weird permission issues if you are blending admin and regular user tokens or sessions.

wez avatar Oct 01 '23 17:10 wez

I 've tried both from command line and by editing .wezterm.lua with either foraward and back slash (unsure as windows is weird) to the same end result.

As I didn't really get the last paragraph, I also tried to temporarily demote my account from administrator to standard without any useful result.

uliano avatar Oct 02 '23 06:10 uliano

Hello @wez,

My wezterm is exhibiting the same behaviour.

When I run the command wezterm start --cwd c:/ or wezterm start --cwd c:\ in a PowerShell:

D:\Apps\WezTerm>exit
PS D:\Apps\WezTerm> wezterm start --cwd c:/
18:48:28.372  ←[31mERROR ←[0m ←[1mportable_pty::win::psuedocon←[0m > CreateProcessW `"cmd.exe\0"` in cwd `Some("c:/\0")` failed: The system cannot find the file specified. (os error 2)
PS D:\Apps\WezTerm> wezterm start --cwd c:\
18:48:36.863  ←[31mERROR ←[0m ←[1mportable_pty::win::psuedocon←[0m > CreateProcessW `"cmd.exe\0"` in cwd `Some("c:\\\0")` failed: The system cannot find the file specified. (os error 2)
PS D:\Apps\WezTerm>

Also I'm on a version above the requirement: image

This behaviour is exhibited when I run it either as an extracted zip or setup.ext installation. Would really appreciate any pointers on what the problem might be - using wezterm no problem on my ubuntu machine.

Xirious avatar Dec 23 '23 16:12 Xirious

This still happens with both the standard and nightly setups. Any help here from anyone on this would be greatly appreciated. Wezterm is my favourite terminal on my Ubuntu (work) machine and I would really like to use it on my Windows machine.

Xirious avatar May 29 '24 14:05 Xirious

anyone got a fix yet? im getting the same thing when launching btop4win within wezterm

leastofthelords avatar May 23 '25 11:05 leastofthelords