Take the 2-minute tour ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems.. It's 100% free, no registration required.

As shown in the below screenshot (sorry I couldn't make it inline - Seems points on other stackexchange subforums don't count here), if I have a Folder Widget setup to point to the Desktop "place", the .desktop files appear with the filename of the Name= value in the file.

http://imgur.com/FGTZh

However, if I browse to this folder in Dolphin / make the Folder Widget point to the absolute path to the desktop / Click "Open in Dolphin" in the context menu of the Folder Widget pointing to the absolute path to the desktop, I get the real filename of the .desktop file:

http://imgur.com/DNAwR

Is this a changeable setting, or hard-coded?

share|improve this question
add comment

2 Answers 2

up vote 1 down vote accepted

I think it's not possible. This behavior is hardcoded.

When you are opening your Desktop in the way that you showed on first screenshot you are opening location desktop:/ (you can type that address in URI bar in Konqueror or Dolphin to check it). Handler for this pseudoprotcol is KDE component (kioslave) named kio_desktop. When you open normal location Dolphin is using kioslave kio_file (for file:/ protocol).

In source code of kio_desktop there is a special function that is responsible for handling desktop files. In line 229 you can find code that hide extension by removing last 8 characters from displayed filename.

In code of kio_file there is no reference to desktop file, so I'm assuming that kio_file treats .desktop as normal files.

share|improve this answer
add comment

This may not be exactly what you're looking for, but you can just rename the icon files themselves eliminating the .desktop extension (and changing the file name in any way desired) and they should still work fine. I think they will then display the way you want them to.

The desktop widget uses the properties (metadata) in the icon files, but dolphin (and probably any other file manager) just looks at the file entry itself - not its content.

For future reference, you can also take a look at this when working with the metadata:

http://standards.freedesktop.org/desktop-entry-spec/desktop-entry-spec-latest.html

It explains what all those entries are used for.

share|improve this answer
    
Thanks, but am aware of the solution of renaming the file, however not sure if you saw the difference in the screenshots. If the Folder widget is set to show the "Desktop" then it displays the NAME= metadata value (and Dolphin also displays the same when "Open in Dolphin" is selected), if it is set to show "/home/Delete2/Desktop", it shows the real filename (and likewise so does Dolphin, using "Open in Dolphin". On Ubuntu 11 (Unify Windows Manager, I believe) changing the executable bits will change the way it displays. –  user66001 May 7 '12 at 1:23
    
... I would prefer a solution to the way the Window Manager / File Manager displays it, rather than altering the file, like it does in Ubuntu 11/Unify, and probably lots of other Windows Managers / File Managers. –  user66001 May 7 '12 at 1:23
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.