Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

I downloaded sublime text 2, unpacked it to /opt/sublime and created a link of /opt/sublime/sublime_text (executable) in /usr/bin so now I can just call it by typing "sublime" in console.

But it's not appeared in applications list: if I type sublime there, it won't be shown. Only if type sublime_text, I will see it. But there is more: when I click on it, it won't launch, nothing won't happen at all!

Besides, if I lock it Launcher, I won't be able to launch it: I close it, when I click on it on the Launcher panel, but it doesn't launch and nothing happens!

Why is that happening?

share|improve this question
add comment

2 Answers

up vote 3 down vote accepted

You need to put a .desktop file in /usr/share/applications (for all user) or ~/.local/share/applications (for current user).

Here is custom desktop file, save it as sublime.desktop and put in the above location.

(gksu nautilus for root access in case you want to put it for all user)

Change the Exec & Icon entry as per your path

[Desktop Entry]
Name=Sublime Text 2
Exec="/opt/Sublime Text 2/sublime_text" %F
MimeType=text/plain;
Terminal=false
Type=Application
Icon=sublime_text
Categories=GNOME;GTK;Utility;TextEditor;Development;
Actions=New;

[Desktop Action New]
Name=New Editor Window
Exec="/opt/Sublime Text 2/sublime_text" --new-window

Source

share|improve this answer
    
that's good. but doesn't it create a quick launch icon on a desktop as well? actually it doesn't. –  Alan Dert Apr 1 '13 at 12:37
    
No it doesn't create shortcut. desktop files are for searching in unity & locking at launcher. To create shortcut you need to drag the icon to desktop. See How to create a desktop shortcut in Unity? –  Web-E Apr 1 '13 at 12:50
    
@Web-E How come you're not using \ on the space characters in the path for Exec? Shouldn't it be /opt/Sublime\ Text\ 2/sublime_text? –  Torcellite Dec 27 '13 at 5:21
    
No you don't need escape sequence for EXEC key when value is quoted.Also can see here. BTW the escape sequence for space in desktop file is \s –  Web-E Dec 28 '13 at 5:36
add comment

I've been using PPA from webupdate. Here's how to install

http://www.webupd8.org/2012/06/sublime-text-20-stable-released-ppa.html

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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