0

I think the Dash Home is really cool and here's something I wanna learn about:

When I type shortcut, it can prompt keyboard like this snapshot.

I wanna know how Ubuntu determines shortcut is related to keyboard? What if I want to get Chrome when I type www?

  • Sorry, can you tell us exactly what you are wanting to do? The question is a little vague and needs padding out a bit. – SimplySimon Aug 25 '13 at 14:01
  • 1
    @SimplySimon just edited it, hope it's clear now. – ChandlerQ Aug 25 '13 at 14:25
1

I think it just indexes the keywords defined on each application launcher.

In your case, the launcher from "Keyboard" is stored in /usr/share/applications/gnome-keyboard-panel.desktop and has the following content:

[Desktop Entry]
Name=Keyboard
Comment=Change keyboard settings
Exec=gnome-control-center keyboard
Icon=preferences-desktop-keyboard
Terminal=false
Type=Application
StartupNotify=true
Categories=GNOME;GTK;Settings;HardwareSettings;X-GNOME-Settings-Panel;
OnlyShowIn=GNOME;Unity;
X-GNOME-Bugzilla-Bugzilla=GNOME
X-GNOME-Bugzilla-Product=gnome-control-center
X-GNOME-Bugzilla-Component=keyboard
X-GNOME-Bugzilla-Version=3.6.3
X-GNOME-Settings-Panel=keyboard
# Translators: those are keywords for the keyboard control-center panel
Keywords=Shortcut;Repeat;Blink;
X-Ubuntu-Gettext-Domain=gnome-control-center-2.0

If you try each one of the keywords defined there, "Keyboard" is shown as an option in the launcher.

So, if you want to make dash to show Chromium when you type "WWW", just add a Keywords stanza in /usr/share/applications/chromium-browser.desktop:

(Content omitted)
StartupNotify=true
Actions=NewWindow;Incognito;TempProfile;
X-AppInstall-Package=chromium-browser
Keywords=WWW;
(...)

Also, please note that this file probably will be overwritten when Chromium is updated, so probably it would be better to copy the edit file to ~/.local/share/applications/.

  • Cool! Now I'm clear about *.desktop file and thanks for reminds of the overwritten things – ChandlerQ Aug 25 '13 at 14:45

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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