-
-
Notifications
You must be signed in to change notification settings - Fork 854
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
Wezterm-gui.exe still spawn a cmd on windows #5530
Comments
Not sure if it's only affecting me but both "official" scoop recipe spawn a cmd for me. reference: wezterm/wezterm#5530
Windows 10 user here, have both stable and nightly installed from scoop. No cmd prompt issue like mentioned above and no issues with wezterm -v either. The only time I can think of getting something like this is when I didn't know what a terminal emulator was and I was trying to launch Wezterm from Windows Terminal like it was a shell ? I'm sorry I can't reproduce with you and be more helpful. |
oh it's uppercase |
Can you make a screen cast of the double cmd happening? |
wezterm-nightly (from scoop) using the shortcut - the same happens from the start menu and the shortcut file directly so it's not related to my launcher, and I also tried stable 2024-06-10.16-33-18.2.mp4wezterm-nightly-mtb - see mentioned commit up here for more details but TLDR it's wrapped in a vbs 2024-06-10.16-41-12.2.mp4 |
Shouldn't this bin command here be pointing at wezterm-gui.exe?
|
I didn't try but I'm guessing wezterm-gui has the same purpose as wrapping it using vbs: not spawning an owning terminal on launch. It partially works for me as the terminal doesn't "own" when using the gui variant but it's still spawned. I don't know windows enough to understand what could be causing it honestly and it's not the first time I had to "VBS wrap" a program |
Also, can you show us your wezterm config and how you have your default domains setup? |
Oh ok I misunderstood your message.
For sure it's really short: local wezterm = require("wezterm")
local config = wezterm.config_builder()
local function getOS()
-- ask LuaJIT first
if jit then
return jit.os
end
-- Unix, Linux variants
local fh, err = assert(io.popen("uname -o 2>/dev/null", "r"))
if fh then
Osname = fh:read()
end
return Osname or "Windows"
end
config.color_scheme = "rose-pine"
config.adjust_window_size_when_changing_font_size = false
config.automatically_reload_config = true
config.color_scheme = "AdventureTime"
config.enable_kitty_keyboard = false
config.window_background_opacity = 1.0
config.hide_tab_bar_if_only_one_tab = true
config.window_decorations = "RESIZE"
if getOS() == "Windows" then
config.font = wezterm.font("FiraCode Nerd Font")
end
config.default_prog = {
"nu",
}
wezterm.log_info("Loaded config")
return config
Kore wa nan desu ka? Sorry not super familiar with windows, |
Ah so the .vbs is a virtualized container then right? This looks like you are trying to use the multiplexing features and need to setup either a unix or ssh domain to this to work correctly I think? Have you read through this stuff? I don't use wezterm this way with my PC so I can't help much beyond knowing that this is where the docs are. I am sorry! @wez am I wrong in thinking that they need to ssh (and setup an ssh domain in their config?) into the localhost server that appears to be launching? |
Interesting, I did not, I will read it, I was wondering what this local server was about! |
One last question...Is the goal to have wezterm launch on startup? Do you want wezterm to be vbs wrapped or is that a solution you were trying to create? If you are just trying to get a terminal launched on startup on windows you can type shell:startup into the Run prompt. and in the explorer window that pops up after you hit enter, you can add programs that launch on startup. This is where I put a copy of the wezterm-gui.exe shortcut. |
Not really, I'm just trying to open wezterm "manually" as seen in my "working" screencast. |
I launch wezterm from komorebi with this keybind. I am sorry for misunderstanding the ultimate goal. Now...this is pwsh doing it in the background, but it launches it regardless if im using a bash shell, pwsh, etc inside of wezterm. alt + return : if ($wshell.AppActivate('Wezterm') -eq $False) { Start-Process "C:\Users\ARK010\scoop\apps\wezterm-nightly\current\wezterm-gui.exe" } |
Regarding flashing open a terminal window on startup, it's possible that your FWIW, you can replace your If you did still want to run |
If you still see weird and extraneous terminal windows, I would suggest uninstalling it via scoop and instead installing via the official installer at https://wezfurlong.org/wezterm/install/windows.html |
Thanks @akthe-at for proposing suggestions! I will close this issue as I feel it's user error and I just had it happen with a GUI app not installed through scoop so I'm guessing something is fishy in my OS/settings... If I ever find a solution I'll comment here for googlers! Thanks again PS: I really enjoy Wezterm, somehow I overlooked it more than once :) |
For anyone coming here from google, I found why I had this and it's probably the same for you: You use Windows Terminal as the default terminal but set it up to not close on exit... whereas cmd.exe does by default. I was using |
I'm going to lock this issue because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues. If you have found a problem that seems similar to this, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further. |
What Operating System(s) are you seeing this problem on?
Windows
Which Wayland compositor or X11 Window manager(s) are you using?
WezTerm version
wezterm 20240607-175437-eb26a5da
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
btw wezterm -v doesn't work anymore
I tried both the nightly and stable scoop recipes of wezterm and they both spawn 2 cmd before running wezterm (that immediatly exits after spawning wezterm).
I thought the issue was about how the recipes were packaged but after digging a bit more, and making my own recipe targeting wezterm.exe instead of wezterm-gui.exe I understood the initial goal of this separate binary yet it still spawns cmd.
When using wezterm.exe the spawning terminal is "owning" wezterm at least that's not the case with wezterm-gui.exe but I would still like to avoid having to close 2 cmd each time I open wezterm
To Reproduce
Configuration
no config
Expected Behavior
Running wezterm-gui.exe shouldn't spawn cmd on windows.
After posting this issue I'm going to try and wrap wezterm.exe into a vbs script, that's what I'm using to run komorebi already that had the same issue.
Logs
No response
Anything else?
No response
The text was updated successfully, but these errors were encountered: