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
Can not launch a different domain tab from CLI #3907
Comments
Relocate the helper function to mux-server-impl and have both the GUI and the mux server call it at the appropriate times. Introduce default_mux_server_domain which is used instead of default_domain in the mux server. This is to avoid recursive cycles when starting up the mux; we don't want the default domain to be a unix client that connects to our selves because we'll try to connect to ourselves, then in act of handling that spawn in the default domain and try to connect to ourselves and repeat. refs: #3907
This should be resolved now in It typically takes about an hour before commits are available as nightly builds for all platforms. Linux builds are the fastest to build and are often available within about 20 minutes. Windows and macOS builds take a bit longer. Please take a few moments to try out the fix and let me know how that works out. You can find the nightly downloads for your system in the wezterm installation docs. If you prefer to use packages provided by your distribution or package manager of choice and don't want to replace that with a nightly download, keep in mind that you can download portable packages (eg: a If you are eager and can build from source then you may be able to try this out more quickly. |
wezterm.on("update-status", function(window, pane)
local status_str = ""
local ok, domain_name = pcall(function()
return pane:get_domain_name()
end)
if not ok then
log("not ok")
else
log("domain_name: " .. domain_name)
end
log("active_workspace: " .. window:active_workspace())
if ok and domain_name then
status_str = pane:get_domain_name() .. ":" .. window:active_workspace()
end
log("active_workspace: " .. window:active_workspace())
log("status_str: " .. status_str)
window:set_left_status(status_str)
end) rather than |
Your gui instance is using its |
Ok. I'll probably need to find a solution to displaying the remote domain name maybe in a discussion on matrix chat. But the fix works. Tested with
Thanks for the fix! This bug can be closed now. |
I am observing some strange interaction with a json I store/load into a global variable that has nothing to do with domains. If I load it, it makes the scoped domain disappear and throw this (redacted) error.
The code is doing this -- Load JSON data from a file
function load_json(file)
local ok, f = pcall(io.open, file, "r")
if not ok then
return nil, nil
end
if not f then
return nil, nil
end
local text = f:read "*a"
f:close()
local ok, val = pcall(wezterm.json_parse, text)
if not ok then
print "Error parsing json"
print(val)
end
return ok, val
end
if wezterm.GLOBAL.WALLPAPER == nil then
local ok, val = load_json(WALLPAPER_SETTINGS_DB) -- json file path
if ok and type(val) == "table" then
-- if this branch is taken the bug appears
wezterm.GLOBAL.WALLPAPER = val -- utils.table.deepclone(val) does not help either
else
-- if this branch is taken then everything is fine
wezterm.GLOBAL.WALLPAPER = {}
end
end The loaded json has this structure
|
most likely there is a lua syntax error and your config file is not being parsed by the mux server |
Ah, thanks for that hint. I had an overloading of |
Closed too soon. Still investigating that. |
Thanks. Everything works now! |
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?
Linux Wayland
Which Wayland compositor or X11 Window manager(s) are you using?
Whatever is the default on KDE/Plasma Fedora 38
WezTerm version
20230530-062729-95e44f21
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
From the matrix room discussion of Jun 2, 2023:
I use the
unix_domains
by default. When trying to launch a memory hungry program, I am trying to launch it from one of theunix_domains
windows as a separate systemd scoped tab using the example code from https://wezfurlong.org/wezterm/config/lua/ExecDomain.html#example-running-commands-in-their-own-systemd-scope .If I use it via the launch menu mechanism using
config.launch_menu = {
{
label = "vim (systemd scoped)",
args = { "vim" },
domain = { DomainName = 'scoped' },
},
}
it works just fine. I get a new tab running in
scoped
domain in the same wezterm GUI window.When I try to use the CLI instead
it fails with
To Reproduce
pkill -9 wezterm\*
wezterm
wezterm cli spawn --domain-name scoped vim
. Observer that it does not work and throws an error.Configuration
Expected Behavior
It should work from the CLI just like it works from the launch menu.
Logs
There is nothing in the logs around this.
Anything else?
No response
The text was updated successfully, but these errors were encountered: