After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 549479 - install desktop file into XDG application dirs
install desktop file into XDG application dirs
Status: RESOLVED FIXED
Product: metacity
Classification: Other
Component: general
2.23.x
Other Linux
: Normal blocker
: ---
Assigned To: Metacity maintainers list
Metacity maintainers list
Depends on:
Blocks: 548710
 
 
Reported: 2008-08-26 18:02 UTC by William Jon McCann
Modified: 2008-09-09 17:51 UTC
See Also:
GNOME target: 2.24.x
GNOME version: ---


Attachments
Move .desktop from wm-properties to applications (503 bytes, patch)
2008-08-27 18:04 UTC, Thomas Thurman
none Details | Review
Another version (943 bytes, patch)
2008-08-28 01:58 UTC, Thomas Thurman
rejected Details | Review

Description William Jon McCann 2008-08-26 18:02:13 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?
Comment 1 Thomas Thurman 2008-08-27 17:50:46 UTC
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.)
Comment 2 William Jon McCann 2008-08-27 17:56:51 UTC
The new gnome-session requires metacity to have a desktop file in one of the XDG application dirs.
Comment 3 Thomas Thurman 2008-08-27 18:04:44 UTC
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 .)
Comment 4 Havoc Pennington 2008-08-27 18:47:31 UTC
Metacity showing up in the Applications menu would be totally crazy - that isn't going to happen with this patch, right?
Comment 5 William Jon McCann 2008-08-27 19:20:51 UTC
Looks like you'll also need to add a NoDisplay=true.

Also see gnome-panel.desktop.
Comment 6 Thomas Thurman 2008-08-28 01:58:38 UTC
Created attachment 117495 [details] [review]
Another version

Is this better?
Comment 7 William Jon McCann 2008-09-02 14:36:32 UTC
I think that should work.  Not sure about adding an untranslated comment though.
Comment 8 Thomas Thurman 2008-09-02 15:07:22 UTC
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?
Comment 9 William Jon McCann 2008-09-02 15:09:18 UTC
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.
Comment 10 Thomas Thurman 2008-09-02 15:20:16 UTC
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?
Comment 12 Vincent Untz 2008-09-03 19:16:46 UTC
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.
Comment 13 Thomas Thurman 2008-09-03 19:23:23 UTC
Oh for goodness sake :/ Can I install two versions?
Comment 14 Vincent Untz 2008-09-03 19:51:02 UTC
I guess it would work. You can also make a symbolic link, I guess.
Comment 15 Thomas Thurman 2008-09-08 03:45:46 UTC
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
Comment 16 Vincent Untz 2008-09-08 11:52:16 UTC
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.
Comment 17 Thomas Thurman 2008-09-08 13:17:23 UTC
I like that idea.  I'll give it a try...
Comment 18 Thomas Thurman 2008-09-08 13:55:04 UTC
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.
Comment 19 Vincent Untz 2008-09-08 13:57:24 UTC
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)
Comment 20 Thomas Thurman 2008-09-08 20:14:57 UTC
Awesome, you rock.  Thank you.  Committed.
Comment 21 Thomas Thurman 2008-09-09 11:58:50 UTC
...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?
Comment 22 Vincent Untz 2008-09-09 12:05:21 UTC
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)
Comment 23 Thomas Thurman 2008-09-09 17:51:23 UTC
Thanks!  Clearly I need to resit autotools 101, or something.