Ubuntu – Why is this file name truncated in Nautilus

desktopfilesguinautilus

In Ubuntu the "extension" to a file name, that is, the part after the dot (.) is normally visible. Why is Nautilus not showing the extension of eclipse.desktop when the ls command clearly shows that is the full file name?

This is the list view; not the icon view.

screenshot

Best Answer

About .desktop files and their special function

.desktop files are special files. They represent applications in the GUI, either on your desktop or in Dash/Unity. To do so, a GUI -name of the application is set in a line inside the file in the line

Name=Eclipse

You can simply change the name of how the application shows in Dash and Unity, by changing this line inside the .desktop file, without changing the file name of the .desktop file. In that case, it is irrelevant if the file is executable or not.

If the .desktop file is on your desktop however, if it is not executable, it does not work as a launcher, for reasons explained in souravac's answer, and "shows" under its own (file) name:

eclipse.desktop

If it is executable and on your desktop, it works as a launcher and so it is is representing an application. Then it shows the application's name, as set in the line Name=

Language specific name

If the .desktop file has the line:

X-Ubuntu-Gettext-Domain

the file even shows a language- specific name, fetched from a language file, which will then show in Dash and Unity.


below a complicated example: filename = inkskape.desktop, "basic" interface name = Inkskape, translated name = Inkskape Vector Graphics Editor

enter image description here

The ls command

In the ls command is purely cli- based and always shows the file -name.