By running .desktop file in normal mode, Kate will open the file. If I run Krusader privileged mode (root) even Kate will not be opened. Please fix this, .desktop files should be always executed, in "normal" and privileged mode (root). This is my simple .desktop file for testing: [Desktop Entry] Version=1.0 Exec=sudo /usr/local/bin/test.sh Name=Test GenericName=Test Comment=Execute test Encoding=UTF-8 Terminal=true Type=Application Categories=Application;Development; MimeType=application/x-sharedlib; Of course I tried various options like Terminal=false also playing with MimeType.
Can someone confirm this issue?
Can confirm that Krusader in normal mode opens with associated application, even when I select "Run" in drop down menu. I'm not sure if I like what Dolphin is doing to the .desktop file: when I choose "Execute", Dolphin changes the content of the file by prepending "#!/usr/bin/env xdg-open" and modifies permissions without asking.
I think that at least behaviour should be the same in both modes (normal, root). Double commander is also executing files, do not see any problem there.
> Dolphin is doing to the .desktop file: when I choose "Execute", Dolphin changes the content of the file by prepending "#!/usr/bin/env xdg-open" and modifies permissions without asking OMG, I confirm it's doing this. Not nice, IMO. I think this type of functionality has never been implemented in Krusader before, so I move it to wish list.
Double commander is also executing file. Why do we have .desktop files, they should be shortcuts to execute something right? What is the use case to open .desktop file in some default text editor like Kate. Who needs that. :) If you have "Exec" in desktop file then it should be executed or should I open it in Kate and copy/paste command in Terminal. :)
(In reply to amilino from comment #5) > Why do we have .desktop files, they > should be shortcuts to execute something right? They are shortcuts for a menu or a desktop [1]: In GNOME and other freedesktop.org-compliant desktops, an application gets registered into the desktop's menus through a desktop entry, which is a text file with .desktop extension. This desktop file contains a listing of the configurations for your application. The desktop takes the information in this file and uses it to: put the application in the Main Menu. To find a list of valid categories, take a look into FreeDesktop.org's Desktop Menu Specification. list the application in the Run Application... dialog create appropriate launchers in the menu or on the desktop. associate the name and description of the application. use the appropriate icon. recognize the MIME types it supports for opening files. > What is the use case to open > .desktop file in some default text editor like Kate. Who needs that. :) We do this for any text file. Consistency. You can modify association with this mime type and associate a program to run a desktop file. Don't ask me, I don't know such an app. :) > If you have "Exec" in desktop file then it should be executed or should I > open it in Kate and copy/paste command in Terminal. :) Simply use a one-line shell script instead of a desktop file. Since it is implemented in Dolphin, then someone else has cared about at some point in time and it becomes a signal that Krusader may need this as well. However, the current way Dolphin does it (by modifying contents and permissions) is a really bad practice. If you suggest to implement it differently, then we'll consider, but I think it should be governed by an external app and you simply set an appropriate association. [1] https://developer.gnome.org/integration-guide/stable/desktop-files.html.en
I switched to shell files, I like Krusader too much to leave it because of this minor issue. However, I think you shoud keep up with all other file managers. Can you at least make it work in root mode same as it works in normal mode? Currently if I run Krusader in root mode, file is not opened in text editor app.
> If I run Krusader privileged mode (root) even Kate will not be opened. > [...] > Can you at least make it work in root mode same as it works in normal mode? > Currently if I run Krusader in root mode, file is not opened in text editor app. By default: if you press F4 on a file and you can edit it, then you are using Krusader's internal editor; and if you press Return on a file then... you launch Kate. Maybe your problem is not related to Krusader, maybe your problem is that your version of Kate doesn't work with root privileges (that happens under a lot of distributions - operating systems). For example, in my Kubuntu 18.04 command line this is what happened: # kate Executing Kate as root is not possible. To edit files as root use: SUDO_EDITOR=kate sudoedit <file> When running Krusader in root mode (because you need to copy/move/synchronize a lot of files in /usr/local/bin, etc.) you can use the internal editor of Krusader to edit files. If there is really no other way, you can free Kate (https://forum.kde.org/viewtopic.php?f=66&t=86637#p381463). That reading is very, very instructing (and also thought-provoking, "am I cracking Linux?")
OMG! I will not do that. :) I am using F4 to edit files and it is working fine. All best.
(In reply to amilino from comment #9) > OMG! I will not do that. :) I am using F4 to edit files and it is working > fine. All best. Fortunately, KDE later saw some use cases where using a graphical program (like Kate) as the root user... was needed: - [Kate](https://bugs.kde.org/show_bug.cgi?id=387973) can once again be launched when logged in as the root user. - [allow Kate and Dolphin to be run with the root user account again](https://pointieststick.wordpress.com/2018/06/02/this-week-in-usability-productivity-part-21/).
Do you know ppa for new version of Kate?
> Do you know ppa for new version of Kate? No, if you find any, you can write its address here :-)
Solved in https://invent.kde.org/utilities/krusader/-/commit/cc60f780d2feb8c2be4e664354584edd42bc8f23