Skip to content

Instantly share code, notes, and snippets.

@bbarrows
Created December 31, 2018 01:26
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save bbarrows/c6cb3aa5b5cb443ee77019e7af185867 to your computer and use it in GitHub Desktop.
Save bbarrows/c6cb3aa5b5cb443ee77019e7af185867 to your computer and use it in GitHub Desktop.
Install Sublime Text 3 on Linux with Desktop link
#!/bin/bash
# Installing sublime text 3
# From https://www.sublimetext.com/3
# Be sure to just extract and copy it into the /opt folder
#
#
# sudo ln -s /opt/sublime_text_3/sublime_text /usr/local/bin/subl
# sudo ln -s /opt/sublime_text_3/sublime_text /usr/local/bin/sublime
#
# https://blog.sleeplessbeastie.eu/2015/09/14/how-to-add-sublime-text-to-unity-launcher/
echo """
[Desktop Entry]
Name=Sublime Text
GenericName=Text Editor
Comment=Edit text files
Exec=/opt/sublime_text/sublime_text %U
Terminal=false
Type=Application
MimeType=text/plain;
Icon=/opt/sublime_text/Icon/48x48/sublime-text.png
Categories=Utility;TextEditor;
Keywords=Text;Editor;
""" > ~/.local/share/sublime_text.desktop
# Or in
# /usr/share/applications/sublime.desktop
# https://askubuntu.com/questions/196390/how-to-add-sublime-text-to-dash
echo "THIS IS THE ONE THAT WORKED ON GALLIUMOS"
echo """
[Desktop Entry]
Version=1.0
Name=Sublime Text 3
*#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=/opt/sublime_text_3/sublime_text
Terminal=false
Icon=/opt/sublime_text_3/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
""" > /usr/share/applications/sublime.desktop
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment