wez / wezterm

A GPU-accelerated cross-platform terminal emulator and multiplexer written by @wez and implemented in Rust
https://wezfurlong.org/wezterm/
Other
16.96k stars 763 forks source link

bug: `ERROR window::os::wayland::frame > Unable to set cursor to left_ptr` on start #4604

Closed gabyx closed 5 months ago

gabyx commented 10 months ago

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

Linux Wayland

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

sway 1.8.1

WezTerm version

20230712-072601-f4abf8fd

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

wezterm start -- zsh -c top

from an already opened wezterm inside sway starts wezterm in a new window but does not launch top. It just enters the shell...

To Reproduce

wezterm start --always-new-process  -- zsh -c top

Configuration

-- Pull in the wezterm API
local wezterm = require("wezterm")
local act = wezterm.action
local mux = wezterm.mux

-- This table will hold the configuration.
local config = {}

-- In newer versions of wezterm, use the config_builder which will
-- help provide clearer error messages
if wezterm.config_builder then
    config = wezterm.config_builder()
end

wezterm.on("gui-startup", function()
    local tab, pane, window = mux.spawn_window({})
    window:gui_window():maximize()
end)

-- This is where you actually apply your config choices
config.color_scheme = "Cobalt2"
config.font = wezterm.font_with_fallback({
    { family = "JetBrainsMono Nerd Font", weight = "Bold" },
})
config.font_size = 12
config.window_decorations = "RESIZE"
config.hide_tab_bar_if_only_one_tab = true

config.enable_kitty_keyboard = true
config.debug_key_events = true -- Start `wezterm start --always-new-process` to see the keys
config.disable_default_key_bindings = true

config.leader = { key = "n", mods = "CTRL", timeout_milliseconds = 1000 }
config.keys = {
    -- Copy
    { key = "c", mods = "SHIFT|CTRL", action = act.CopyTo("Clipboard") },
    -- { key = "c", mods = "SUPER", action = act.CopyTo("Clipboard") },

    -- Paste
    { key = "v", mods = "SHIFT|CTRL", action = act.PasteFrom("Clipboard") },
    -- { key = "v", mods = "SUPER", action = act.PasteFrom("Clipboard") },

    -- Leader stuff
    { key = "p", mods = "LEADER",     action = act.ActivateCommandPalette },
    { key = "n", mods = "LEADER",     action = act.SpawnWindow },
}

-- and finally, return the configuration to wezterm
return config

Expected Behavior

top should be launched inside the new terminal. Instead the terminal starts a new zsh but not zsh -c top.

Logs

No response

Anything else?

No response

vimpostor commented 10 months ago

Can't reproduce with the exact same version, for me both wezterm start -- zsh -c top and wezterm start --always-new-process -- zsh -c top work correctly.

gabyx commented 10 months ago

OK sometimes it works: And sometimes I get: with --always-new-process ans without it:

02:03:25.079  ERROR  window::os::wayland::frame > Unable to set cursor to left_ptr: cursor not found                        warning: queue 0x55c959b41280 destroyed while proxies still attached:
  wl_shm_pool@53 still attached
  zwp_primary_selection_offer_v1@4278190083 still attached
  wl_data_offer@4278190081 still attached
  wl_data_offer@4278190080 still attached
  wl_subsurface@50 still attached
  wl_surface@49 still attached
  wl_subsurface@48 still attached
  wl_surface@47 still attached
  wl_subsurface@46 still attached
  wl_surface@45 still attached
  wl_subsurface@44 still attached
  wl_surface@43 still attached
  wl_subsurface@42 still attached
  wl_surface@41 still attached
  xdg_wm_base@23 still attached
  wl_surface@22 still attached
  wl_data_device@19 still attached
  wl_pointer@17 still attached
  zwp_text_input_v3@16 still attached
  wl_keyboard@15 still attached
  zwp_primary_selection_device_v1@14 still attached
  zwp_primary_selection_device_manager_v1@3 still attached
  wl_data_device@13 still attached
  wl_output@12 still attached
  wl_output@11 still attached
  wl_seat@10 still attached
  zwp_text_input_manager_v3@9 still attached
  zxdg_decoration_manager_v1@8 still attached
  wl_data_device_manager@7 still attached
  wl_subcompositor@6 still attached
  wl_compositor@5 still attached
  wl_shm@4 still attached
  wl_registry@2 still attached

So probably a startup problem??

gabyx commented 10 months ago

think this is still a problem:

https://github.com/wez/wezterm/issues/2687#issuecomment-1327508765

I am on NixOS and Sway

grappas commented 10 months ago

wezterm start --always-new-process -- /bin/zsh -c top

Works for me: obraz

wezterm start -- /bin/zsh -c top

Also works.

wez commented 5 months ago

Probably fixed in main by https://github.com/wez/wezterm/pull/5276. Please try it out and re-open if it is not resolved.

github-actions[bot] commented 3 months ago

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.