GNOME Bugzilla – Bug 549479
install desktop file into XDG application dirs
Last modified: 2008-09-09 17:51:23 UTC
Currently, metacity installs its desktop file into $(datadir)/gnome/wm-properties. This was probably for the old wm capplet. With gnome-session 2.23 we have deprecated the gnome-wm script in favor of having WMs install desktop files and change the /desktop/gnome/session/required-components/windowmanager gconf key. Can we either move the metacity.desktop file from the wm-properties directory or install an additional one in a XDG application dir?
We can certainly delete the wm-properties desktop file. Would it do any good to keep an application file in /usr/share/applications? It's not as though people run Metacity directly very often. (Perhaps it would be good to have one for the theme viewer, though.)
The new gnome-session requires metacity to have a desktop file in one of the XDG application dirs.
Created attachment 117470 [details] [review] Move .desktop from wm-properties to applications So would a patch like this one solve the whole problem? (It makes the installer write the same .desktop out to /usr/share/applications/metacity.desktop instead of /usr/share/gnome/wm-properties/metacity.desktop .)
Metacity showing up in the Applications menu would be totally crazy - that isn't going to happen with this patch, right?
Looks like you'll also need to add a NoDisplay=true. Also see gnome-panel.desktop.
Created attachment 117495 [details] [review] Another version Is this better?
I think that should work. Not sure about adding an untranslated comment though.
I'll take out the comment if you'd rather, but what's the problem with including comments in the C locale? I don't see how translation can happen without something to translate from, and gnome-panel.desktop has one. Or are you saying that because it's going into 2.24 which is string-frozen?
It seems like the string is not marked for translation (due to the missing _ prefix). And we are also string-frozen I guess. I guess it would be fine to ask for a break. Not sure.
Ah, I see. Well, I doubt it matters, since nobody's really going to be reading what the window manager does. I'll put this in tonight's release, without the comment, then?
http://svn.gnome.org/viewvc/metacity?rev=3845&view=rev -- stable http://svn.gnome.org/viewvc/metacity?rev=3846&view=rev -- trunk
This breaks the window manager configuration capplet, which used to look in this old directory. I'm not sure what should be done, but that's a blocker for 2.24.
Oh for goodness sake :/ Can I install two versions?
I guess it would work. You can also make a symbolic link, I guess.
But they have to be different; the wm-properties version needs a group called "Window Manager", and the applications version needs to not have this group, and instead have a key in "Desktop Entry" called NoDisplay. I don't know anywhere near enough autotools to figure out how to install two versions of a file with the same name in two places while also i18ning it. If one of you knows, I would really really appreciate a patch, or even just a description. http://svn.gnome.org/viewvc/metacity/trunk/src/Makefile.am?view=log http://svn.gnome.org/viewvc/metacity/trunk/src/metacity.desktop.in?view=log
Does the desktop file in wm-properties needed to be named metacity.desktop? A wild guess is "no" and therefore you could just put a metacity-wm.desktop file there.
I like that idea. I'll give it a try...
As I mentioned earlier, this is rather black magic to me. I have tried this: desktopfilesdir=$(datadir)/applications desktopfiles_in_files=metacity.desktop.in desktopfiles_files=$(desktopfiles_in_files:.desktop.in=.desktop) desktopfiles_DATA = $(desktopfiles_files) @INTLTOOL_DESKTOP_RULE@ desktopfilesdir=$(datadir)/gnome/wm-properties desktopfiles_in_files=metacity-wm.desktop.in desktopfiles_files=$(desktopfiles_in_files:.desktop.in=.desktop) desktopfiles_DATA = $(desktopfiles_files) @INTLTOOL_DESKTOP_RULE@ ...but it only performs the second paragraph.
Thomas: try this: @INTLTOOL_DESKTOP_RULE@ desktopfilesdir=$(datadir)/applications desktopfiles_in_files=metacity.desktop.in desktopfiles_files=$(desktopfiles_in_files:.desktop.in=.desktop) desktopfiles_DATA = $(desktopfiles_files) wmpropertiesdir=$(datadir)/gnome/wm-properties wmproperties_in_files=metacity-wm.desktop.in wmproperties_files=$(wmproperties_in_files:.desktop.in=.desktop) wmproperties_DATA = $(wmproperties_files)
Awesome, you rock. Thank you. Committed.
...But when I attempted to do a release yesterday afternoon I found that the version in gnome-2-24 (which includes this code) now fails distcheck: [...] Found cached translation database Merging translations into metacity.schemas. make[5]: *** No rule to make target `metacity-wm.desktop', needed by `all-am'. Stop. What did I do wrong?
Thomas: sorry, I thought it was obvious so I failed to mention it. You need to put wmproperties* in EXTRA_DIST (just do the same as desktopfiles* there)
Thanks! Clearly I need to resit autotools 101, or something.