I've installed Sublime Text 2 on my Ubuntu linux VM. The executable appears to be in /opt/sublime_text_2
.
When I click on sublime_text executable it opens a new terminal window and does not open sublime text.
If I enter from the terminal: /opt/sublime_text_2/sublime_text
a new terminal window pops up with the following:
#!/bin/bash
/opt/sublime_text_2/sublime_text --class=sublime-text-2 "$@"
and Sublime Text does not open
Best Answer
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
orUbuntu 32-bit
, depending on your system. After downloading, go to your Downloads directory in your terminal and runor
depending on the version you downloaded. It will install everything in
/opt/sublime_text
, will place asublime_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:
sudo rm -r /opt/sublime_text_2
to remove the old directory.Linux 32-bit
orLinux 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
orSublime Text 2.0.2x64.tar.bz2
) and runto unpack the archive and create a directory named
Sublime Text 2
.Run
to move the directory to the proper location and rename it to something without spaces.
Double-check that
/usr/local/bin
is in yourPATH
by runningthen create a
subl
shortcut by runningYou should now be able to start Sublime correctly from the command line.