LoginSignup
9
9

More than 5 years have passed since last update.

tmuxのlaunchctlエラー対策

Posted at

Homebrewでインストールしたあと、自動起動させる設定をlaunchctlでロードしようとすると、tmuxではこんなエラーが出てくる。

% launchctl load -w ~/Library/LaunchAgents/homebrew.mxcl.mongodb.plist
Bug: launchctl.c:2425 (25957):13: (dbfd = open(g_job_overrides_db_path, O_RDONLY | O_EXLOCK | O_CREAT, S_IRUSR | S_IWUSR)) != -1
launch_msg(): Socket is not connected

この問題、pbcopyのときと同じ手法で解決できた。

.zshrc
if [[ "$TMUX" != "" ]]; then
  alias pbcopy="ssh 127.0.0.1 pbcopy"
  alias launchctl="ssh 127.0.0.1 launchctl"
fi
9
9
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
9
9