Bug 115274 - .desktop file magic number error
Summary: .desktop file magic number error
Status: NEW
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Installation (show other bugs)
Version:
(earliest affected)
5.3.5.2 release
Hardware: x86-64 (AMD64) Linux (All)
: medium minor
Assignee: Not Assigned
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2018-01-28 09:17 UTC by Fudoka
Modified: 2024-11-22 15:57 UTC (History)
3 users (show)

See Also:
Crash report or crash signature:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Fudoka 2018-01-28 09:17:27 UTC
Description:
KDE (at least) does not recognise the supplied .document file as mime type 'application/x-desktop' if the .desktop file extension is removed

Because the start of the .desktop file is a comment the mime type is not recognised without the .desktop file extension. I'm assuming that this breaks the magic number for the file

I want to rename links to the .desktop files so that they show up on a KDE desktop folder view with names such as "LibreOffice Calc" etc. but they just show up as text files once renamed and clicking on them opens the .desktop file in the kwrite editor.

There's a simple fix - just move the [Desktop Entry] line to the start of the document and everything is fine. I can do this on an ad-hoc basis but any upgrade will just overwrite them and I'd have to do the edit again.

Steps to Reproduce:
1.copy base.desktop file to  a selected folder in KDE folder view (NOT ~/Destop)
2.rename to 'LibreOffice Base'
3.

Actual Results:  
Icon shows as a text, document. Clicking on icon opens the desktop file in a text editor

Expected Results:
Should function as a launcher for LibreOffice Base.
Edit desktop file to move [Desktop Entry] to line 1 fixes.


Reproducible: Always


User Profile Reset: No



Additional Info:
running openSUSE 42.3, KDE5, LibreOffice installed from standard openSUSE repositories


User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Firefox/52.0
Comment 1 Buovjaga 2018-02-17 15:10:29 UTC
RGB confirmed this is https://ask.libreoffice.org/en/question/144138/problems-with-desktop-files/
Comment 2 QA Administrators 2019-02-18 03:44:28 UTC Comment hidden (obsolete)
Comment 3 RGB 2021-02-15 20:33:18 UTC
The problem with .desktop files is still present in 7.1.0.3
Comment 4 QA Administrators 2023-02-16 03:25:45 UTC Comment hidden (obsolete)
Comment 5 RGB 2023-02-16 21:19:06 UTC
Problem still present on 

Version: 7.5.0.3 (X86_64) / LibreOffice Community
Build ID: c21113d003cd3efa8c53188764377a8272d9d6de
CPU threads: 8; OS: Linux 5.14; UI render: default; VCL: kf5 (cairo+xcb)
Locale: es-ES (es_ES.UTF-8); UI: en-US
Calc: threaded
Comment 6 Jonathan Clark 2024-11-22 15:57:50 UTC Comment hidden (obsolete)