Tag: «unity»
How to install Sublime Text 2 on Ubuntu 12.04 with Unity
event Jun 1, 2012 at 22:41
Sublime Text 2 runs without installation, but doesn’t integrate with the system at all. You can’t even associate certain file types with it out of the box. How to install Sublime and integrate it with the system:
- Unpack the Sublime archive
-
Move Sublime to /usr/lib:
sudo mv Sublime\ Text\ 2 /usr/lib/ -
To launch the editor from the terminal with the «sublime» command:
sudo ln -s /usr/lib/Sublime\ Text\ 2/sublime_text /usr/bin/sublime -
To create a Unity launcher that shows up properly in the dock:
and paste in the following:sudo sublime /usr/share/applications/sublime.desktop
[Desktop Entry] Version=1.0 Name=Sublime Text 2 # Only KDE 4 seems to use GenericName, so we reuse the KDE strings. # From Ubuntu's language-pack-kde-XX-base packages, version 9.04-20090413. GenericName=Text Editor Exec=sublime Terminal=false Icon=/usr/lib/Sublime Text 2/Icon/48x48/sublime_text.png Type=Application Categories=TextEditor;IDE;Development X-Ayatana-Desktop-Shortcuts=NewWindow [NewWindow Shortcut Group]
Name=New Window Exec=sublime -n TargetEnvironment=Unity -
If you want to set file associations so that certain file types open in Sublime:
and in that file replace every gedit.desktop with sublime.desktopsudo sublime /usr/share/applications/defaults.list
After this, everything will look as if it’s native.