I just downloaded Sublime Text Editor, and I unpacked the tarball. However, now I want to make it searchable in the Dash Board menu, like all applications that are installed using the Ubuntu Software Center. How do I do it?

enter image description here


A much easier method is to try the public beta version, as it comes in both tarball form for any Linux version, and in a .deb format specifically for Ubuntu. Download either 32- or 64-bit, depending on your version of Ubuntu (run uname -a at the command line, and look for either i386 (32-bit) or x86_64 (64-bit) in the output), then at the command line navigate to where you downloaded it and run

sudo dpkg -i sublime-text_build-XXXX_YYYY.deb

where XXXX is the build number (currently 3059) and YYYY is either i386 or amd64. This will automatically install Sublime Text in /opt/sublime-text, create a /usr/bin/subl command, and automatically create /usr/share/applications/sublime_text.desktop along with the associated icons. It should also create a launcher in your Unity taskbar.

Sublime Text 3 is the future of the editor, and every day more and more plugins and extensions are released or revised on Package Control that are compatible with ST3. If you purchase a license, which is required for long-term use after evaluation, you will also have access to the bleeding edge development releases which are released more frequently than the public beta versions and so are more up-to-date as far as new features and bug fixes are concerned. Sublime Text 2 is basically a finished product as far as development is concerned, and while it is quite stable for most people, many plugins do not work with it, especially those under active development that depend on some of the advanced features that ST3 provides.

It's worth noting that ST2 and ST3 can coexist peacefully on the same system, as the plugins and data are stored separately. You obviously can't have two subl commands, but you can rename one of them subl2 or subl3, for example.

If you still need to create a .desktop file for ST2, its contents should be as follows. Please note that it assumes you moved the Sublime Text 2 directory from where you unpacked it to /opt/sublime_text_2. If this is not the case, please update the directory paths accordingly.

[Desktop Entry]
Name=Sublime Text 2
GenericName=Text Editor
Comment=Sophisticated text editor for code, markup and prose
Exec=/opt/sublime_text_2/sublime_text %F

[Desktop Action Window]
Name=New Window
Exec=/opt/sublime_text_2/sublime_text -n

[Desktop Action Document]
Name=New File
Exec=/opt/sublime_text_2/sublime_text --command new_file

Save the file as sublime.desktop, then use sudo to move it to /usr/share/applications. You may have to log out and then back in, but it should now be available in Unity.

Good luck, and if you have any questions please let me know.

  • Thank you for the detailed answer ! I am already using Sublime 3, but not for commercial use :D – Flame_Phoenix Jan 27 '14 at 15:45
  • 1
    @Flame_Phoenix - glad I could help! As far as the license goes, at the buy link, the relevant part says a license must be purchased for continued use. (emphasis mine). Basically, if it's your prime text editor, regardless of commercial vs. personal vs. open source use, you need a license. The "trial" period is unlimited, so you're never forced to get one, but if you want to support the author and ensure continued development, you should consider buying one. I did because I love ST, and now can't imagine my workflow without it (continued) – MattDMo Jan 27 '14 at 15:54
  • 1
    I've purchased other commercial software for the same reason instead of pirating it to support the devs/small businesses behind them. Of course, it's all up to you, whether you can afford a license, what you think of the present situation where support is basically provided by the community instead of the dev, etc. Decide for yourself, and be comfortable about your decision - I'm not going to be a jerk and say "you're going to hell because you pirated something!" :) – MattDMo Jan 27 '14 at 15:56
  • Correct me if I am wrong, but the link you provided me is not pirated, is it? xD We all have choices to make. I am still learning ST, if I like it maybe I will support it. – Flame_Phoenix Jan 27 '14 at 17:48
  • 1
    @Flame_Phoenix - sublimetext.com is the official website, so nothing there is pirated. Even the webupd8 PPAs that provide ST2 and ST3 through the apt-get mechanism are legal AFAIK - I've tried them and was still prompted for my license. Basically what they did was take the tarballs and redo them into .deb files, automating a couple of tasks (like creating a .desktop file that you were originally asking about), and creating an easy install/uninstall mechanism. Now that ST3 comes in .debs, there's not as much of a need. – MattDMo Jan 27 '14 at 17:59

1- Create an empty file and rename it to sublime.desktop

2- Add some lines in it following the below examples (choose one and change it on your conditions)

Ex A. Hotshots .desktop file:

[Desktop Entry]
Comment=Screenshot manager
GenericName=Screenshot manager

Ex B. Amazon .desktop file

[Desktop Entry]
Exec=unity-webapps-runner --amazon --app-id=ubuntu-amazon-default

Ex C. Goldendict .desctop file:

[Desktop Entry]
GenericName=Multiformat Dictionary

3- put sublime.desktop file in this directory: /usr/share/applications

  • Thanks, is there a another place where I can get more information about the "XXX.desktop" files? – Flame_Phoenix Jan 27 '14 at 15:45
  • @Flame_Phoenix, check out this answer for the .desktop file format – mars Apr 16 '14 at 14:22

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.