I get the following error when I start a new session in tmux:
launch_msg("SetUserEnvironment"): Socket is not connected
launch_msg("SetUserEnvironment"): Socket is not connected
My info:
Tmux still launches and I haven't had any huge issues, but I'm hoping to get some insight into why this occurs. I've heard installing tmux-MacOSX-pasteboard "fixes" this message, but I'd rather not install a wrapper if I don't need it's features.
That error message comes from launchctl when its setenv
command has (apparently) failed to talk to launchd.
tmux does not automatically use launchctl, so you will have to dig into your specific configuration to find the source of the launchctl usage. My guess is that you are have one or more launchctl setenv …
in your shell initialization files.
If you do not care that the launchctl invocations are failing, you could just suppress the error message by sending stderr to /dev/null
:
launchctl setenv somevar somevalue 2>/dev/null
I had never heard of this particular application for my wrapper, but it does seem to fix the problem (at least here under 10.6).
If you need your launchctl invocations to succeed, then you do need the wrapper’s functionality (it is not just for pasteboard access; it can help with any functionality that requires access to a service in the “per-user bootstrap namespace”). If you do not want to run your shells “under the wrapper” (as described in its README), then you could run just the individual launchctl invocations under it:
/path/to/reattach-to-user-namespace launchctl setenv somevar somevalue
It appears that the wrapper can be easily installed via MacPort, and Homebrew:
port install tmux-pasteboard
(MacPorts)brew install reattach-to-user-namespace
(Homebrew)If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With