I believe this is a fix of the sublime-won't-start problem: link.
Basically what it does is - it reverts the Sublime to its initial state by removing your data (and configuration) folder, which is in one of the following paths, depending on your operating system:
- OS X: ~/Library/Application Support/Sublime Text 2
- Windows: %APPDATA%\Sublime Text 2
- Linux: ~/.config/sublime-text-2
So you just exit Sublime editor, delete the data folder (or back it up somewhere, for future needs) and then restart Sublime.
That will make Sublime work again - so then you can try redoing your steps and see what actually went wrong. At least it worked that way for me.
I'd suggest re-installing Sublime Text from scratch. I highly recommend using Sublime Text 3, as it has many new features and bug fixes that aren't in ST2, and many plugins available through Package Control are moving to ST3-only versions to take advantage of the additional features. Also, ST3 is available as a .deb
for Ubuntu, making installation a 1-step process.
To install ST3, go to the download page and select Ubuntu 64-bit
or Ubuntu 32-bit
, depending on your system. After downloading, go to your Downloads directory in your terminal and run
sudo dpkg -i sublime-text_build-3059_amd64.deb
or
sudo dpkg -i sublime-text_build-3059_i386.deb
depending on the version you downloaded. It will install everything in /opt/sublime_text
, will place a sublime_text.desktop
file in /usr/share/applications
(and put an icon in the Unity launcher, IIRC), and will also create /usr/bin/subl
for starting Sublime from the command line.
If for some reason you absolutely need to use ST2, then reinstall by following these steps:
- run
sudo rm -r /opt/sublime_text_2
to remove the old directory.
- Go to http://www.sublimetext.com/2 and download either the
Linux 32-bit
or Linux 64-bit
file, depending on your system.
In your terminal, determine the name of the file you downloaded (either Sublime Text 2.0.2.tar.bz2
or Sublime Text 2.0.2x64.tar.bz2
) and run
tar jxvf "Sublime Text 2...tar.bz2"
to unpack the archive and create a directory named Sublime Text 2
.
Run
sudo mv "Sublime Text 2" /opt/sublime_text_2
to move the directory to the proper location and rename it to something without spaces.
Double-check that /usr/local/bin
is in your PATH
by running
echo $PATH
then create a subl
shortcut by running
sudo ln -s /opt/sublime_text_2/sublime_text /usr/local/bin/subl
You should now be able to start Sublime correctly from the command line.
Best Answer
update 2020-06-27:
gksu
is deprecated and has been removed for security concerns. see I need an equivalent of gksu in 18.04long story short:
note that the
sudo -H
is simple enough but it suffers the same security issues asgksu
. better option (for reasons beyond my understanding) would bepkexec
. there's alsoadmin://
protocol but it didn't work for me with sublime.