понедельник, 16 июля 2012 г.

Sublime Text 2 fedora manual install


Ok, here is my trick. Nothing serious, just some additional preferences.
Download original file from developer site.
Move directory to /opt


 sudo mv Sublime\ Text\ 2 /opt/sublime2  


Lets check it:


 cd /opt/sublime2 

 tree  


Next is /usr/bin sublime file:


 touch /usr/bin/sublime 

 chmod 755 /usr/bin/sublime  


Lets edit it to start sublime from /opt directory:


 gedit /usr/bin/sublime  


Add these lines to /usr/bin/sublime file:


 #!/bin/sh 

 export SUBLIME_HOME="/opt/sublime2" 

   

 $SUBLIME_HOME/sublime_text $*  


Thats good. Now sublime command should work from terminal.
Next is .desctop file:


 sublime /usr/share/applications/sublime.desktop  


You should paste these lines:


 [Desktop Entry] 

 Encoding=UTF-8 

 Name=Sublime 

 Comment=Sublime Text Editor 

 Exec=sublime %U 

 Icon=/opt/sublime2/Icon/128x128/sublime_text.png 

 Terminal=false 

 Type=Application 

 Categories=GNOME;Application;Development; 

 StartupNotify=true 

 MimeType=text/plain;  


Finish. System restart and logout are not necessarily.