Nerdier

Adjective: Comparative form of nerdy: more nerdy.

Sublime Text 2

How to setup Sublime Text 2 on Ubuntu with a pretty unity sidebar icon. I figured this out and made a guide for my benefit before I found out there was a ppa. Oh well!


Change to the directory you want to keep it in.

cd /opt

Wget the latest version – http://www.sublimetext.com/2

wget http://c758482.r82.cf2.rackcdn.com/Sublime%20Text%202.0.1%20x64.tar.bz2

Unpack/make tidy

sudo tar -xvf Sublime\ Text\ 2.0.1\ x64.tar.bz2
sudo mv Sublime\ Text\ 2 sublime
sudo rm Sublime\ Text\ 2.0.1\ x64.tar.bz2

Create a symlink to /usr/bin

sudo ln -s /opt/sublime/sublime_text /usr/bin/subl

Download the following image pack for a better icon

cd /usr/src
sudo wget https://github.com/dmatarazzo/Sublime-Text-2-Icon/zipball/master

Unzip and then rename the icon you want.

sudo unzip master
cd dmatarazzo-Sublime-Text-2*
mv st2_icon_128.png sublime.png

Move the icon to the ubuntu icons directory

mv sublime.png /usr/share/icons/

Change to the ubuntu desktop applications directory

cd /usr/share/applications

Create a sublime.desktop

sudo nano sublime.desktop

Copy in the following

[Desktop Entry]
Name=sublime
GenericName=Text Editor
Comment=Edit text files
Keywords=Plaintext;Write;
Exec=subl
Terminal=false
Type=Application
StartupNotify=true
MimeType=text/plain;
Icon=/usr/share/icons/sublime.png
Categories=GNOME;GTK;Utility;TextEditor;
Actions=Window;Document;

[Desktop Action Window]
Name=Open a New Window
Exec=subl
OnlyShowIn=Unity;

[Desktop Action Document]
Name=Open a New Document
Exec=subl
OnlyShowIn=Unity;

Save and exit nano.

You should now be able to search for sublime in the dashboard and add it to your side bar.

Leave a Reply

Your email address will not be published. Required fields are marked *