9

I've downloaded and am playing with the new Neon release of KDE. When I activate an item from the Kickoff menu, though, it opens up a *.desktop file in the Kate text editor instead of launching the item. What's the issue?

1
  • Can you post the contents of the *.desktop file? I Think the clue might be in there.
    – C Schilder
    Sep 11, 2015 at 13:44

2 Answers 2

5

Background

I encountered this bug with a clean installation of 32-bit Kubuntu 16.10. After allowing updates to the system:

  1. with Dolphin I browsed to remote: (Network)
  2. I opened Add Network Folder
  3. I expected a launch of knetattach (Network Folder Wizard – KDE Network Wizard)
  4. instead, a .desktop file was opened by Kate.

I installed Thunar 1.6.11, browsed /usr/share/applications/ and found files, with representative names such as KNetAttach, behaving as expected.

Browsing the same directory with Dolphin, I found org.kde.knetattach.desktop and other .desktop files misbehaving; Dolphin failed to execute the required files.

Unix & Linux Stack Exchange

There's the accepted answer to KUbuntu 10.04 / Dolphin File Manager: Is there a way to make .desktop files display the filename the same as the NAME= in the metadata? – relevant to one of the symptoms that were observed in my case, but not a solution to the execution problem.

Super User

There's the accepted answer to KDE launcher opens .desktop files in Kate but what's suggested there did not work around the execution problem in my case.

The solution in my case

The reply to .desktop files are opened with text editor • KDE Community Forums refers to a 2015 topic:

  • How do I unset default to open .desktop in a text editor?

– I took a hint from a 2016 reply from mfrandsen.

nano ~/.config/kiorc

The file comprised two lines,

[Executable scripts]
behaviourOnLaunch=open

I edited the second line to read:

behaviourOnLaunch=execute

– then saved the file.

Immediately after the save, Dolphin behaved as expected.

1
  • After trying to find an answer, as I foolishly thought open meant to open the program I was trying to open, I needed to change it to execute. This worked perfectly, thank you! Jul 27, 2017 at 11:58
-1

@Ryan-muller I've been testing this with a *.desktop file.

Here's the contents of my *.desktop file.

[Desktop Entry]
Name=Gedit
Comment=Gnome Text Editor
Icon=/usr/share/icons/gnome/256x256/apps/text-editor.png
Exec=/usr/bin/gedit
Terminal=false
Type=Application
NoDisplay=false
Name[en_US]=Gedit
GenericName[en_US.UTF-8]=Gedit
Comment[en_US.UTF-8]=Gedit
3
  • OP wants to start a program and not editing a file.
    – A.B.
    Sep 11, 2015 at 17:24
  • I am well aware of the question, thank you... I only took gedit as an example. What I've tried to mention earlier, is that this is a desktop shortcut. Ryan could edit the *.desktop file at the Terminal=false or Terminal=true and NoDisplay=false or NoDisplay=true variable to change the starting behaviour of the app he is trying to start. See the next comment for the rest... this comment hasn't got enough characters left.
    – C Schilder
    Sep 12, 2015 at 6:00
  • In another case he might have seen a dialogbox mentioning the question where the app, file or shortcut he is trying to open has to be started with, choose Kate and forgot to untick the option in this dialogbox, to always start this type of file with this application.
    – C Schilder
    Sep 12, 2015 at 6:00

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .