[opensuse] KDE *.desktop app association
I posted a question a while back about an issue with icons on the KDE desktop. No conclusion was drawn. I have new info. The issue is that when clicking on a file.desktop icon in Dolphin, the file is opened in kate. The expected behavior is, or course, to run the application defined in the file.desktop file. An example of such a file is: #!/usr/bin/env xdg-open [Desktop Entry] BinaryPattern= Comment[en_US]=Configure RSofT Comment=Configure RSofT Exec=xterm -geometry 110x55 -T "Configure RSofT" -e change GenericName[en_US]= GenericName= Icon=/opt/rsoft/lib/images/icons/setup.png MimeType= Name[en_US]=Configure RSofT Name=Configure RSofT Path= ServiceTypes= StartupNotify=true SwallowExec= SwallowTitle= Terminal=false Type=Application X-DBUS-ServiceName= X-DBUS-StartupType=none X-DCOP-ServiceType=none X-KDE-SubstituteUID=false X-KDE-Username= Things are inconsistent. In Dolphin, the Type is correctly listed as "desktop configuration file". And the icon shown for it is the one defined in the file. And when right-clicking on it to edit it's Properties, a dialog for editing these kinds of files is shown. The Application tab has the expected fields for a .desktop file. However, when clicking on the icon, it opens in the kate editor. Upon further investigation, I see that the file association for *.desktop files is set to kate. It is like this on openSUSE 42.3 and on Tumbleweed. Surely this is incorrect. The icon does everything it should do - except it's main business: run the application it defines. There is not much utility in an icon that does not execute the command it defines. Am I missing something? Is the file association for *.desktop files wrong? If so, what should it be? If not, what use are these files? Note that when on the desktop, they do execute when clicked on. But they do not do this anywhere else. I am fairly certain that back in the dark days of KDE3 they executed in Dolphin no matter where they were located. -- Roger Oberholtzer -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
On Thu, 4 Apr 2019 10:20:40 +0200 Roger Oberholtzer wrote:
#!/usr/bin/env xdg-open
I think the above line strongly suggests the explanation, Roger. :) Because they're just plain text files, by MIME type, they'll open in your default text editor when clicked (or double-clicked.) But when that action occurs somewhere in your menu system or on your desktop, the files are treated as 'application launchers.' The 'xdg' is a reference to 'X Desktop Group' which has since become freedesktop.org. hth & regards, Carl -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
On 04/04/2019 03:20 AM, Roger Oberholtzer wrote:
However, when clicking on the icon, it opens in the kate editor. Upon further investigation, I see that the file association for *.desktop files is set to kate. It is like this on openSUSE 42.3 and on Tumbleweed.
Surely this is incorrect. The icon does everything it should do - except it's main business: run the application it defines. There is not much utility in an icon that does not execute the command it defines.
Roger, I think the distinction here is that the .desktop file icon will do exactly what it is supposed to if double-clicked on the Desktop or accessed from a menu. That triggers the exec= However, dolphin has its own set of file-associations that allow you to select how .desktop are handled when left-clicked in dolphin. This allows you to either open the file for editing in kate or treat it as a launcher. I don't have plasma installed, but if I recall, you can set the way the left-click is handled under one of the tabs in the properties (by clicking the little tools icon to open the file-associations window, and I think then under the embedding tab -- name may be changed) See if there is something there that lets you change the left-click association to the ? 'applications group' or similar to make it actually run the exec= on left-click. -- David C. Rankin, J.D.,P.E. -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
On Sat, Apr 6, 2019 at 2:56 AM David C. Rankin <drankinatty@suddenlinkmail.com> wrote:
On 04/04/2019 03:20 AM, Roger Oberholtzer wrote:
However, when clicking on the icon, it opens in the kate editor. Upon further investigation, I see that the file association for *.desktop files is set to kate. It is like this on openSUSE 42.3 and on Tumbleweed.
Surely this is incorrect. The icon does everything it should do - except it's main business: run the application it defines. There is not much utility in an icon that does not execute the command it defines.
Roger,
I think the distinction here is that the .desktop file icon will do exactly what it is supposed to if double-clicked on the Desktop or accessed from a menu. That triggers the exec=
I finally have more information on the systems where the behavior was not as expected. The ~/.config/kiorc had this: [Executable scripts] behaviourOnLaunch=open When I changed it to the following, I got the expected behavior. [Executable scripts] behaviourOnLaunch=execute I am guessing that 'open' is the default for a new user created on 42.3 (and maybe later). My user with 'execute' is an older user that was probably originally created in 12.x. So maybe back then the default was 'execute'. It will be nice when the config GUI gets the update to edit this value. But until then, vi works! -- Roger Oberholtzer -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
On 04/10/2019 04:36 AM, Roger Oberholtzer wrote:
I finally have more information on the systems where the behavior was not as expected. The ~/.config/kiorc had this:
[Executable scripts] behaviourOnLaunch=open
When I changed it to the following, I got the expected behavior.
[Executable scripts] behaviourOnLaunch=execute
I am guessing that 'open' is the default for a new user created on 42.3 (and maybe later). My user with 'execute' is an older user that was probably originally created in 12.x. So maybe back then the default was 'execute'.
It will be nice when the config GUI gets the update to edit this value. But until then, vi works!
Thanks for the follow up Roger. I guess we would have to look at the source in the Plasma git tree to see what it is currently set to. (always did rub me the wrong way that Plasma totally bombards the base of ~/.config with a zillion config files. Good grief, at least put them in a plasma sub-dir like all the other apps do... Otherwise you go to find another setting like for gtk3 and you have to scroll back up 100 lines to find the directory...) -- David C. Rankin, J.D.,P.E. -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
participants (3)
-
Carl Hartung
-
David C. Rankin
-
Roger Oberholtzer