Skip to content
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

Environment variable setup causes error with tmux #139

Closed
pearofducks opened this issue Apr 13, 2012 · 3 comments
Closed

Environment variable setup causes error with tmux #139

pearofducks opened this issue Apr 13, 2012 · 3 comments

Comments

@pearofducks
Copy link

if [[ "$OSTYPE" == darwin* ]]; then
  for env_var in PATH MANPATH; do
    launchctl setenv "$env_var" "${(P)env_var}" &!
  done
  unset env_var
fi

This block (from init.zsh) is causing launchctl to throw launch_msg("SetUserEnvironment"): Socket is not connected when tmux is launched.

If I'm reading things right, this helper is intended to set up environment variables. But I diff'd my env output with and without it, and there's no difference.

@sorin-ionescu
Copy link
Owner

That sets environment variables for GUI applications.

@ColinHebert knows more about that error.

Be aware that tmux can, and probably will, give you kernel panics on Mac OS X.

@ColinHebert
Copy link
Contributor

This issue is fixed on Mac OS when you use ChrisJohnsen/tmux-MacOSX-pasteboard. You can install it with homebrew (reattach-to-user-namespace).

You then have to change your tmux.conf to add :

set-option -g default-command "reattach-to-user-namespace -l $SHELL -l"

@pearofducks
Copy link
Author

Hmm...been using tmux for a while (though with bash), and haven't had a KP yet. We'll see if I get one now!

Thanks for the help. :)

lildude pushed a commit to lildude/prezto that referenced this issue Jan 12, 2014
krig added a commit to krig/prezto that referenced this issue Oct 24, 2015
* prompt/external/pure 0421252...dec0253 (26):
  > Update oh-my-zsh instructions
  > 1.2.0
  > Bump zsh-async to 1.0.0, prevents mixed stdout/stderr
  > Merge pull request sorin-ionescu#153 from sindresorhus/preprompt-update-fix
  > Merge pull request sorin-ionescu#149 from mafredri/pure-nitro
  > Close sorin-ionescu#147 PR: Preserve preprompt on Ctrl+L. Fixes sorin-ionescu#145
  > Remove cr from prompt_opts, fixes sorin-ionescu#127
  > Merge pull request sorin-ionescu#142 from zmwangx/string-length-fix
  > Merge pull request sorin-ionescu#144 from zmwangx/rename-prompt-to-preprompt
  > Default to 0 for git rev-list left and right. Fixes sorin-ionescu#137.
  > Close sorin-ionescu#140 PR: Add git arrows customization. Fixes sorin-ionescu#139.
  > 1.1.1
  > Disable prompt expansion for running command
  > Merge pull request sorin-ionescu#130 from zmwangx/rename-variables-for-readability
  > Use standard `[[ ]]` for conditional and add clarifications
  > fix: do the PURE_GIT_PULL check in the correct place
  > 1.1.0
  > Close sorin-ionescu#124 PR: Show hostname in terminal title if session is over ssh.
  > Merge pull request sorin-ionescu#125 from sindresorhus/dirty-check
  > import bug-fix release from zsh-async, fixes async job flushing
  > readme: faq clarificaitons
  > readme: add zpty error to faq with explanation and potential solutions
  > readme: update instructions for antigen and oh-my-zsh. remove incompatible async.plugin.zsh
  > use cd -q to prevent hooks from firing
  > prevent git status leakage when testing if dirty
  > fix paths that are split due to spaces in directory names
lildude pushed a commit to lildude/prezto that referenced this issue Jan 9, 2016
kodelint pushed a commit to kodelint/prezto that referenced this issue Nov 15, 2016
RIT80 pushed a commit to RIT80/prezto that referenced this issue Jan 25, 2022
Fixed an issue with the phing plugin
RIT80 pushed a commit to RIT80/prezto that referenced this issue Jan 25, 2022
RIT80 added a commit to RIT80/prezto that referenced this issue Jan 25, 2022
Fixed an issue with the phing plugin
RIT80 added a commit to RIT80/prezto that referenced this issue Jan 25, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants