Can't add Sublime Text to the Gnome Shell Dock
The shortest way:
- Press Super to activate overview.
- Type
main menu
and hit Enter - Add new item, where the command is
sublime_text
. - Voila, you have your shortcut.
I installed Sublime Text 3 from Webupd8 PPA, and the .desktop
file was already created.
But I was still not able to pin the icon to Gnome Shell dock when the app is launched.
For those who are in the same situation, you can pin it from the dashboard search directly, without launching it.
Just open the dashboard with the Super key, search for Sublime
, right click on the icon, then select Add to Favorites
.
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 asalacarte
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