Home Download Buy Blog Forum Support

ST3 - 'subl' Error: Unable to launch Sublime Text

ST3 - 'subl' Error: Unable to launch Sublime Text

Postby nickrm on Sat Aug 31, 2013 8:22 pm

I updated to ST3 today on Mac OSX and tried to symlink the 'subl' (ln -s /Applications/Sublime\ Text.app/Contents/SharedSupport/bin/subl /usr/local/bin/subl) everything looks good except that when I try to use `subl .` it says `Unable to launch Sublime Text`.

But I can see the help dailog using `subl --help`.

Any help appreciated.

Thanks.
nickrm
 
Posts: 1
Joined: Sat Aug 31, 2013 8:18 pm

Re: ST3 - 'subl' Error: Unable to launch Sublime Text

Postby brewster1134 on Wed Apr 02, 2014 6:47 pm

BUMP.
This is happening to me as well. Not sure if it is a Sublime Text issue, or an OS X issue.
brewster1134
 
Posts: 1
Joined: Wed Apr 02, 2014 6:46 pm

Re: ST3 - 'subl' Error: Unable to launch Sublime Text

Postby darenpmeyer on Wed Jan 28, 2015 7:32 pm

On recent versions of OS X (Mavericks & Yosemite were what I tested), the `subl` command communicates with a running instance of Sublime Text 3.

Start Sublime Text 3 in the usual way (from Finder/Spotlight/whatever), then try using the `subl` command, and it should work.

Here's the script I use:
Code: Select all
#!/usr/bin/env bash
sublimeDir="/Applications/Sublime Text.app"
sublimeBin="/Contents/SharedSupport/bin/subl"

# try launch, if fails, start sublime text and try again
if ! "${sublimeDir}/${sublimeBin}" $* 2>/dev/null; then
   if ! open -j "${sublimeDir}"; then
      echo "Are you in a screen or tmux session?"
      exit $?
   fi
   sleep 1
   "${sublimeDir}/${sublimeBin}" $*
fi
darenpmeyer
 
Posts: 1
Joined: Wed Jan 28, 2015 7:29 pm


Return to Technical Support

Who is online

Users browsing this forum: Exabot [Bot] and 20 guests