This short tutorial is based on the link provided on the bottom of this post with slight modifications. The example is shown with 64-bit version of Linux Mint.
Download Sublime Text
Open your browser and go to Sublime Text and download the file to directory Downloads.
Setup
Open Terminal and type in the following command:
cd ~/Downloads
Then type in this command to extract the file:
tar -jxvf "Sublime Text 2.0.1 x64.tar.bz2"
Once the file is extracted, type the following commands individually:
sudo mv "Sublime Text 2" /opt/sublime/ sudo chown -R root:root /opt/sublime sudo chmod -R +r /opt/sublime
Create a Sublime Text Executable
Execute the following commands to create a Sublime Text executable in your path:
sudo touch /usr/bin/sublime_text sudo chmod 777 /usr/bin/sublime_text
Launch Pluma Text Editor by typing ALT+F2 (RUN) and enter this command:
gksu pluma /usr/bin/sublime_text
Copy & paste the code below:
#!/bin/sh export SUBLIME_HOME="/opt/sublime" $SUBLIME_HOME/sublime_text "$*"
Save the file and exit.
Next, type in this command:
sudo chmod 755 /usr/bin/sublime_text
Create a Menu Icon
Launch the default text editor (Pluma) again by typing Alt+F2 and type in:
gksu pluma /usr/share/applications/sublime.desktop
Copy & paste the code below:
[Desktop Entry] Encoding=UTF-8 Name=Sublime Text 2 Comment=Edit text, code and markup Exec=sublime_text Icon=/opt/sublime/Icon/256x256/sublime_text.png Terminal=false Type=Application Categories=GNOME;GTK;Utility;TextEditor; StartupNotify=true
That’s it. If you go to the Menu, you should see Sublime Text 2 under the Applications, Accessories.
Leave a Reply