Problem Description
When you create a symbolic link to start sublime text editor from command line in tmux, you get an error message:
1
| Unable to launch sublime text
|
This is due to tmux doesn’t have root access to the bin directory. The following steps fixed this issue for me on my Mac.
System Details and Application
OS:
Applications:
1 2
| Sublime Text 3 Tmux running from iTerm 2
|
Create Symbolic Link for Sublime Text 3
1
| ln -s /Applications/Sublime\ Text.app/Contents/SharedSupport/bin/subl /usr/local/bin/subl
|
Install a wrapper to handle subl -w in tmux
1
| brew install reattach-to-user-namespace
|
Add command to ~/.tmux.conf
1
| echo "set-option -g default-command \"reattach-to-user-namespace -l bash\"" >> ~/.tmux.conf
|
Restart the tmux server