Posted By

oxnard on 11/12/12


Tagged

linux


Versions (?)

Install Sublime Text 2 from PPA


 / Published in: Other
 

Install Sublime Text 2 from PPA on Ubuntu

  1. Add webupd8 Sublime Text 2 PPA and creat symlink (http://www.webupd8.org/2011/03/sublime-text-2-ubuntu-ppa.html):
  2.  
  3. $ sudo add-apt-repository ppa:webupd8team/sublime-text-2
  4.  
  5.  
  6. Update apt-get:
  7.  
  8. $ sudo apt-get update
  9.  
  10.  
  11. Install Sublime Text 2:
  12.  
  13. $ sudo apt-get install sublime-text
  14. or $ sudo apt-get install sublime-text-dev
  15.  
  16.  
  17. Create symlink (subl, or whatever you please):
  18.  
  19. $ sudo ln -s ~/Applications/Sublime\ Text\ 2/sublime_text /usr/local/bin/subl
  20.  
  21. -----------------------------------------------------------------------------
  22.  
  23. Install Package Control (http://wbond.net/sublime_packages/package_control):
  24.  
  25. from Sublime Text 2 console (ctrl + `):
  26.  
  27. import urllib2,os; pf='Package Control.sublime-package'; ipp=sublime.installed_packages_path(); os.makedirs(ipp) if not os.path.exists(ipp) else None; urllib2.install_opener(urllib2.build_opener(urllib2.ProxyHandler())); open(os.path.join(ipp,pf),'wb').write(urllib2.urlopen('http://sublime.wbond.net/'+pf.replace(' ','%20')).read()); print 'Please restart Sublime Text to finish installation'
  28.  
  29. -----------------------------------------------------------------------------
  30.  
  31. Adding a launcher/desktop icon:
  32.  
  33. Create a new file on the desktop called sublime.desktop.
  34.  
  35. Add contents (subl, or whatever you please):
  36.  
  37. [Desktop Entry]
  38. Name=Sublime Text 2
  39. GenericName=Text Editor
  40. Comment=Edit text files
  41. Exec=subl
  42. Terminal=false
  43. Type=Application
  44. StartupNotify=true
  45. MimeType=text/plain;
  46. Icon=/path/to/icon
  47. Categories=GNOME;GTK;Utility;TextEditor;

Report this snippet  

You need to login to post a comment.