[dolphin] [Bug 473268] New: Whether File is "Executable" Depends on Extension, not Execute Bit

bugzilla_noreply at kde.org bugzilla_noreply at kde.org
Fri Aug 11 03:15:02 BST 2023


https://bugs.kde.org/show_bug.cgi?id=473268

            Bug ID: 473268
           Summary: Whether File is "Executable" Depends on Extension, not
                    Execute Bit
    Classification: Applications
           Product: dolphin
           Version: 22.12.3
          Platform: Ubuntu
                OS: Linux
            Status: REPORTED
          Severity: normal
          Priority: NOR
         Component: view-engine: general
          Assignee: dolphin-bugs-null at kde.org
          Reporter: stellarpower at googlemail.com
                CC: kfm-devel at kde.org
  Target Milestone: ---

Whilst posix shells are traditionally the most common on linux, there are many
options now. Not all shell scripts end in `.sh`, and whether a file can be
executed or not is determined by the execute bit on linux - and not by any file
extension or similar conventions. With many shells to choose from, and not to
mention other languages, such as Ruby or Python, and the ability to have more
complex shebanhgs, there's an increasing range of text files one might want to
execute directly.

I use fish a lot, and now more nushell aswell, and whilst often I do want to
open my scripts to edit them, it is also convenient to be able to execute them
with a double-click with no arguments from within dolphin. I would like to be
prompted if I want to open or execute an executable text file of any type, the
same way I would if it is evidently a script for one of the posix-style shells.
I think on linux, the execute bit trumps the extension, which seems to me to be
a deciding factor. This is the behaviour I have had on Nemo (and I assume
nautilus too). At the least, if there are disagreements on whether users would
prefer this or not, I think this should be a configurable option. E.g. "Treat
all files with execute bit set as executable" (for the purposes of determining
whether to open in an application, execute, or always ask), or "Only treat
certain known executable file formats as executable". 



On linux:

STEPS TO REPRODUCE
1. Create a shell script in a language of your choice.
1. Give it the extension ".sh"
1. Set the execute bit
1. Double-click in Dolphin. It should execute, or prompt, according to your
preference in the settings.
1. Now name it ending in e.g. .fish., .nu, .xonsh, ...

OBSERVED RESULT
1. Double-clicking opens it in Kate (for me)


EXPECTED RESULT
1. Double-clicking it still executes it

SOFTWARE/OS VERSIONS
(Skipped as not sure is relevant)
Linux/KDE Plasma: 
(available in About System)
KDE Plasma Version: 
KDE Frameworks Version: 
Qt Version: 

ADDITIONAL INFORMATION

-- 
You are receiving this mail because:
You are on the CC list for the bug.


More information about the kfm-devel mailing list