- Joined
- Jan 23, 2011
- Posts
- 16,410
- Solutions
- 106
- Reaction
- 65,154
- Points
- 10,490
First, make sure that /usr/share/applications/sublime_text.desktop exists:
ls /usr/share/applications/sublime_text.desktop
Then, open /usr/share/applications/defaults.list with Sublime:
Code:
sudo subl /usr/share/applications/defaults.list
Search for all instances of gedit and replace them with sublime_text.
Save the file, log out and back in, and you should be all set.
If for some reason /usr/share/applications/sublime_text.desktop doesn't exist, create it:
sudo touch /usr/share/applications/sublime_text.desktop
Open it in Sublime:
and paste the following into it:sudo subl /usr/share/applications/sublime_text.desktop
Code:
[Desktop Entry]
Version=1.0
Type=Application
Name=Sublime Text
GenericName=Text Editor
Comment=Sophisticated text editor for code, markup and prose
Exec=/opt/sublime_text/sublime_text %F
Terminal=false
MimeType=text/plain;
Icon=sublime-text
Categories=TextEditor;Development;
StartupNotify=true
Actions=Window;Document;
[Desktop Action Window]
Name=New Window
Exec=/opt/sublime_text/sublime_text -n
OnlyShowIn=Unity;
[Desktop Action Document]
Name=New File
Exec=/opt/sublime_text/sublime_text --command new_file
OnlyShowIn=Unity;
However, if you installed Sublime Text using the .deb file downloaded from sublimetext.com, the file should already exist.
Attachments
-
You do not have permission to view the full content of this post. Log in or register now.