Installing Sublime Text on Fedora 19

Installing Sublime Text on Fedora 19

Sublime Text is a very good, but lightweight text editor for Windows, Mac and Linux.

Unfortunately the developers do not provide packages for Fedora (or any Linux distribution) and because it is non-free it is not in the Fedora official repositories.

This is how to install it and create a launcher for Fedora 19 using Gnome3.

Getting the tarball

First download the tarball from the Sublime Text site, then unpack it into /opt/sublime.

E.g.

cd /opt
wget http://c758482.r82.cf2.rackcdn.com/Sublime%20Text%202.0.2%20x64.tar.bz2
tar jxvf Sublime\ Text\ 2.0.2\ x64.tar.bz2
mv Sublime\ Text\ 2 sublime

Creating a Launcher for Gnome 3

In order to integrate Sublime Text with the Gnome 3 Desktop Environment, create the following file:

/usr/share/applications/sublime.desktop

[Desktop Entry]
Name=Sublime
Comment=Application for editing text files
Exec=/opt/sublime/sublime_text %U
Icon=/opt/sublime/Icon/128x128/sublime_text.png
Terminal=false
Type=Application
Categories=Programming;

I have found that you need to log out of Gnome and re-login before the new desktop entry is detected, but you will then be able to see the icon in the Applications list and be able to assign it as a default application for text files.