GNOME Bugzilla – Bug 651838
Renaming a non-executable .desktop file causes an additional .desktop extension to be added
Last modified: 2018-05-09 16:50:03 UTC
Hi. If .desktop file is non-executable, nautilus shows its full name (together with .desktop extension), at least in Compact View. If such a file is executable, nautilus shows only its name (without the extension). The bug is that if you rename a non-executable file, nautilus appends additional .desktop extension, which results in two extensions. It is good for executable .desktop files, because in that case the string you are editing when renaming a file does not have .desktop extension, but it is faulty for non-executable files, because the extension is already there. To reproduce: - Open nautilus and go to ~/.config/autostart/ directory; - If there are no files there, create a dummy command in `gnome-session-properties'; - There should be at least one non-executable .desktop file in the directory. Rename the file to change its base name (part of the file name without the extension) to something else What happens: additional .desktop extension is appended What should happen: base name is changed, no additional extension is appended. I also found a discussion at askubuntu.com: http://askubuntu.com/questions/17220/can-nautilus-display-a-desktop-file-by-its-real-name/17262#17262 Nautilus 3.0.2
It's worse than that - nautilus actually modifies the _contents_ of the file on a rename operation (appending a blank line and a locale-specific name field). This also happens when you drag and drop the .desktop file into Gedit, which is clearly not what someone using the file in this way wants. See also: https://bugs.launchpad.net/ubuntu/+source/nautilus/+bug/815389 and its duplicates
Still an issue in Nautilus 3.24.
This problem has been fixed in the unstable development version. The fix will be available in the next major software release. You may need to upgrade your Linux distribution to obtain that newer version. *** This bug has been marked as a duplicate of bug 688632 ***