Adding Unity to OnlyShowIn allowed values

Vincent Untz vuntz at
Mon Mar 14 11:02:23 PDT 2011

Hi Ted,

Le samedi 19 février 2011, à 14:18 -0600, Ted Gould a écrit :
> On Sat, 2011-02-19 at 10:26 +0100, Vincent Untz wrote:
> > Just curious: do you have examples of what you want to show/hide in
> > Unity compared to GNOME? If it's only for autostarted apps,
> The use that pushed me to write the patch/email was with the Desktop
> Actions that we're putting in desktop file for static actions on the
> Launcher.  Unfortunately, it's still an X- thing but I intend to update
> it to the current version of the Desktop Actions spec soon (because of
> release timing we needed something too quickly).  In the actions that
> we've added and sent upstream we've been adding an "OnlyShowIn=Unity" to
> ensure they won't effect other projects.  I have suggested a couple of
> times that GNOME Shell should use the same actions, but I don't believe
> they currently are.

Something that wasn't clear to me and that I understood after talking to
Didier and looking at an example .desktop file for Unity is how you're
using this. Which is is the following, as far as I understand:

 + you have one .desktop file for, say, evolution
 + in this .desktop file, you define several actions
 + you want some actions to appear in an indicator, and some others to
   appear in the dash
 + you use OnlyShowIn=Unity; for actions that should only appear in the
   dash, and not the indicator (or the opposite, I forgot already).

Is this right? If no, please ignore what's below :-)

If yes, then I think that this is abusing the OnlyShowIn property: the
property that you use to compare the current session to the list of
values in OnlyShowIn is global to the session, and not local to some
components in the session. A good question would be: what if another app
wants to display the actions in the same session?

I agree that the spec isn't saying this so clearly, but I think this is
what is meant. Your current usage of this might possibly be okayish, but
I'm afraid that it could lead to some weirdness when actions will be
used more widely. I'd suggest to instead use something like
"X-Ubuntu-ShowIn=dash" and "X-Ubuntu-ShowIn=indicator". What do you

I'd like to hear what you think; if my understanding of how it works is
correct, but you still want to register Unity (to show different apps in
menus, or to have different autostart files), that's fine and we can add
Unity ASAP :-)


Les gens heureux ne sont pas pressés.

More information about the xdg mailing list