Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

I've downloaded Sublime Text for Linux (32bit) and put it in /opt, linked it in /usr/bin and currently I can start it by typing sublime_text in console. Whenever I start it its icon appears in the Shell's Dock but I can't pin it, and it doesn't appear in the Applications menu either.

How do I add it?

share|improve this question
add comment

2 Answers

up vote 2 down vote accepted

The shortest way:

  1. Press Super to activate overview.
  2. Type main menu and hit Enter
  3. Add new item, where the command is sublime_text.
  4. Voila, you have your shortcut.
share|improve this answer
    
2. "Hauptmenü" oder "Menü" auf Deutsch oder "alacarte" (Programmname) –  PythoNic Mar 20 at 13:18
add comment

You have several options to make this happen. The crux of it is that in order for an app to be usable by GNOME Shell, it needs to have a corresponding .desktop file in either /usr/share/applications or ~/.local/usr/share/applications.

Either:

  • Use alacarte (the old GNOME menu editor) to add a new menu item
  • Use the command gnome-desktop-item-edit ~/.local/usr/share/applications/sublime-text.desktop, which will pop a dialog asking for the information required for the shortcut, the same as alacarte does
  • Add a file into one of those directories yourself, using the same format as other .desktop files

The layout for a desktop file is of the form:

#!/usr/bin/env xdg-open

[Desktop Entry]
Version=1.0
Type=Application
Terminal=false
Icon[en_GB]=gnome-panel-launcher
Name[en_GB]=Sublime Text 2
Exec=sublime-text
Comment[en_GB]=Sublime Text 2
Name=Sublime Text 2
Comment=Sublime Text 2
Icon=gnome-panel-launcher
share|improve this answer
    
~/.local/usr/share/... - the subdirectory usr/ seems to be wrong. For me it works for ~/.local/share/... –  PythoNic Mar 20 at 13:31
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.