wez / wezterm

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

gui-sock-$PID socket handling errors #4417

Open Enr1g opened 9 months ago

Enr1g commented 9 months ago

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

Linux X11

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

i3

WezTerm version

20231004-113117-11dec45f

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

First of all, thank you for wezterm.

Back to the subject. New wezterm process creates a unix socket in /run/user/$UID/wezterm. I encountered the following bugs / features related to this:

$ WEZTERM_UNIX_SOCKET="" wezterm cli --class='wtf-class' list
09:56:51.110  ERROR  wezterm > failed to connect to Socket("/run/user/1000/wezterm/gui-sock-1173356"): connecting to /run/user/1000/wezterm/gui-sock-1173356; terminating
$ WEZTERM_UNIX_SOCKET="" wezterm cli --class='wtf-class' list
09:54:28.130  WARN   wezterm_client::client > While connecting to Socket("/run/user/1000/wezterm/sock"): connecting to /run/user/1000/wezterm/sock.  Will try spawning the server.
09:54:28.130  WARN   wezterm_client::client > Running: "/usr/bin/wezterm-mux-server" "--daemonize"
...

Starting another process is not something I was expecting when running the list command.

To Reproduce

No response

Configuration

no config

Expected Behavior

No response

Logs

No response

Anything else?

No response

ryoppippi commented 1 month ago

same

ryoppippi commented 3 weeks ago

I got the same issue.

When I run wezterm cli spawn with sudo, it works... I'm using macOS with wezterm 20240203-110809-5046fc22