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?
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
XXXX is the build number (currently 3059) and
YYYY is either
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
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] Version=1.0 Type=Application Name=Sublime Text 2 GenericName=Text Editor Comment=Sophisticated text editor for code, markup and prose Exec=/opt/sublime_text_2/sublime_text %F Terminal=false MimeType=text/plain; Icon=/opt/sublime_text_2/Icon/48x48/sublime_text.png Categories=TextEditor;Development; StartupNotify=true Actions=Window;Document; [Desktop Action Window] Name=New Window Exec=/opt/sublime_text_2/sublime_text -n OnlyShowIn=Unity; [Desktop Action Document] Name=New File Exec=/opt/sublime_text_2/sublime_text --command new_file OnlyShowIn=Unity;
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.
1- Create an empty file and rename it to
2- Add some lines in it following the below examples (choose one and change it on your conditions)
Ex A. Hotshots
[Desktop Entry] Version=2.0.0 Name=HotShots Comment=Screenshot manager Type=Application GenericName=Screenshot manager TryExec=/usr/bin/hotshots Exec=/usr/bin/hotshots Categories=Utility;Application; Icon=/usr/share/pixmaps/hotshots.png MimeType=application/x-hot;
Ex B. Amazon
[Desktop Entry] Name=Amazon Type=Application Icon=amazon-store Exec=unity-webapps-runner --amazon --app-id=ubuntu-amazon-default
Ex C. Goldendict
[Desktop Entry] Type=Application Terminal=false Categories=Office;Dictionary;Education;Qt Name=GoldenDict GenericName=Multiformat Dictionary Comment=GoldenDict Encoding=UTF-8 Icon=/usr/share/pixmaps/goldendict.png Exec=goldendict
3- put sublime.desktop file in this directory: