Basically, your problem is that you're using a wrong article :) If it was on an SE site I would down-vote it.
Manually copying stuff which does not come from Ubuntu repositories into /usr
is WRONG. This directory is managed by Ubuntu's package manager and messing with it is going to cause you trouble at some point or another - for example, the next time you upgrade your system Sublime will likely be removed without a trace.
Running the program as root is even wronger, especially in the case of SublimeText which has its own package manager which basically downloads stuff from Internet and lets it run on your computer. A simple typo in a plugin could destroy all data on your machine.
A proper solution, if you want to install the program system-wide, would be to find/build a .deb file and install it - this way package manager would be aware of the package. Webupd8 maintains a PPA for SublimeText2, so you can just use that.
However, there's a much lazier solution which I am personally using - just unpack SublimeText somewhere in your home directory, create a bin
directory in your home directory and symlink sublime_text
executable into that directory:
mkdir ~/bin
ln -s ~/wherever/sublime/is/sublime_text ~/bin
After which you'll be able to run Sublime Text by typing sublime_text
in the console, from any directory. This does not require root privileges at all and the editor runs just fine.
The article also does some shell integration, such as registering sublime_text as a default editor and adding an icon, and I was too lazy to do that - however, I'm sure that it can be done without messing with system-wide settings.
This does not explain, however, the problems with permissions you're having - SublimeText stores all its settings in your home folder anyway, so even if you installed it system-wide it should not have problems. What probably happened is that you started it the first time with superuser privileges (i.e. from the sudo shell), so the editor's config directory (in ~/.config/sublime-text-2
) is owned by root
now. You need to do something like
sudo chown -R yourusername:yourusername /home/yourusername/.config/sublime-text-2
to fix this.