Application Items in 'Right-Click' Menu

Asked by Andrew Hise on 2014-02-13

Firefox and Chromium behave as I would expect - if you right click the icon, you see the additional launcher items listed in /usr/share/applications/*.desktop (New Window, Private Window, etc...)- is it possible to have this behavior in gnome-terminal? Or, adding folder paths to the file manager icon (Nemo, in my case).

I would expect a 'New Terminal' option present if I already have one instance of terminal running, based on my gnome-terminal.desktop:

$ cat /usr/share/applications/gnome-terminal.desktop
[Desktop Entry]
Name=Terminal
Comment=Use the command line
TryExec=gnome-terminal
Exec=gnome-terminal
Icon=utilities-terminal
Type=Application
X-GNOME-DocPath=gnome-terminal/index.html
X-GNOME-Bugzilla-Bugzilla=GNOME
X-GNOME-Bugzilla-Product=gnome-terminal
X-GNOME-Bugzilla-Component=BugBuddyBugs
X-GNOME-Bugzilla-Version=3.6.2
Categories=GNOME;GTK;Utility;TerminalEmulator;
StartupNotify=true
OnlyShowIn=GNOME;Unity;
Keywords=Run;
Actions=New
X-Ubuntu-Gettext-Domain=gnome-terminal

[Desktop Action New]
Name=New Terminal
Exec=gnome-terminal
OnlyShowIn=Unity

Question information

Language:
English Edit question
Status:
Solved
For:
Plank Edit question
Assignee:
No assignee Edit question
Solved by:
Andrew Hise
Solved:
2014-02-14
Last query:
2014-02-14
Last reply:
Andrew Hise (heyandrew) said : #1

After more digging, I realized I needed to add another [Desktop Action] section to the .desktop file; solved!

Leonardo Santos (laugustogs) said : #2

Wait, could you tell exactly what you did? What lines did you add to the .desktop file?

Kristian Picon (kristianpicon) said : #3

For browsers, at least, Plank seems to be reading the Unity "application menu" shortcuts. I added this to get shortcuts in MATE Panel:

X-Ayatana-Desktop-Shortcuts=NewTerminal;NewTab

[NewTerminal Shortcut Group]
Name=New Window
Exec=mate-terminal --window

[NewTab Shortcut Group]
Name=New Tab
Exec=mate-terminal --tab